Description of problem: SELinux is preventing nm-system-setti (NetworkManager_t) "unlink" to nm-system-settings.conf (etc_t). Version-Release number of selected component (if applicable): selinux-policy-3.6.12-91.fc11 How reproducible: once Steps to Reproduce: 1.livecd-creator with fc11 desktop 2.livecd-iso-to-disk 3.boot, login to desktop, change nm settings. Actual results: avc Expected results: no avc Additional info: Summary: SELinux is preventing nm-system-setti (NetworkManager_t) "unlink" to nm-system-settings.conf (etc_t). Detailed Description: SELinux is preventing nm-system-setti (NetworkManager_t) "unlink" to nm-system-settings.conf (etc_t). The SELinux type etc_t, is a generic type for all files in the directory and very few processes (SELinux Domains) are allowed to write to this SELinux type. This type of denial usual indicates a mislabeled file. By default a file created in a directory has the gets the context of the parent directory, but SELinux policy has rules about the creation of directories, that say if a process running in one SELinux Domain (D1) creates a file in a directory with a particular SELinux File Context (F1) the file gets a different File Context (F2). The policy usually allows the SELinux Domain (D1) the ability to write, unlink, and append on (F2). But if for some reason a file (nm-system-settings.conf) was created with the wrong context, this domain will be denied. The usual solution to this problem is to reset the file context on the target file, restorecon -v 'nm-system-settings.conf'. If the file context does not change from etc_t, then this is probably a bug in policy. Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against the selinux-policy package. If it does change, you can try your application again to see if it works. The file context could have been mislabeled by editing the file or moving the file from a different directory, if the file keeps getting mislabeled, check the init scripts to see if they are doing something to mislabel the file. Allowing Access: You can attempt to fix file context by executing restorecon -v 'nm-system-settings.conf' Fix Command: restorecon 'nm-system-settings.conf' Additional Information: Source Context system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 Target Context system_u:object_r:etc_t:s0 Target Objects nm-system-settings.conf [ file ] Source nm-system-setti Source Path /usr/sbin/nm-system-settings Port <Unknown> Host localhost.localdomain Source RPM Packages NetworkManager-0.7.2-1.fc11 Target RPM Packages Policy RPM selinux-policy-3.6.12-91.fc11 Selinux Enabled True Policy Type targeted MLS Enabled True Enforcing Mode Enforcing Plugin Name mislabeled_file Host Name localhost.localdomain Platform Linux localhost.localdomain 2.6.30.9-102.fc11.i586 #1 SMP Thu Dec 3 23:46:37 EST 2009 i686 i686 Alert Count 1 First Seen Thu 10 Dec 2009 04:07:11 PM EST Last Seen Thu 10 Dec 2009 04:07:11 PM EST Local ID c5ebff01-3874-4284-a531-18783e97e95d Line Numbers Raw Audit Messages node=localhost.localdomain type=AVC msg=audit(1260479231.228:38688): avc: denied { unlink } for pid=2236 comm="nm-system-setti" name="nm-system-settings.conf" dev=dm-0 ino=35797 scontext=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=file node=localhost.localdomain type=SYSCALL msg=audit(1260479231.228:38688): arch=40000003 syscall=38 success=no exit=-13 a0=93a0cb8 a1=9396528 a2=5431a4 a3=b78406e0 items=0 ppid=1 pid=2236 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nm-system-setti" exe="/usr/sbin/nm-system-settings" subj=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 key=(null)
Miroslav, you need /var/lib/NetworkManager labeled ASAP.
The labeling for /var/lib/NetworkManager directory was added to selinux-policy-3.6.12-92.fc11. Should be available from updates-testing now. yum update --enablerepo=updates-testing selinux-policy-targeted
Changing NM settings now results in this avc, and the suggested restorecon does nothing.... Summary: SELinux is preventing nm-system-setti (NetworkManager_t) "unlink" to /etc/NetworkManager/nm-system-settings.conf (etc_t). Detailed Description: SELinux is preventing nm-system-setti (NetworkManager_t) "unlink" to /etc/NetworkManager/nm-system-settings.conf (etc_t). The SELinux type etc_t, is a generic type for all files in the directory and very few processes (SELinux Domains) are allowed to write to this SELinux type. This type of denial usual indicates a mislabeled file. By default a file created in a directory has the gets the context of the parent directory, but SELinux policy has rules about the creation of directories, that say if a process running in one SELinux Domain (D1) creates a file in a directory with a particular SELinux File Context (F1) the file gets a different File Context (F2). The policy usually allows the SELinux Domain (D1) the ability to write, unlink, and append on (F2). But if for some reason a file (/etc/NetworkManager/nm-system-settings.conf) was created with the wrong context, this domain will be denied. The usual solution to this problem is to reset the file context on the target file, restorecon -v '/etc/NetworkManager/nm-system-settings.conf'. If the file context does not change from etc_t, then this is probably a bug in policy. Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against the selinux-policy package. If it does change, you can try your application again to see if it works. The file context could have been mislabeled by editing the file or moving the file from a different directory, if the file keeps getting mislabeled, check the init scripts to see if they are doing something to mislabel the file. Allowing Access: You can attempt to fix file context by executing restorecon -v '/etc/NetworkManager/nm-system-settings.conf' Fix Command: restorecon '/etc/NetworkManager/nm-system-settings.conf' Additional Information: Source Context system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 Target Context system_u:object_r:etc_t:s0 Target Objects /etc/NetworkManager/nm-system-settings.conf [ file ] Source nm-system-setti Source Path /usr/sbin/nm-system-settings Port <Unknown> Host jerry-opti755 Source RPM Packages NetworkManager-0.7.2-1.fc11 Target RPM Packages NetworkManager-0.7.2-1.fc11 Policy RPM selinux-policy-3.6.12-92.fc11 Selinux Enabled True Policy Type targeted MLS Enabled True Enforcing Mode Enforcing Plugin Name mislabeled_file Host Name jerry-opti755 Platform Linux jerry-opti755 2.6.30.10-105.fc11.x86_64 #1 SMP Thu Dec 24 16:41:51 UTC 2009 x86_64 x86_64 Alert Count 2 First Seen Mon 07 Dec 2009 02:47:01 PM CST Last Seen Mon 28 Dec 2009 02:56:03 PM CST Local ID f00c90aa-4012-43f7-b4b6-01fd5b56dfdc Line Numbers Raw Audit Messages node=jerry-opti755 type=AVC msg=audit(1262033763.947:29161): avc: denied { unlink } for pid=1609 comm="nm-system-setti" name="nm-system-settings.conf" dev=dm-1 ino=106852 scontext=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=file node=jerry-opti755 type=SYSCALL msg=audit(1262033763.947:29161): arch=c000003e syscall=82 success=no exit=-13 a0=202c9e0 a1=201b250 a2=206a860 a3=1 items=0 ppid=1 pid=1609 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nm-system-setti" exe="/usr/sbin/nm-system-settings" subj=system_u:system_r:NetworkManager_t:s0-s0:c0.c1023 key=(null)
Does this package have the label /etc/NetworkManager(/.*)? system_u:object_r:NetworkManager_var_lib_t:s0
(In reply to comment #4) > Does this package have the label > /etc/NetworkManager(/.*)? system_u:object_r:NetworkManager_var_lib_t:s0 Is that directed toward anyone in general, or just Miroslav?
Miroslav can answer it. Jerry, What does matchpathcon /etc/NetworkManager Return?
Ok, my mistake. I have added only labeling for /var/lib/NetworkManager directory. Jerry thanks for check.
Fixed in selinux-policy-3.6.12-93.fc11
selinux-policy-3.6.12-93.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/selinux-policy-3.6.12-93.fc11
selinux-policy-3.6.12-93.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2010-0446
selinux-policy-3.6.12-93.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.