diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pam-module.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pam-module.c b/src/pam-module.c index a15b4cae1c..178c46940c 100644 --- a/src/pam-module.c +++ b/src/pam-module.c @@ -361,6 +361,13 @@ _public_ PAM_EXTERN int pam_sm_open_session( if (sd_booted() <= 0) return PAM_SUCCESS; + /* Make sure we don't enter a loop by talking to + * systemd-logind when it is actually waiting for the + * background to finish start-up, */ + pam_get_item(handle, PAM_SERVICE, (const void**) &service); + if (streq_ptr(service, "systemd-shared")) + return PAM_SUCCESS; + if (parse_argv(handle, argc, argv, &controllers, &reset_controllers, @@ -401,7 +408,6 @@ _public_ PAM_EXTERN int pam_sm_open_session( uid = pw->pw_uid; pid = getpid(); - pam_get_item(handle, PAM_SERVICE, (const void**) &service); pam_get_item(handle, PAM_XDISPLAY, (const void**) &display); pam_get_item(handle, PAM_TTY, (const void**) &tty); pam_get_item(handle, PAM_RUSER, (const void**) &remote_user); |