Bug 1271924 - SELinux is preventing /usr/sbin/dnsmasq from 'getattr' accesses on the file /etc/resolv.conf.
Summary: SELinux is preventing /usr/sbin/dnsmasq from 'getattr' accesses on the file /...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b4b9b8deaf9d181a4754f4af599...
: 1271930 1271933 1271935 1272014 1272015 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-15 06:25 UTC by Gil Forcada
Modified: 2015-10-16 15:37 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-16 14:48:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Gil Forcada 2015-10-15 06:25:28 UTC
Description of problem:
SELinux is preventing /usr/sbin/dnsmasq from 'getattr' accesses on the file /etc/resolv.conf.

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

If you believe that dnsmasq should be allowed getattr 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 dnsmasq /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:dnsmasq_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:home_bin_t:s0
Target Objects                /etc/resolv.conf [ file ]
Source                        dnsmasq
Source Path                   /usr/sbin/dnsmasq
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           dnsmasq-2.72-3.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                   89
First Seen                    2015-10-14 22:23:25 EEST
Last Seen                     2015-10-15 09:23:36 EEST
Local ID                      3b59cb48-7fc7-4a59-9299-02a405566955

Raw Audit Messages
type=AVC msg=audit(1444890216.193:717): avc:  denied  { getattr } for  pid=1765 comm="dnsmasq" path="/etc/resolv.conf" dev="sdb1" ino=1048833 scontext=system_u:system_r:dnsmasq_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:home_bin_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1444890216.193:717): arch=x86_64 syscall=stat success=no exit=EACCES a0=55d3e63d4bac a1=7ffd6dc6e560 a2=7ffd6dc6e560 a3=7ffd6dc6e7d0 items=0 ppid=1 pid=1765 auid=4294967295 uid=99 gid=40 euid=99 suid=99 fsuid=99 egid=40 sgid=40 fsgid=40 tty=(none) ses=4294967295 comm=dnsmasq exe=/usr/sbin/dnsmasq subj=system_u:system_r:dnsmasq_t:s0-s0:c0.c1023 key=(null)

Hash: dnsmasq,dnsmasq_t,home_bin_t,file,getattr

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:48:40 UTC
Looks like your /etc/resolv.conf file is labeled home_bin_t?  

restorecon -v /etc/resolv.conf

Should fix the problem. Did you mv this file from somewhere in your homedir?

Comment 2 Daniel Walsh 2015-10-16 14:49:01 UTC
*** Bug 1271930 has been marked as a duplicate of this bug. ***

Comment 3 Daniel Walsh 2015-10-16 14:49:24 UTC
*** Bug 1271933 has been marked as a duplicate of this bug. ***

Comment 4 Daniel Walsh 2015-10-16 14:49:35 UTC
*** Bug 1271935 has been marked as a duplicate of this bug. ***

Comment 5 Daniel Walsh 2015-10-16 14:51:25 UTC
*** Bug 1272014 has been marked as a duplicate of this bug. ***

Comment 6 Daniel Walsh 2015-10-16 14:51:40 UTC
*** Bug 1272015 has been marked as a duplicate of this bug. ***

Comment 7 Gil Forcada 2015-10-16 15:37:27 UTC
Thanks Daniel to take a look at it!

As for moving the file, no, as far as I remember I did not move that file.


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