Fedora Account System
Red Hat Associate
Red Hat Customer
Summary: SELinux is preventing NetworkManager (NetworkManager_t) "write" to /var/lib (var_lib_t). Detailed Description: SELinux is preventing NetworkManager (NetworkManager_t) "write" to /var/lib (var_lib_t). The SELinux type var_lib_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 (/var/lib) 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 '/var/lib'. If the file context does not change from var_lib_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 '/var/lib' Fix Command: restorecon '/var/lib' Additional Information: Source Context system_u:system_r:NetworkManager_t:s0 Target Context system_u:object_r:var_lib_t:s0 Target Objects /var/lib [ dir ] Source NetworkManager Source Path /usr/sbin/NetworkManager Port <Unknown> Host (removed) Source RPM Packages NetworkManager-0.7.2-1.fc11 Target RPM Packages filesystem-2.4.21-1.fc11 Policy RPM selinux-policy-3.6.12-91.fc11 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name mislabeled_file Host Name (removed) Platform Linux (removed) 2.6.30.9-102.fc11.x86_64 #1 SMP Fri Dec 4 00:18:53 EST 2009 x86_64 x86_64 Alert Count 1 First Seen Tue 08 Dec 2009 03:54:51 PM PST Last Seen Tue 08 Dec 2009 03:54:51 PM PST Local ID c46cdd39-16a2-43b7-82a2-640f88f1ba6d Line Numbers Raw Audit Messages node=(removed) type=AVC msg=audit(1260316491.301:5): avc: denied { write } for pid=1536 comm="NetworkManager" name="lib" dev=dm-0 ino=114693 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir node=(removed) type=SYSCALL msg=audit(1260316491.301:5): arch=c000003e syscall=83 success=no exit=-13 a0=227dd80 a1=1ed a2=72 a3=7fffb48a8600 items=0 ppid=1535 pid=1536 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 String generated from selinux-policy-3.6.12-91.fc11,mislabeled_file,NetworkManager,NetworkManager_t,var_lib_t,dir,write audit2allow suggests: #============= NetworkManager_t ============== allow NetworkManager_t var_lib_t:dir write;
*** This bug has been marked as a duplicate of bug 538428 ***