summaryrefslogtreecommitdiffstats
path: root/src/login/pam_systemd.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-08-19 15:15:13 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-19 21:05:03 +0100
commitfbcb630045f9d13d6d4b16ba376b0cf27bf1e2d5 (patch)
treec493e8cbe9a61e6e3d55588edb22776505f77f34 /src/login/pam_systemd.c
parentMerge pull request #14078 from poettering/cryptsetup-fixlets (diff)
downloadsystemd-fbcb630045f9d13d6d4b16ba376b0cf27bf1e2d5.tar.xz
systemd-fbcb630045f9d13d6d4b16ba376b0cf27bf1e2d5.zip
pam_systemd: prolong method call timeout when allocating session
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
Diffstat (limited to '')
-rw-r--r--src/login/pam_systemd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
index 5de31a9a27..aa6e5ea7ac 100644
--- a/src/login/pam_systemd.c
+++ b/src/login/pam_systemd.c
@@ -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)