]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: do not create /run/nologin if PAM is disabled
authorXi Ruoyao <xry111@mengyan1223.wang>
Sun, 12 May 2019 06:22:11 +0000 (14:22 +0800)
committerLennart Poettering <lennart@poettering.net>
Mon, 13 May 2019 13:35:51 +0000 (15:35 +0200)
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.

tmpfiles.d/meson.build

index b94a9d0f47711d40a8a1b6c519e099afff0d5809..f14b4fc6dffc6e2291a8b5b42709304eef50055a 100644 (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'],