summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-03-16 13:24:48 -0400
committerAdam Jackson <ajax@redhat.com>2009-03-16 13:24:48 -0400
commit3992dd38caf33b343affd8d732c94880d1099dcf (patch)
treef126747b1b9225c905fd4334fab36c675f2f0688 /configure.ac
parentxfree86: remove a superfluous assignment. (diff)
downloadxserver-master.tar.gz
xserver-master.tar.bz2
xserver-master.zip
selinux: Add support for avc_acquire_netlink_fd()HEADmaster
Requires libselinux 2.0.79 or newer. Without this, libselinux will check for policy updates on the netlink socket on basically every policy lookup. Statistically speaking, they never happen, and the check translates to at least one more syscall on basically every operation. Instead, take control of the fd from the library, and check it in WakeupHandler if it polls readable.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f68843f03..f4e1dbb04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -940,6 +940,10 @@ if test "x$XSELINUX" = xyes; then
AC_CHECK_LIB(selinux, avc_init, [], AC_MSG_ERROR([SELinux library not found]))
AC_CHECK_HEADERS([libaudit.h], [], AC_MSG_ERROR([SELinux extension requires audit system headers]))
AC_CHECK_LIB(audit, audit_open, [], AC_MSG_ERROR([SELinux extension requires audit system library]))
+ AC_CHECK_DECL(avc_netlink_acquire_fd,
+ [AC_DEFINE(HAVE_AVC_NETLINK_ACQUIRE_FD, 1, "Have avc_netlink_acquire_fd")],
+ [],
+ [#include <selinux/avc.h>])
AC_DEFINE(XSELINUX, 1, [Build SELinux extension])
SELINUX_LIB="-lselinux -laudit"
fi