From d42d27ead91e470cb12986d928441e56c0f543ca Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 30 Jun 2011 02:18:01 +0200 Subject: logind: add service for per-user shared systemd daemon --- src/pam-module.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3-54-g00ecf