Bug 1471546 - SELinux is preventing dnsmasq from search access on the directory root.
SELinux is preventing dnsmasq from search access on the directory root.
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-16 15:52 EDT by Andrew Toskin
Modified: 2017-07-19 04:18 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-19 04:18:07 EDT
Type: Bug
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 Andrew Toskin 2017-07-16 15:52:10 EDT
After making a fresh installation of Fedora 26 Workstation x86_64, I started to restore local file backups, including my entire home directory, virtual machines from /var/lib/libvirt/, /root/.bashrc, and a few things in /etc/, using rsync. During this operation, I hit *a lot* of SE Linux alerts, including this one, plus others that have already recently been reported.

SELinux is preventing dnsmasq from search access on the directory root.

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

If you believe that dnsmasq should be allowed search access on the root directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# ausearch -c 'dnsmasq' --raw | audit2allow -M my-dnsmasq
# semodule -X 300 -i my-dnsmasq.pp

Additional Information:
Source Context                system_u:system_r:dnsmasq_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                root [ dir ]
Source                        dnsmasq
Source Path                   dnsmasq
Port                          <Unknown>
Host                          jean.localdomain
Source RPM Packages           
Target RPM Packages           filesystem-3.2-40.fc26.x86_64
Policy RPM                    selinux-policy-3.13.1-259.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     jean.localdomain
Platform                      Linux jean.localdomain 4.11.8-300.fc26.x86_64 #1
                              SMP Thu Jun 29 20:09:48 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-07-16 00:49:22 PDT
Last Seen                     2017-07-16 00:49:22 PDT
Local ID                      7c3af17a-bef2-4629-bf38-cda8554717af

Raw Audit Messages
type=AVC msg=audit(1500191362.749:517): avc:  denied  { search } for  pid=1301 comm="dnsmasq" name="root" dev="dm-0" ino=256 scontext=system_u:system_r:dnsmasq_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir permissive=0

Hash: dnsmasq,dnsmasq_t,user_home_t,dir,search
Comment 1 Lukas Vrabec 2017-07-19 04:18:07 EDT
Hi Andrew, 

If you just moving files after fresh installation you should run "restorecon" command. 

# restorecon -Rv / 

This should fix your issue.

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