Bug 1271935

Summary: SELinux is preventing /usr/sbin/dhclient from 'read' accesses on the file /etc/resolv.conf.
Product: [Fedora] Fedora Reporter: Gil Forcada <gforcada>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:cfeeb76b040aa3d643b658c4f41d51d66b6d128b5af8cb7eb8e5f332423ba8d4;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-16 14:49:35 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 Gil Forcada 2015-10-15 06:28:57 UTC
Description of problem:
SELinux is preventing /usr/sbin/dhclient from 'read' accesses on the file /etc/resolv.conf.

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

If you believe that dhclient should be allowed read access on the resolv.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                system_u:system_r:dhcpc_t:s0
Target Context                unconfined_u:object_r:home_bin_t:s0
Target Objects                /etc/resolv.conf [ file ]
Source                        dhclient
Source Path                   /usr/sbin/dhclient
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           dhcp-client-4.3.2-2.fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.13.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.1.7-200.fc22.x86_64 #1 SMP Mon
                              Sep 14 20:19:24 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-10-15 09:16:14 EEST
Last Seen                     2015-10-15 09:16:14 EEST
Local ID                      bb01d14d-0aab-4de1-b869-725fce320836

Raw Audit Messages
type=AVC msg=audit(1444889774.178:628): avc:  denied  { read } for  pid=20270 comm="dhclient" name="resolv.conf" dev="sdb1" ino=1048833 scontext=system_u:system_r:dhcpc_t:s0 tcontext=unconfined_u:object_r:home_bin_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1444889774.178:628): arch=x86_64 syscall=open success=no exit=EACCES a0=7f014445ad88 a1=0 a2=1b6 a3=ac items=0 ppid=905 pid=20270 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=dhclient exe=/usr/sbin/dhclient subj=system_u:system_r:dhcpc_t:s0 key=(null)

Hash: dhclient,dhcpc_t,home_bin_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-128.13.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.7-200.fc22.x86_64
type:           libreport

Comment 1 Daniel Walsh 2015-10-16 14:49:35 UTC

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