diff options
author | Martin Pitt <martinpitt@gnome.org> | 2013-03-26 11:36:31 +0100 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2013-04-05 18:16:58 +0200 |
commit | 79d860fe78ff9e53fe3150fb55a8a8b03c4f6470 (patch) | |
tree | 1905740de9ce74a2006ee23dda5549c0efd81a34 /src/login/pam-module.c | |
parent | 9e542e0b3a5069f340072c93b5d2283848a42a2e (diff) |
PAM, uaccess: check for logind, not for systemd
It is possible to build systemd without logind or run logind without systemd
init. Commit 66e41181 fixed sd_booted() to only succeed for systemd init; with
that, testing for systemd init is wrong in the parts that talk to logind.
In particular, this affects the PAM module and the "uaccess" udev builtin.
Change sd_booted() to a new logind_running() which tests for
/run/systemd/seats/.
For details, see:
<https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html>
https://bugs.freedesktop.org/show_bug.cgi?id=62754
Diffstat (limited to 'src/login/pam-module.c')
-rw-r--r-- | src/login/pam-module.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/login/pam-module.c b/src/login/pam-module.c index 702095e5e6..0d4f7991e7 100644 --- a/src/login/pam-module.c +++ b/src/login/pam-module.c @@ -32,8 +32,6 @@ #include <security/pam_ext.h> #include <security/pam_misc.h> -#include <systemd/sd-daemon.h> - #include "util.h" #include "audit.h" #include "macro.h" @@ -348,8 +346,8 @@ _public_ PAM_EXTERN int pam_sm_open_session( /* pam_syslog(handle, LOG_INFO, "pam-systemd initializing"); */ - /* Make this a NOP on non-systemd systems */ - if (sd_booted() <= 0) + /* Make this a NOP on non-logind systems */ + if (!logind_running()) return PAM_SUCCESS; if (parse_argv(handle, |