summaryrefslogtreecommitdiffstats
path: root/src/external
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-09-10 18:24:41 -0400
committerSimo Sorce <simo@redhat.com>2013-09-11 09:17:41 -0400
commite5c8cd07eca20d4939edef4a5e500542445f79e1 (patch)
tree16fc5b387c829d3e72c01fb834cdad9f302e4035 /src/external
parentfbc419b2eb101c7491324499a698b6bdcb14ad43 (diff)
downloadsssd-logind.tar.gz
sssd-logind.tar.xz
sssd-logind.zip
util: Use systemd-login to check user sessionslogind
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
Diffstat (limited to 'src/external')
-rw-r--r--src/external/systemd.m44
1 files changed, 4 insertions, 0 deletions
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])])])