Hide Forgot
libreport version: 2.0.8 executable: /usr/bin/python hashmarkername: setroubleshoot kernel: 3.1.6-1.fc16.x86_64 reason: SELinux is preventing /bin/bash from 'write' accesses on the file resolv.conf. time: Tue 27 Dec 2011 22:00:17 GMT description: :SELinux is preventing /bin/bash from 'write' accesses on the file resolv.conf. : :***** Plugin catchall_labels (83.8 confidence) suggests ******************** : :If you want to allow bash to have write access on the resolv.conf file :Then you need to change the label on resolv.conf :Do :# semanage fcontext -a -t FILE_TYPE 'resolv.conf' :where FILE_TYPE is one of the following: dhcpc_tmp_t, user_cron_spool_t, dhcpc_t, afs_cache_t, dhcpc_state_t, proc_xen_t, puppet_tmp_t, initrc_var_run_t, dhcpc_var_run_t, net_conf_t, root_t. :Then execute: :restorecon -v 'resolv.conf' : : :***** Plugin catchall (17.1 confidence) suggests *************************** : :If you believe that bash should be allowed write 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 dhclient-script /var/log/audit/audit.log | audit2allow -M mypol :# semodule -i mypol.pp : :Additional Information: :Source Context system_u:system_r:dhcpc_t:s0 :Target Context unconfined_u:object_r:etc_t:s0 :Target Objects resolv.conf [ file ] :Source dhclient-script :Source Path /bin/bash :Port <Unknown> :Host (removed) :Source RPM Packages bash-4.2.20-1.fc16 :Target RPM Packages :Policy RPM selinux-policy-3.10.0-67.fc16 :Selinux Enabled True :Policy Type targeted :Enforcing Mode Permissive :Host Name (removed) :Platform Linux frank01.frankly3d.local 3.1.6-1.fc16.x86_64 : #1 SMP Wed Dec 21 22:41:17 UTC 2011 x86_64 x86_64 :Alert Count 1 :First Seen Tue 27 Dec 2011 21:53:50 GMT :Last Seen Tue 27 Dec 2011 21:53:50 GMT :Local ID 7e1db65e-d55a-464d-9394-e46ea92600d2 : :Raw Audit Messages :type=AVC msg=audit(1325022830.611:155): avc: denied { write } for pid=4772 comm="dhclient-script" name="resolv.conf" dev=dm-2 ino=56105 scontext=system_u:system_r:dhcpc_t:s0 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file : : :type=SYSCALL msg=audit(1325022830.611:155): arch=x86_64 syscall=open success=yes exit=ESRCH a0=17fd350 a1=241 a2=1b6 a3=11 items=0 ppid=4750 pid=4772 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=dhclient-script exe=/bin/bash subj=system_u:system_r:dhcpc_t:s0 key=(null) : :Hash: dhclient-script,dhcpc_t,etc_t,file,write : :audit2allow : :#============= dhcpc_t ============== :allow dhcpc_t etc_t:file write; : :audit2allow -R : :#============= dhcpc_t ============== :allow dhcpc_t etc_t:file write; :
Reported as am uncertain if bash requires this access?
If you read the alert, it told you how to fix this. restorecon /etc/resolv.conf Now the question is how did it get mislabeled? Did you do something special to create this file?
(In reply to comment #2) > If you read the alert, it told you how to fix this. > > restorecon /etc/resolv.conf so it's required access. > > Now the question is how did it get mislabeled? > > Did you do something special to create this file? "service network restart"
Yes, it is required access. How is /etc/resolv.conf labeled now? # ls -Z /etc/resolv.conf
ls -Z /etc/resolv.conf -rw-r--r--. root root system_u:object_r:net_conf_t:s0 /etc/resolv.conf
Ok, reopen the bug if this happens again.