pid1: when a password is requested during PAMName= processing, query it via the ask-password logic

This commit is contained in:
Lennart Poettering
2025-01-15 00:24:29 +01:00
committed by Luca Boccassi
parent f55a6fc1e3
commit 8af1b296cb
2 changed files with 132 additions and 15 deletions

View File

@@ -770,6 +770,15 @@
changes in the original unit through notification messages. These messages will be considered belonging to the
session scope unit and not the original unit. It is hence not recommended to use <varname>PAMName=</varname> in
combination with <varname>NotifyAccess=</varname><option>all</option>.</para>
<para>If a PAM module interactively requests input (a password or suchlike) it will be attempted to
be read from a service credential (as configured via <varname>SetCredential=</varname>,
<varname>ImportCredential=</varname> and related calls) under the name
<varname>pam.authtok.<replaceable>pamservice</replaceable></varname>, where
<replaceable>pamservice</replaceable> is replaced by the PAM service name as configured with
<varname>PAMName=</varname>. (Note that the credential remains accessible for the runtime of the
service!) If no matching credential is set, the user is prompted for it interactively via the <ulink
url="https://systemd.io/PASSWORD_AGENTS">Password Agent</ulink> logic.</para>
</listitem>
</varlistentry>