pam: use default auth pam_deny.so

run0 doesn't actually use the auth pam stack, since polkit does the
requisite authorization. However, if the service type is left undefined
pam falls back to the definitions of the "other" service, which, at
least in Arch Linux but possibly more, includes pam_warn.so to notify
the user about this apparent error.

This creates a bit of logspam, as systemd does actually call pam_setcred
in its generic pam code, which depends on the auth pam stack, creating a
warning message in the journal on every invocation of run0.

pam_deny.so is a no-op, which avoids falling back to the other pam
service.
This commit is contained in:
Ronan Pigott
2026-06-19 19:51:48 +01:00
committed by Luca Boccassi
parent 99109e0dc7
commit d6aed1dca8
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -8,6 +8,8 @@
{% endif %}
account required pam_unix.so no_pass_expiry
auth required pam_deny.so
{% if HAVE_SELINUX %}
session required pam_selinux.so close
session required pam_selinux.so nottys open
+2
View File
@@ -8,6 +8,8 @@
{% endif %}
account required pam_unix.so
auth required pam_deny.so
{% if HAVE_SELINUX %}
session required pam_selinux.so close
session required pam_selinux.so open