Bug 738512 - SELinux is preventing /usr/bin/python from 'read' accesses on the chr_file 076.
Summary: SELinux is preventing /usr/bin/python from 'read' accesses on the chr_file 076.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:867a9977254...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-15 03:21 UTC by Dave Galloway
Modified: 2012-08-16 14:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-16 14:41:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Galloway 2011-09-15 03:21:20 UTC
SELinux is preventing /usr/bin/python from 'read' accesses on the chr_file 076.

*****  Plugin device (91.4 confidence) suggests  *****************************

If you want to allow python to have read access on the 076 chr_file
Then you need to change the label on 076 to a type of a similar device.
Do
# semanage fcontext -a -t SIMILAR_TYPE '076'
# restorecon -v '076'

*****  Plugin catchall (9.59 confidence) suggests  ***************************

If you believe that python should be allowed read access on the 076 chr_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep python /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:hplip_t:s0-s0:c0.c1023
Target Context                system_u:object_r:device_t:s0
Target Objects                076 [ chr_file ]
Source                        python
Source Path                   /usr/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7-8.fc14.1
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-44.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.14-96.fc14.x86_64 #1 SMP Thu Sep 1 11:59:56
                              UTC 2011 x86_64 x86_64
Alert Count                   219
First Seen                    Tue 13 Sep 2011 09:08:32 AM EDT
Last Seen                     Wed 14 Sep 2011 11:20:21 PM EDT
Local ID                      6219ce1e-381e-4e1a-9994-0ee2a31940ec

Raw Audit Messages
type=AVC msg=audit(1316056821.311:128): avc:  denied  { read } for  pid=5539 comm="python" name="076" dev=devtmpfs ino=40854 scontext=system_u:system_r:hplip_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1316056821.311:128): arch=x86_64 syscall=open success=no exit=EACCES a0=7fffdb4eacd0 a1=0 a2=d a3=ff items=0 ppid=5536 pid=5539 auid=4294967295 uid=0 gid=7 euid=0 suid=0 fsuid=0 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm=python exe=/usr/bin/python subj=system_u:system_r:hplip_t:s0-s0:c0.c1023 key=(null)

Hash: python,hplip_t,device_t,chr_file,read

audit2allow

#============= hplip_t ==============
allow hplip_t device_t:chr_file read;

audit2allow -R

#============= hplip_t ==============
allow hplip_t device_t:chr_file read;

Comment 1 Miroslav Grepl 2011-09-15 11:35:02 UTC
I believe everything works as you expect, right?

What does

ls -Z `find /dev -name 076`

Comment 2 Fedora End Of Life 2012-08-16 14:41:29 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.