]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pam_systemd: support use in PID namespaces
authorJürg Billeter <j@bitron.ch>
Sat, 18 Aug 2018 07:29:43 +0000 (09:29 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 10 Sep 2018 17:04:21 +0000 (19:04 +0200)
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

index 9d42d1a3bd2fd12cce85894f405cc98f971fe743..8464df122c403f4373bce752ba652372f80380f5 100644 (file)
@@ -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,