Commit e72acff4 authored by Michael Biebl's avatar Michael Biebl

Start logind on demand via libpam-systemd

Don't make pam_sm_open_session() a NOP if logind is not running. Trying
to access logind via D-Bus will start it on demand.
parent eb4468c5
......@@ -336,10 +336,6 @@ _public_ PAM_EXTERN int pam_sm_open_session(
/* pam_syslog(handle, LOG_INFO, "pam-systemd initializing"); */
/* Make this a NOP on non-logind systems */
if (!logind_running())
return PAM_SUCCESS;
if (parse_argv(handle,
argc, argv,
&controllers, &reset_controllers,
......@@ -400,7 +396,8 @@ _public_ PAM_EXTERN int pam_sm_open_session(
bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error);
if (!bus) {
pam_syslog(handle, LOG_ERR, "Failed to connect to system bus: %s", bus_error_message(&error));
if (debug)
pam_syslog(handle, LOG_ERR, "Failed to connect to system bus: %s", bus_error_message(&error));
r = PAM_SESSION_ERR;
goto finish;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment