diff options
author | Kay Sievers <kay@vrfy.org> | 2015-07-07 19:43:28 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2015-07-07 19:43:28 +0200 |
commit | 9a50ce20ef60263a6c88c29470ce761fcc424f2d (patch) | |
tree | f3854bb3a4703a39aedff451b874e7cf9e53c699 /src/login/pam_systemd.c | |
parent | 680198d6a1ec08938fff1676cc5476125a0e9581 (diff) | |
parent | b80120c4cba7d134b5437a58437a23fdf7ab2084 (diff) |
Merge pull request #509 from dvdhrm/logindsystemd/v222
logind: fix CreateSession for lightdm
Diffstat (limited to 'src/login/pam_systemd.c')
-rw-r--r-- | src/login/pam_systemd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index 2f390237dc..f83d18b035 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -31,6 +31,7 @@ #include <security/pam_ext.h> #include <security/pam_misc.h> +#include "bus-common-errors.h" #include "util.h" #include "audit.h" #include "macro.h" @@ -399,8 +400,13 @@ _public_ PAM_EXTERN int pam_sm_open_session( remote_host, 0); if (r < 0) { - pam_syslog(handle, LOG_ERR, "Failed to create session: %s", bus_error_message(&error, r)); - return PAM_SYSTEM_ERR; + if (sd_bus_error_has_name(&error, BUS_ERROR_SESSION_BUSY)) { + pam_syslog(handle, LOG_DEBUG, "Cannot create session: %s", bus_error_message(&error, r)); + return PAM_SUCCESS; + } else { + pam_syslog(handle, LOG_ERR, "Failed to create session: %s", bus_error_message(&error, r)); + return PAM_SYSTEM_ERR; + } } r = sd_bus_message_read(reply, |