diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-06-30 02:18:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-06-30 02:18:01 +0200 |
commit | d42d27ead91e470cb12986d928441e56c0f543ca (patch) | |
tree | 1b1ae1f9c579e33915774591ee5768caf7aa12d8 /src | |
parent | e6061ab2afecfaaa0d0797b88f9a4f53720b31ee (diff) |
logind: add service for per-user shared systemd daemon
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); |