Bug 736215 - SELinux is preventing NetworkManager from 'unlink' accesses on the file /etc/resolv.conf.
Summary: SELinux is preventing NetworkManager from 'unlink' accesses on the file /etc/...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:b027870cdaf...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-07 04:35 UTC by Rob K
Modified: 2011-09-07 06:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-07 06:49:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Rob K 2011-09-07 04:35:57 UTC
SELinux is preventing NetworkManager from 'unlink' 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.
Do
# /sbin/restorecon -v /etc/resolv.conf

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

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

Additional Information:
Source Context                system_u:system_r:NetworkManager_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /etc/resolv.conf [ file ]
Source                        NetworkManager
Source Path                   NetworkManager
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-35.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.3-0.fc15.x86_64
                              #1 SMP Tue Aug 16 04:10:59 UTC 2011 x86_64 x86_64
Alert Count                   27
First Seen                    Tue 23 Aug 2011 10:46:12 PM EST
Last Seen                     Tue 06 Sep 2011 08:09:48 PM EST
Local ID                      32d2fcf0-6749-4601-b24e-fa3832fa60ba

Raw Audit Messages
type=AVC msg=audit(1315303788.118:6660): avc:  denied  { unlink } for  pid=1023 comm="NetworkManager" name="resolv.conf" dev=sdb3 ino=567122 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


Hash: NetworkManager,NetworkManager_t,user_home_t,file,unlink

audit2allow

#============= NetworkManager_t ==============
allow NetworkManager_t user_home_t:file unlink;

audit2allow -R

#============= NetworkManager_t ==============
allow NetworkManager_t user_home_t:file unlink;

Comment 1 Miroslav Grepl 2011-09-07 06:49:13 UTC
*****  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.
Do

# /sbin/restorecon -v /etc/resolv.conf


Did you move resolv.conf from your home directroy?


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