diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-02-01 12:37:51 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-02-01 12:37:51 +0100 |
commit | 7feb2b5737ad110eb3985e8e9d8189f18d1c5147 (patch) | |
tree | dd88a002e3050d0dd6a2f093dffac8132cd5d91a /src/core | |
parent | network: dhcp-server: also refuse link local address to use as the server add... (diff) | |
download | systemd-7feb2b5737ad110eb3985e8e9d8189f18d1c5147.tar.xz systemd-7feb2b5737ad110eb3985e8e9d8189f18d1c5147.zip |
pid1: pass PAM_DATA_SILENT to pam_end() in child
Fixes: #22318
Diffstat (limited to '')
-rw-r--r-- | src/core/execute.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index f2b58303df..be2116e0ec 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1343,7 +1343,9 @@ static int setup_pam( ret = 0; child_finish: - pam_end(handle, pam_code | flags); + /* NB: pam_end() when called in child processes should set PAM_DATA_SILENT to let the module + * know about this. See pam_end(3) */ + (void) pam_end(handle, pam_code | flags | PAM_DATA_SILENT); _exit(ret); } @@ -1378,7 +1380,7 @@ fail: if (close_session) pam_code = pam_close_session(handle, flags); - pam_end(handle, pam_code | flags); + (void) pam_end(handle, pam_code | flags); } strv_free(e); |