From da0da5eccf5f20874111e0681b111704bf9a1c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Sat, 18 Aug 2018 09:29:43 +0200 Subject: [PATCH] pam_systemd: support use in PID namespaces Pass 0 as leader PID to CreateSession to let logind use the PID from the D-Bus credentials. This allows use of pam_systemd in PID namespaces. --- src/login/pam_systemd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index 9d42d1a3bd..8464df122c 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -487,7 +487,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( r = sd_bus_message_append(m, "uusssssussbss", (uint32_t) pw->pw_uid, - (uint32_t) getpid_cached(), + 0, service, type, class,