Bug 1344587 - SELinux is preventing dhclient from 'read' accesses on the file resolv.conf.
Summary: SELinux is preventing dhclient from 'read' accesses on the file resolv.conf.
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:7baf2436a55c7deb2ef85df5610...
Depends On:
TreeView+ depends on / blocked
Reported: 2016-06-10 06:23 UTC by Nikolay Chesnokov
Modified: 2016-06-20 11:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-06-20 11:02:33 UTC
Type: ---

Attachments (Terms of Use)

Description Nikolay Chesnokov 2016-06-10 06:23:45 UTC
Description of problem:
SELinux is preventing dhclient from 'read' accesses on the file resolv.conf.

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

If вы считаете, что dhclient следует разрешить доступ read к resolv.conf file по умолчанию.
Then рекомендуется создать отчет об ошибке.
Чтобы разрешить доступ, можно создать локальный модуль политики.
allow this access for now by executing:
# ausearch -c 'dhclient' --raw | audit2allow -M my-dhclient
# semodule -X 300 -i my-dhclient.pp

Additional Information:
Source Context                system_u:system_r:dhcpc_t:s0
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                resolv.conf [ file ]
Source                        dhclient
Source Path                   dhclient
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-190.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.5.5-300.fc24.x86_64 #1 SMP Thu
                              May 19 13:05:32 UTC 2016 x86_64 x86_64
Alert Count                   2
First Seen                    2016-06-10 08:50:52 MSK
Last Seen                     2016-06-10 08:50:53 MSK
Local ID                      743e8ee9-840b-4617-ac4e-c0c260aa02af

Raw Audit Messages
type=AVC msg=audit(1465537853.770:636): avc:  denied  { read } for  pid=16746 comm="dhclient" name="resolv.conf" dev="tmpfs" ino=36592 scontext=system_u:system_r:dhcpc_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file permissive=0

Hash: dhclient,dhcpc_t,var_run_t,file,read

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.7.1
hashmarkername: setroubleshoot
kernel:         4.5.5-300.fc24.x86_64
reproducible:   Not sure how to reproduce the problem
type:           libreport

Potential duplicate: bug 708912

Comment 1 Lukas Vrabec 2016-06-20 11:02:33 UTC
ou 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.

Note You need to log in before you can comment on or make changes to this bug.