summaryrefslogtreecommitdiffstats
path: root/src/core/execute.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-02-01 12:37:51 +0100
committerLennart Poettering <lennart@poettering.net>2022-02-01 12:37:51 +0100
commit7feb2b5737ad110eb3985e8e9d8189f18d1c5147 (patch)
treedd88a002e3050d0dd6a2f093dffac8132cd5d91a /src/core/execute.c
parentnetwork: dhcp-server: also refuse link local address to use as the server add... (diff)
downloadsystemd-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.c6
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);