tmpfiles: do not create /run/nologin if PAM is disabled

If systemd is not built with PAM support, systemd-user-sessions.service
won't be built.  On systems without PAM, /run/nologin is useless.  On
systems with PAM but systemd is not built with PAM, /run/nologin won't
be removed and all unprivileged users can't login.

So, we should not create /run/nologin if systemd is built without PAM.
This commit is contained in:
Xi Ruoyao 2019-05-12 14:22:11 +08:00 committed by Lennart Poettering
parent ccc162e03c
commit a45ef5070d
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ enable_tmpfiles = conf.get('ENABLE_TMPFILES') == 1
tmpfiles = [['home.conf', ''],
['journal-nocow.conf', ''],
['systemd-nologin.conf', ''],
['systemd-nologin.conf', 'HAVE_PAM'],
['systemd-nspawn.conf', 'ENABLE_MACHINED'],
['systemd-tmp.conf', ''],
['portables.conf', 'ENABLE_PORTABLED'],