Bug 730483

Summary: SELinux is preventing /usr/bin/python from 'read' accesses on the file /etc/resolv.conf.
Product: [Fedora] Fedora Reporter: Heiko Adams <bugzilla>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:736e62c48569656e43c428c887f4ad63755e08cf1d84421e801d2da1732d2fa4
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-15 10:42:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Heiko Adams 2011-08-13 15:12:52 UTC
SELinux is preventing /usr/bin/python from 'read' accesses on the file /etc/resolv.conf.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/etc/resolv.conf default label should be net_conf_t.
Then you can run restorecon.
# /sbin/restorecon -v /etc/resolv.conf

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that python 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.
allow this access for now by executing:
# grep sealert /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:setroubleshoot_fixit_t:s0-s0:c0.
Target Context                system_u:object_r:NetworkManager_var_lib_t:s0
Target Objects                /etc/resolv.conf [ file ]
Source                        sealert
Source Path                   /usr/bin/python
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           python-2.7.1-7.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-38.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) #1 SMP
                              Sat Aug 6 06:02:30 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Sa 13 Aug 2011 17:10:11 CEST
Last Seen                     Sa 13 Aug 2011 17:10:11 CEST
Local ID                      3e26bbf5-80bf-4f88-9546-a1dd7ae6d8c7

Raw Audit Messages
type=AVC msg=audit(1313248211.876:76): avc:  denied  { read } for  pid=2081 comm="sealert" name="resolv.conf" dev=dm-1 ino=1838139 scontext=system_u:system_r:setroubleshoot_fixit_t:s0-s0:c0.c1023 tcontext=system_u:object_r:NetworkManager_var_lib_t:s0 tclass=file

type=SYSCALL msg=audit(1313248211.876:76): arch=i386 syscall=open success=no exit=EACCES a0=48f0ebfd a1=0 a2=1b6 a3=48f0ebfd items=0 ppid=2080 pid=2081 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=sealert exe=/usr/bin/python subj=system_u:system_r:setroubleshoot_fixit_t:s0-s0:c0.c1023 key=(null)

Hash: sealert,setroubleshoot_fixit_t,NetworkManager_var_lib_t,file,read


#============= setroubleshoot_fixit_t ==============
allow setroubleshoot_fixit_t NetworkManager_var_lib_t:file read;

audit2allow -R

#============= setroubleshoot_fixit_t ==============
allow setroubleshoot_fixit_t NetworkManager_var_lib_t:file read;

Comment 1 Daniel Walsh 2011-08-15 10:42:14 UTC

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