chiark / gitweb /
systemctl: tweak output of Listen: fields a bit
[elogind.git] / src / login / pam-module.c
index 88b0ef9e4503448565a40012cef1cb80e70ce89e..0d4f7991e7a6617b247497744788156f62366ad8 100644 (file)
@@ -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"
@@ -41,6 +39,7 @@
 #include "dbus-common.h"
 #include "def.h"
 #include "socket-util.h"
+#include "fileio.h"
 
 static int parse_argv(pam_handle_t *handle,
                       int argc, const char **argv,
@@ -347,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,