Bug 696264

Summary: SELinux is preventing /bin/bash from 'getattr' accesses on the file /bin/systemctl.
Product: [Fedora] Fedora Reporter: Sandro Mathys <sandro>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: awilliam, dwalsh, mgrepl, olivares14031, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:e2a95fc2187af4cca7981f3d01c13d21442b8d6e1b99acad0cf0f2ff06e95dcb
Fixed In Version: selinux-policy-3.9.16-15.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-15 21:32:41 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 Sandro Mathys 2011-04-13 17:56:31 UTC
SELinux is preventing /bin/bash from 'getattr' accesses on the file /bin/systemctl.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that bash should be allowed getattr access on the systemctl 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 prelink /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:prelink_cron_system_t:s0-s0:c0.c
                              1023
Target Context                system_u:object_r:systemd_systemctl_exec_t:s0
Target Objects                /bin/systemctl [ file ]
Source                        prelink
Source Path                   /bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.8-2.fc15
Target RPM Packages           systemd-units-24-1.fc15
Policy RPM                    selinux-policy-3.9.16-14.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.2-9.fc15.x86_64 #1 SMP
                              Wed Mar 30 16:55:57 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 13 Apr 2011 07:53:42 PM CEST
Last Seen                     Wed 13 Apr 2011 07:53:42 PM CEST
Local ID                      eb651313-1a5a-4760-adc9-845ed2c77583

Raw Audit Messages
type=AVC msg=audit(1302717222.778:133): avc:  denied  { getattr } for  pid=9756 comm="prelink" path="/bin/systemctl" dev=dm-2 ino=39612 scontext=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_systemctl_exec_t:s0 tclass=file


type=SYSCALL msg=audit(1302717222.778:133): arch=x86_64 syscall=stat success=no exit=EACCES a0=18be040 a1=7fffd17d0840 a2=7fffd17d0840 a3=8 items=0 ppid=7921 pid=9756 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm=prelink exe=/bin/bash subj=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 key=(null)

Hash: prelink,prelink_cron_system_t,systemd_systemctl_exec_t,file,getattr

audit2allow

#============= prelink_cron_system_t ==============
allow prelink_cron_system_t systemd_systemctl_exec_t:file getattr;

audit2allow -R

#============= prelink_cron_system_t ==============
allow prelink_cron_system_t systemd_systemctl_exec_t:file getattr;

Comment 1 Daniel Walsh 2011-04-13 18:29:03 UTC
*** Bug 696266 has been marked as a duplicate of this bug. ***

Comment 2 Daniel Walsh 2011-04-13 18:36:39 UTC
Fixed in selinux-policy-3.9.16-15.fc15.noarch

Comment 3 Fedora Update System 2011-04-13 19:47:52 UTC
selinux-policy-3.9.16-15.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-15.fc15

Comment 4 Fedora Update System 2011-04-14 00:34:30 UTC
Package selinux-policy-3.9.16-15.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-15.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-15.fc15
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-04-15 21:31:15 UTC
selinux-policy-3.9.16-15.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.