From 8fe51939ad74f86f7d2e7256d01cb46bd6e5b403 Mon Sep 17 00:00:00 2001 From: Tyler Hicks Date: Tue, 1 Sep 2015 20:53:52 -0500 Subject: * Generate login and logout events that can be used by the Linux Audit tools such as aulast and aureport (LP: #1319278) (LP: #1478087) - Link against libaudit and log AUDIT_USER_LOGIN and AUDIT_USER_LOGOUT events after appending entries to the wtmp file. These events go to the audit log and can then be consumed by the Linux Audit tools. - debian/control: Add libaudit-dev to Build-Depends - debian/lightdm.pam, debian/lightdm-autologin.pam: Set the loginuid for the process that is authenticating. This allows for the UID to be properly set when AUDIT_USER_LOGIN and AUDIT_USER_LOGOUT events are logged. --- configure.ac | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 83a72f98..47397e23 100644 --- a/configure.ac +++ b/configure.ac @@ -129,6 +129,23 @@ if test x"$enable_liblightdm_qt5" != "xno"; then fi AM_CONDITIONAL(COMPILE_LIBLIGHTDM_QT5, test x"$compile_liblightdm_qt5" != "xno") +AC_ARG_ENABLE([audit], + AS_HELP_STRING([--enable-audit], + [Enable audit logging of login and logout events [[default=auto]]]), + [enable_audit=$enableval], + [enable_audit=auto]) +if test x"$enable_audit" != "xno"; then + AC_CHECK_LIB([audit], [audit_log_user_message], + [AC_DEFINE(HAVE_LIBAUDIT, 1, [libaudit support]) + LIGHTDM_LIBS="${LIGHTDM_LIBS} -laudit" + ], + [if test "x$enable_audit" != xauto; then + AC_MSG_FAILURE( + [--enable-audit was given, but test for libaudit failed]) + fi + ]) +fi + AC_MSG_CHECKING(whether to build tests) AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests], [Disable tests building]), -- cgit v1.2.1