Bug 1471840 - SELinux is preventing dhclient from 'write' accesses on the sock_file log.
SELinux is preventing dhclient from 'write' accesses on the sock_file log.
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-17 10:16 EDT by Michael Socfield
Modified: 2017-09-27 06:53 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-09-27 06:53:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Socfield 2017-07-17 10:16:23 EDT
Description of problem:
SELinux is preventing dhclient from 'write' accesses on the sock_file log.

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

If 确定应默认允许 dhclient write 访问 log sock_file。
Then 应该将这个情况作为 bug 报告。
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                system_u:object_r:device_t:s0
Target Objects                log [ sock_file ]
Source                        dhclient
Source Path                   dhclient
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-224.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.6-300.fc25.x86_64 #1 SMP Tue
                              Nov 1 12:36:38 UTC 2016 x86_64 x86_64
Alert Count                   8
First Seen                    2017-07-18 04:00:45 CST
Last Seen                     2017-07-18 04:00:57 CST
Local ID                      a34e4be3-424f-408b-a619-192f4016321e

Raw Audit Messages
type=AVC msg=audit(1500321657.767:1419): avc:  denied  { write } for  pid=1031 comm="dhclient" name="log" dev="devtmpfs" ino=10373 scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=sock_file permissive=0

Hash: dhclient,dhcpc_t,device_t,sock_file,write

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.8.6-300.fc25.x86_64
type:           libreport
Comment 1 Lukas Vrabec 2017-07-19 06:32:04 EDT

Label for /dev/log shoudl have label devlog_t instead of device_t. 

It looks that your system is mislabeled. Could you restorecon all objects on your system and then please try to reproduce it. 


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