Bug 851783

Summary: SELinux is preventing /usr/bin/python2.7 from 'search' accesses on the directory /usr/lib/systemd/system.
Product: [Fedora] Fedora Reporter: Jeffrey S Austin <phyrefyter>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:5729f3e81a1378ab1a2cca9ae10122bcf192d353f12f68f6d4eb8b39888ffed4
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-15 19:50:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeffrey S Austin 2012-08-25 17:47:08 UTC
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

description:
: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.
:Do
: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
:
:audit2allow
:
:#============= 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 11:21:41 UTC
If you execute

# semanage permissive -a hplip_t

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