Bug 654504
| Summary: | SELinux is preventing /lib/upstart/shutdown "unlink" access on nologin. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | John Griffiths <fedora.jrg01> |
| 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: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | setroubleshoot_trace_hash:ef337a65ccc6c5d1100d3fdddb45730b6a43c06341d0ed88a5f9ab8e3e2c94c6 | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-11-22 09:23:40 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
John Griffiths
2010-11-18 03:23:30 UTC
John, any idea where is this nologin file located? # locate -r /nologin$ Petr, could you look at this bug and also the #652989 bug. Both bugs are related to "nologin" file. /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 +4 shutdown & ... wait one minute # ls -lZ /etc/nologin -rw-r--r--. root root unconfined_u:object_r:shutdown_etc_t:s0 /etc/nologin # shutdown -c shutdown: Shutdown cancelled [1]+ Done shutdown +4 shutdown # ls -lZ /etc/nologin ls: cannot access /etc/nologin: No such file or directory I think we are missing a transition here. Miroslav, we need to add init_system_domain(shutdown_t, shutdown_exec_t) I believe what is happening is some init script is executing shutdown, but not transitioning to shutdown_t. shutdown ends up running as initrc_t and when it creates files in /etc creates them as etc_runtime_t. If we add the shutdown transition, intirc_t -> shutdown_exec_t -> shutdown_t And when shutdown_t creates files in etc_t it will create them as shutdown_etc_t which will work. Sounds reasonably. It was fixed in selinux-policy-3.9.7-12.fc14 |