Bug 1021270 - SELinux is preventing /usr/sbin/NetworkManager from 'unlink' accesses on the file /etc/resolv.conf.
SELinux is preventing /usr/sbin/NetworkManager from 'unlink' accesses on the ...
Status: CLOSED DUPLICATE of bug 1020429
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-20 17:14 EDT by franck.bailliet
Modified: 2013-10-21 05:26 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-21 05:26:38 EDT
Type: ---
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 franck.bailliet 2013-10-20 17:14:34 EDT
Description of problem:
SELinux is preventing /usr/sbin/NetworkManager from 'unlink' accesses on the file /etc/resolv.conf.

*****  Plugin restorecon (94.8 confidence) suggests  *************************

If vous souhaitez corriger l'étiquette. 
L'étiquette par défaut de /etc/resolv.conf devrait être net_conf_t.
Then vous pouvez exécuter restorecon.
# /sbin/restorecon -v /etc/resolv.conf

*****  Plugin catchall_labels (5.21 confidence) suggests  ********************

If you want to allow NetworkManager to have unlink access on the resolv.conf file
Then l'étiquette sur /etc/resolv.conf doit être modifiée.
# semanage fcontext -a -t FILE_TYPE '/etc/resolv.conf'
où FILE_TYPE est l'une des valeurs suivantes : 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, named_cache_t, net_conf_t, pppd_var_run_t, systemd_passwd_var_run_t. 
Puis exécutez : 
restorecon -v '/etc/resolv.conf'

*****  Plugin catchall (1.44 confidence) suggests  ***************************

If vous pensez que NetworkManager devrait être autorisé à accéder unlink sur resolv.conf file par défaut.
Then vous devriez rapporter ceci en tant qu'anomalie.
Vous pouvez générer un module de stratégie local pour autoriser cet accès.
autoriser cet accès pour le moment en exécutant :
# 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:etc_t:s0
Target Objects                /etc/resolv.conf [ file ]
Source                        NetworkManager
Source Path                   /usr/sbin/NetworkManager
Port                          <Inconnu>
Host                          (removed)
Source RPM Packages           NetworkManager-
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.4.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.1-200.fc19.x86_64 #1 SMP Sat
                              Sep 14 15:04:51 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-09-26 15:16:42 CEST
Last Seen                     2013-10-01 16:21:04 CEST
Local ID                      9c67a69f-9f4b-448b-a529-c5d52c678fcf

Raw Audit Messages
type=AVC msg=audit(1380637264.614:440): avc:  denied  { unlink } for  pid=856 comm="NetworkManager" name="resolv.conf" dev="dm-2" ino=3023963 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file

type=SYSCALL msg=audit(1380637264.614:440): arch=x86_64 syscall=rename success=no exit=EACCES a0=7fcb340a3b90 a1=7fcb340a1e10 a2=7fcb2f67e7d8 a3=19 items=0 ppid=1 pid=856 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=NetworkManager exe=/usr/sbin/NetworkManager subj=system_u:system_r:NetworkManager_t:s0 key=(null)

Hash: NetworkManager,NetworkManager_t,etc_t,file,unlink

Additional info:
reporter:       libreport-2.1.8
hashmarkername: setroubleshoot
kernel:         3.11.4-201.fc19.x86_64
type:           libreport

Potential duplicate: bug 666454
Comment 1 Lukas Vrabec 2013-10-21 05:26:38 EDT

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

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