Bug 1124629 - SELinux is preventing /usr/sbin/NetworkManager from 'unlink' accesses on the file . [NEEDINFO]
Summary: SELinux is preventing /usr/sbin/NetworkManager from 'unlink' accesses on the ...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:935750cc44e5564171f40da2468...
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-30 00:36 UTC by Ricardo Veguilla
Modified: 2014-07-30 07:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-07-30 07:08:18 UTC
mgrepl: needinfo? (veguilla)

Attachments (Terms of Use)

Description Ricardo Veguilla 2014-07-30 00:36:56 UTC
Description of problem:
SELinux is preventing /usr/sbin/NetworkManager from 'unlink' accesses on the file .

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow NetworkManager to have unlink access on the  file
Then you need to change the label on $FIX_TARGET_PATH
# semanage fcontext -a -t FILE_TYPE '$FIX_TARGET_PATH'
where FILE_TYPE is one of the following: NetworkManager_etc_rw_t, NetworkManager_tmp_t, NetworkManager_var_lib_t, NetworkManager_var_run_t, dhcpc_state_t, dhcpc_var_run_t, dnsmasq_var_run_t, hostname_etc_t, named_cache_t, net_conf_t, pppd_var_run_t, systemd_passwd_var_run_t. 
Then execute: 
restorecon -v '$FIX_TARGET_PATH'

*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that NetworkManager should be allowed unlink access on the  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 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                system_u:object_r:usr_t:s0
Target Objects                 [ file ]
Source                        NetworkManager
Source Path                   /usr/sbin/NetworkManager
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           NetworkManager-
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-179.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.14.4-200.fc20.x86_64 #1 SMP Tue
                              May 13 13:51:08 UTC 2014 x86_64 x86_64
Alert Count                   340
First Seen                    2014-06-02 22:54:34 AST
Last Seen                     2014-07-29 20:30:59 AST
Local ID                      865974f9-894e-442b-85e3-b99451158113

Raw Audit Messages
type=AVC msg=audit(1406680259.795:460): avc:  denied  { unlink } for  pid=1212 comm="NetworkManager" name="timestamps" dev="sdb2" ino=4983679 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file

type=SYSCALL msg=audit(1406680259.795:460): arch=x86_64 syscall=rename success=no exit=EACCES a0=7f8cbcafe2b0 a1=7f8cbc2354e0 a2=7f8cb7bfc778 a3=3d items=0 ppid=1 pid=1212 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=NetworkManager exe=/usr/sbin/NetworkManager subj=system_u:system_r:NetworkManager_t:s0 key=(null)

Hash: NetworkManager,NetworkManager_t,usr_t,file,unlink

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.14.4-200.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-07-30 07:08:18 UTC
It looks 


is mislabeled in your case. Try to execute

# restorecon -R -v /var/lib/NetworkManager

to see if it fixes labeling.

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