Bug 851783 - SELinux is preventing /usr/bin/python2.7 from 'search' accesses on the directory /usr/lib/systemd/system.
SELinux is preventing /usr/bin/python2.7 from 'search' accesses on the direct...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-08-25 13:47 EDT by Jeffrey S Austin
Modified: 2012-12-15 14:50 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-15 14:50:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeffrey S Austin 2012-08-25 13:47:08 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.5.2-1.fc17.x86_64.debug
time:           Sat 25 Aug 2012 01:46:51 PM EDT

:SELinux is preventing /usr/bin/python2.7 from 'search' accesses on the directory /usr/lib/systemd/system.
:*****  Plugin catchall (100. confidence) suggests  ***************************
:If you believe that python2.7 should be allowed search access on the system directory by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:allow this access for now by executing:
:# grep hpfax /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:systemd_unit_file_t:s0
:Target Objects                /usr/lib/systemd/system [ dir ]
:Source                        hpfax
:Source Path                   /usr/bin/python2.7
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           python-2.7.3-7.2.fc17.x86_64
:Target RPM Packages           initscripts-9.37.1-1.fc17.x86_64
:                              systemd-44-17.fc17.x86_64 systemd-44-17.fc17.i686
:Policy RPM                    selinux-policy-3.10.0-145.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.5.2-1.fc17.x86_64.debug #1 SMP
:                              Wed Aug 15 15:41:47 UTC 2012 x86_64 x86_64
:Alert Count                   3
:First Seen                    2012-08-18 18:00:37 EDT
:Last Seen                     2012-08-19 03:35:29 EDT
:Local ID                      a82ff94b-142f-43fe-a2e3-ca68bcd06bf5
:Raw Audit Messages
:type=AVC msg=audit(1345361729.254:51): avc:  denied  { search } for  pid=1015 comm="hpfax" name="system" dev="dm-2" ino=1975588 scontext=system_u:system_r:hplip_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=dir
:type=SYSCALL msg=audit(1345361729.254:51): arch=x86_64 syscall=stat success=no exit=EACCES a0=11406d0 a1=7fff309bde60 a2=7fff309bde60 a3=656369767265732e items=0 ppid=811 pid=1015 auid=4294967295 uid=0 gid=7 euid=0 suid=0 fsuid=0 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm=hpfax exe=/usr/bin/python2.7 subj=system_u:system_r:hplip_t:s0-s0:c0.c1023 key=(null)
:Hash: hpfax,hplip_t,systemd_unit_file_t,dir,search
:#============= hplip_t ==============
:allow hplip_t systemd_unit_file_t:dir search;
:audit2allow -R
:#============= hplip_t ==============
:allow hplip_t systemd_unit_file_t:dir search;
Comment 1 Miroslav Grepl 2012-08-27 07:21:41 EDT
If you execute

# semanage permissive -a hplip_t

and re-test it, are you getting more AVC msgs?

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