Summary: SELinux is preventing /bin/login "read" access on nologin. Detailed Description: SELinux denied access requested by login. It is not expected that this access is required by login and this access may signal an intrusion attempt. It is also possible that the specific version or configuration of the application is causing it to require additional access. Allowing Access: You can generate a local policy module to allow this access - see FAQ (http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug report. Additional Information: Source Context system_u:system_r:local_login_t:s0-s0:c0.c1023 Target Context unconfined_u:object_r:shutdown_etc_t:s0 Target Objects nologin [ file ] Source login Source Path /bin/login Port <Unknown> Host (removed) Source RPM Packages util-linux-ng-2.18-4.4.fc14 Target RPM Packages Policy RPM selinux-policy-3.9.7-10.fc14 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name catchall Host Name (removed) Platform Linux (removed) 2.6.35.6-48.fc14.x86_64 #1 SMP Fri Oct 22 15:36:08 UTC 2010 x86_64 x86_64 Alert Count 1 First Seen Sun 14 Nov 2010 01:54:34 AM EET Last Seen Sun 14 Nov 2010 01:54:34 AM EET Local ID 9c7fbb98-283d-42b4-b6c3-3e7974cf266d Line Numbers Raw Audit Messages node=(removed) type=AVC msg=audit(1289692474.813:196): avc: denied { read } for pid=15176 comm="login" name="nologin" dev=dm-0 ino=413446 scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:shutdown_etc_t:s0 tclass=file node=(removed) type=SYSCALL msg=audit(1289692474.813:196): arch=c000003e syscall=2 success=no exit=-13 a0=7fb1600cbc16 a1=0 a2=0 a3=0 items=0 ppid=1 pid=15176 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty3 ses=4294967295 comm="login" exe="/bin/login" subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 key=(null) Hash String generated from catchall,login,local_login_t,shutdown_etc_t,file,read audit2allow suggests: #============= local_login_t ============== allow local_login_t shutdown_etc_t:file read;
Where is this nologin file located? locate -r /nologin$
/sbin/nologin
ls -lZ /sbin/nologin
-rwxr-xr-x. root root system_u:object_r:shell_exec_t:s0 /sbin/nologin
Well I have no idea. find /etc -name nologin If this does not give you a file nologin, then I guess we will have to wait to see if it happens again.
I was almost sure that I should have given you all the nologin files :-) [root@hermes ~]# locate nologin /lib64/security/pam_nologin.so /sbin/nologin /usr/share/doc/pam-1.1.1/html/sag-pam_nologin.html /usr/share/doc/pam-1.1.1/txts/README.pam_nologin /usr/share/man/man5/nologin.5.gz /usr/share/man/man8/nologin.8.gz /usr/share/man/man8/pam_nologin.8.gz The denial appeared to me only two times and I think that it happens when I login to GNOME from GDM, but I'm not sure. I use hibernate a lot, so I don't login very often.
The AVC is specific in stating it is the login program trying to read a file named "nologin" that is labeled shutdown_etc_t. So none of your files match that signature.
/etc/nologin file is created by /sbin/shutdown -> ../lib/upstart/shutdown during shutdown process. It is used by pam_nologin(8) to avoid new users login into the system. # shutdown +5 & ... wait one minute # ls -lZ /etc/nologin -rw-r--r--. root root unconfined_u:object_r:shutdown_etc_t:s0 /etc/nologin Now when you try to login via console you shouldn't be able to login but you are and you can see this AVC: type=AVC msg=audit(1290076367.264:1295): avc: denied { read } for pid=28940 comm="login" name="nologin" dev=dm-0 ino=139761 scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:shutdown_etc_t:s0 tclass=file type=SYSCALL msg=audit(1290076367.264:1295): arch=c000003e syscall=2 success=no exit=-13 a0=7f5580fe8c16 a1=0 a2=0 a3=0 items=0 ppid=1 pid=28940 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 ses=4294967295 comm="login" exe="/bin/login" subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 key=(null)
Now it is clear. Thanks Petr. Cristian, you can allow it for now using # grep local_login_t /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp
files_read_config_files($1) in auth_login_pgm_domain Will fix this.
Fixed in selinux-policy-3.9.7-12.fc14
selinux-policy-3.9.7-12.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-12.fc14
selinux-policy-3.9.7-12.fc14 has been pushed to the Fedora 14 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: https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-12.fc14
selinux-policy-3.9.7-12.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.