Description of problem: Rebooting a system creates these SELinux audit errors. audit: type=1400 audit(1457714082.876:319): avc: denied { create } for pid=1409 comm="systemd-user-se" name=".#nologinPFTMyq" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:systemd_logind_var_run_t:s0 tclass=file permissive=1 audit: type=1400 audit(1457714082.876:319): avc: denied { write } for pid=1409 comm="systemd-user-se" path="/run/.#nologinPFTMyq" dev="tmpfs" ino=23392 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:systemd_logind_var_run_t:s0 tclass=file permissive=1 audit: type=1400 audit(1457714083.035:321): avc: denied { setattr } for pid=1409 comm="systemd-user-se" name=".#nologinPFTMyq" dev="tmpfs" ino=23392 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:systemd_logind_var_run_t:s0 tclass=file permissive=1 audit: type=1400 audit(1457714083.117:322): avc: denied { rename } for pid=1409 comm="systemd-user-se" name=".#nologinPFTMyq" dev="tmpfs" ino=23392 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:systemd_logind_var_run_t:s0 tclass=file permissive=1' Version-Release number of selected component (if applicable): systemd-229-5.fc24.x86_64 selinux-policy-targeted-3.13.1-176.fc24.noarch Additional info: This issue was found by the Cockpit integration tests. Full journal dump, including the above AVC's: https://fedorapeople.org/groups/cockpit/logs/pull-3910-d25d3740-verify-fedora-24/backup.NjtciR/TestShutdownRestart-testBasic-10.111.112.103-FAIL.log
Reproduce in Fedora 24 by rebooting the system with 'shutdown -r now'. After reboot I see this in the journal: Mär 14 04:03:49 localhost.localdomain audit[1221]: AVC avc: denied { create } for pid=1221 comm="systemd-user-se" name=".#nologinrlsAS6" scontext=system_u:system Mär 14 04:03:49 localhost.localdomain audit[1221]: SYSCALL arch=c000003e syscall=2 success=no exit=-13 a0=5636b0b17240 a1=800c2 a2=180 a3=7ffcec25401d items=0 ppid= Mär 14 04:03:49 localhost.localdomain audit: PROCTITLE proctitle=2F7573722F6C69622F73797374656D642F73797374656D642D757365722D73657373696F6E730073746F70 Mär 14 04:03:49 localhost.localdomain systemd-user-sessions[1221]: Failed to create /run/nologin: Permission denied
This issue has been fixed before in fedora-23 ... however systemd has changed recently and SELinux is lagging behind on the changes: https://bugzilla.redhat.com/show_bug.cgi?id=1285019
init_t should be an unconfined domain, by default.
I would say we need to create policy for systemd-sessions and make it as unconfined_domain to avoid problems around pam with this daemon.
(In reply to Lukas Vrabec from comment #4) > I would say we need to create policy for systemd-sessions and make it as > unconfined_domain to avoid problems around pam with this daemon. Which can cause really big issues with your system. I agree we should add a new policy and try to make it working correctly.
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.