Bug 708912

Summary: SELinux is preventing /sbin/dhclient from 'read' accesses on the file nm-dhclient-eth1.conf.
Product: [Fedora] Fedora Reporter: steven.vandervalk+redhat
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:7baf2436a55c7deb2ef85df561027ef27289662752abfe6ba3c06732d0acadb0
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-30 07:52:42 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 steven.vandervalk+redhat 2011-05-30 06:03:41 UTC
SELinux is preventing /sbin/dhclient from 'read' accesses on the file nm-dhclient-eth1.conf.

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

If you believe that dhclient should be allowed read access on the nm-dhclient-eth1.conf 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 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                nm-dhclient-eth1.conf [ file ]
Source                        dhclient
Source Path                   /sbin/dhclient
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           dhclient-4.2.1-9.P1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-24.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.6-27.fc15.i686.PAE #1 SMP
                              Sun May 15 17:39:47 UTC 2011 i686 i686
Alert Count                   2
First Seen                    Mon 30 May 2011 15:54:05 EST
Last Seen                     Mon 30 May 2011 15:54:38 EST
Local ID                      341c3f13-638f-4ba0-b252-08884aa7034d

Raw Audit Messages
type=AVC msg=audit(1306734878.922:69): avc:  denied  { read } for  pid=2223 comm="dhclient" name="nm-dhclient-eth1.conf" dev=tmpfs ino=51298 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1306734878.922:69): arch=i386 syscall=open success=no exit=EACCES a0=bf944913 a1=80000 a2=1c a3=d36e5c items=0 ppid=2114 pid=2223 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm=dhclient exe=/sbin/dhclient subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)

Hash: dhclient,dhcpc_t,var_run_t,file,read

audit2allow

#============= dhcpc_t ==============
allow dhcpc_t var_run_t:file read;

audit2allow -R

#============= dhcpc_t ==============
allow dhcpc_t var_run_t:file read;

Comment 1 steven.vandervalk+redhat 2011-05-30 06:07:23 UTC
Apologies if improper, first bug report. Was having issues with NetworkManager not storing a config in system-connections for wpa2 enterprise wan and not connecting, so i removed NetworkManager.conf and that brought this.

Comment 2 Miroslav Grepl 2011-05-30 07:52:42 UTC
I guess you executed wpa by hand? 

What is your output of 

# ps -eZ |grep Network




You will need to execute

# restorecon -R -v /var/run/nm-dhclient-eth1.conf

But also you will need to start wpa using an init script.

Please reopen the bug if I am wrong. Thank you.

Comment 3 Dominick Grift 2011-05-30 08:29:33 UTC
Can you also: restorecon -R -v /var, just in case your /var/run symlink is mislabelled.

Comment 4 steven.vandervalk+redhat 2011-06-01 02:25:29 UTC
I guess so

system_u:system_r:NetworkManager_t:s0 942 ?    00:00:00 NetworkManager

Thank you.