From bb59aff1c5425689f4bfb09af9261ee14de580f5 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 4 May 2017 14:35:11 +0200 Subject: [PATCH 4/4] Use pkg-config to detect libselinux and force version >= 2.0.86 https://bugs.freedesktop.org/show_bug.cgi?id=100912 --- NEWS | 5 +++++ configure.ac | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 2fedb977..0f524412 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,11 @@ Fixes: • Fix some integration test issues (fd.o #100686, Simon McVittie) +Dependencies: + +• SELinux support requires at least libselinux 2.0.86 as explicit refcounting + for SID (sidput/sidget) has been removed from the code. + D-Bus 1.11.12 (2017-04-07) == diff --git a/configure.ac b/configure.ac index 6740f517..b05c708b 100644 --- a/configure.ac +++ b/configure.ac @@ -1011,8 +1011,8 @@ if test x$enable_selinux = xno ; then have_selinux=no; else # See if we have SELinux library - AC_CHECK_LIB(selinux, is_selinux_enabled, - have_selinux=yes, have_selinux=no) + PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.0.86], + [have_selinux=yes], [have_selinux=no]) if test x$enable_selinux = xauto ; then if test x$have_selinux = xno ; then @@ -1033,7 +1033,7 @@ if test x$have_selinux = xyes ; then AC_CHECK_FUNC(pthread_create,,[AC_CHECK_LIB(pthread,pthread_create, [SELINUX_THREAD_LIBS="-lpthread"])]) - SELINUX_LIBS="-lselinux $SELINUX_THREAD_LIBS" + SELINUX_LIBS="$SELINUX_LIBS $SELINUX_THREAD_LIBS" AC_DEFINE(HAVE_SELINUX,1,[SELinux support]) else SELINUX_LIBS= -- 2.11.0