]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pam_systemd: prolong method call timeout when allocating session
authorLennart Poettering <lennart@poettering.net>
Mon, 19 Aug 2019 13:15:13 +0000 (15:15 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 19 Nov 2019 20:05:03 +0000 (21:05 +0100)
Starting a session might involve starting the user@.service instance,
hence let's make the bus call timeout substantially longer.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83828
src/login/pam_systemd.c

index 5de31a9a27e2fd2d78388e7014d373632b54cfdf..aa6e5ea7aca847dc76439f32b88b7a12e5f84646 100644 (file)
@@ -36,6 +36,8 @@
 #include "strv.h"
 #include "terminal-util.h"
 
+#define LOGIN_SLOW_BUS_CALL_TIMEOUT_USEC (2*USEC_PER_MINUTE)
+
 static int parse_argv(
                 pam_handle_t *handle,
                 int argc, const char **argv,
@@ -653,7 +655,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
                 return PAM_SYSTEM_ERR;
         }
 
-        r = sd_bus_call(bus, m, 0, &error, &reply);
+        r = sd_bus_call(bus, m, LOGIN_SLOW_BUS_CALL_TIMEOUT_USEC, &error, &reply);
         if (r < 0) {
                 if (sd_bus_error_has_name(&error, BUS_ERROR_SESSION_BUSY)) {
                         if (debug)