diff options
author | Eric Koegel <eric.koegel@gmail.com> | 2015-07-28 20:13:45 +0300 |
---|---|---|
committer | Eric Koegel <eric.koegel@gmail.com> | 2015-07-28 20:20:15 +0300 |
commit | f864e026e5ebf3a097f82e2e0d4d7b5c956d3a1f (patch) | |
tree | cb49fa217fdcc8e67137b39789ece57a2ff0b558 /configure.ac | |
parent | e5fb2178fb2ac866232e1db738d6357ec0041b35 (diff) | |
download | ConsoleKit2-f864e026e5ebf3a097f82e2e0d4d7b5c956d3a1f.tar.gz |
Add process grouping/tracking
On Linux, this adds an optional dependency on cgmanager to use
cgroups to manage and track processes. This is more reliable and
secure than the XDG_SESSION_COOKIE however it will fall back to
that.
https://github.com/ConsoleKit2/ConsoleKit2/issues/7
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index d768f3f..37a3c63 100644 --- a/configure.ac +++ b/configure.ac @@ -274,6 +274,25 @@ AM_CONDITIONAL(ENABLE_PAM_MODULE, test "x$enable_pam_module" = "xyes") AC_CHECK_LIB(pam_misc, misc_conv, have_linuxpam=yes) AM_CONDITIONAL(HAVE_LINUXPAM, test "x$have_linuxpam" = "xyes") + +# cgroups - Using the kernel to track processes instead of the cookie +have_cgmanager=no +AC_ARG_ENABLE([cgroups], + AS_HELP_STRING([--enable-cgroups], [Enable cgroup support @<:@default=auto@:>@]), + [enable_cgroups=$enableval], + [enable_cgroups=auto]) +AS_IF([test "x$enable_cgroups" != "xno"], [ + PKG_CHECK_MODULES([CGMANAGER], [libcgmanager libnih >= 1.0.2 libnih-dbus >= 1.0.0], [have_cgmanager=yes], [have_cgmanager=no]) + if test "x$enable_cgroups" = "xyes" -a "x$have_cgmanager" = "xno"; then + AC_MSG_ERROR([cgroup support explicitly requested but dependencies not found]) + fi +]) +AS_IF([test "x$have_cgmanager" = "xyes"], [ + AC_DEFINE([HAVE_CGMANAGER], [], [Define if we have cgmanager]) +]) +AM_CONDITIONAL([HAVE_CGMANAGER], [test "x$have_cgmanager" = "xyes"]) +AC_SUBST(HAVE_CGMANAGER) + dnl ------------------------------------------------------------------------------ dnl udev-acl - apply ACLs for users with local forground sessions dnl ------------------------------------------------------------------------------ @@ -553,6 +572,7 @@ echo " PAM module dir: ${PAM_MODULE_DIR} Build PAM module: ${msg_pam_module} Build udev-acl: ${enable_udev_acl} + cgroup support: ${have_cgmanager} Build docs: ${enable_docbook_docs} xinitrc dir: ${XINITRC_DIR} |