From e5c8cd07eca20d4939edef4a5e500542445f79e1 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 10 Sep 2013 18:24:41 -0400 Subject: util: Use systemd-login to check user sessions Use systemd-lgin in preference to check if the user is logged in or not. Fall back to the old method if no systemd-login support is available at compile time or if it returns a fatal error, and can't determine the status of the user on its own. This will allow to consider a user really active (in order to reuse or refresh crdentials) only if it really is logged into the system, and not just if one of the user's processes is stuck around. Resolves: https://fedorahosted.org/sssd/ticket/2084 --- src/external/systemd.m4 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/external') diff --git a/src/external/systemd.m4 b/src/external/systemd.m4 index 2c26dc19..202915a5 100644 --- a/src/external/systemd.m4 +++ b/src/external/systemd.m4 @@ -6,3 +6,7 @@ AC_DEFUN([AM_CHECK_SYSTEMD], [AC_MSG_ERROR([Could not detect systemd presence])] ) ]) +AM_COND_IF([HAVE_SYSTEMD], + [PKG_CHECK_MODULES([SYSTEMD_LOGIN], [libsystemd-login], + [AC_DEFINE_UNQUOTED(HAVE_SYSTEMD_LOGIN, 1, [Build with libsystemdlogin support])], + [AC_DEFINE_UNQUOTED(HAVE_SYSTEMD_LOGIN, 0, [Build without libsystemd-login support])])]) -- cgit