Bug 652989
| Summary: | SELinux is preventing /bin/login "read" access on nologin. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Cristian Ciupitu <cristian.ciupitu> |
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 14 | CC: | dwalsh, mgrepl, plautrba |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | setroubleshoot_trace_hash:2111d75ea1c9519e98889961543c481eb10a1e7b13ee773c14f23a6e3449601c | ||
| Fixed In Version: | selinux-policy-3.9.7-12.fc14 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-11-21 22:00:59 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Cristian Ciupitu
2010-11-14 00:19:56 UTC
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. |