Bug 699471

Summary: SELinux is preventing dhclient-script from 'getattr' accesses on the file /bin/systemctl.
Product: [Fedora] Fedora Reporter: Matt <bugzilla.redhat>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dwalsh, jpopelka, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:beb1281a31d8e2ada7fde7833be9d06e6188a8582ca6533ea583dc41a84db974
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-26 14:40:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matt 2011-04-25 19:01:21 UTC
SELinux is preventing dhclient-script from 'getattr' accesses on the file /bin/systemctl.

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

If you believe that dhclient-script 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 dhclient-script /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:dhcpc_t:s0
Target Context                system_u:object_r:systemd_systemctl_exec_t:s0
Target Objects                /bin/systemctl [ file ]
Source                        dhclient-script
Source Path                   dhclient-script
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           systemd-units-24-1.fc15
Policy RPM                    selinux-policy-3.9.16-15.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.38.2-9.fc15.i686 #1 SMP Wed Mar 30 16:54:01
                              UTC 2011 i686 i686
Alert Count                   1
First Seen                    Fri 22 Apr 2011 07:50:30 PM PDT
Last Seen                     Fri 22 Apr 2011 07:50:30 PM PDT
Local ID                      c4e50d68-d049-4c79-b78d-2658d6462b44

Raw Audit Messages
type=AVC msg=audit(1303527030.409:263): avc:  denied  { getattr } for  pid=6780 comm="dhclient-script" path="/bin/systemctl" dev=sda2 ino=18464 scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:object_r:systemd_systemctl_exec_t:s0 tclass=file


Hash: dhclient-script,dhcpc_t,systemd_systemctl_exec_t,file,getattr

audit2allow

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

audit2allow -R

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

Comment 1 Daniel Walsh 2011-04-25 19:36:10 UTC
Any idea what it is doing with this program?

Comment 2 Daniel Walsh 2011-04-25 19:36:39 UTC
Miroslav we probably need to add

	systemd_exec_systemctl(dhcpc_t)

Comment 3 Miroslav Grepl 2011-04-26 08:00:24 UTC
Yes, it looks so.

Comment 4 Daniel Walsh 2011-04-26 14:40:29 UTC

*** This bug has been marked as a duplicate of bug 699533 ***