summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-09-02 14:39:25 +0200
committerBenBE <BenBE@geshi.org>2021-01-11 20:19:51 +0100
commitf4404effa45ce378a8a72f2fff9641c7d7a0cc6f (patch)
tree742f042db6c21e5c2203bceb4a88c5b50bf744a8 /configure.ac
parentd72b0a682ecad0a8d5793022733447e855a61798 (diff)
Add option to drop Linux capabilities
Conflicts with setuid support, but that is commonly not enabled.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 227f6b14..1feeb0fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -307,6 +307,13 @@ if test "x$enable_setuid" = xyes; then
AC_DEFINE(HAVE_SETUID_ENABLED, 1, [Define if setuid support should be enabled.])
fi
+AC_ARG_WITH(capabilities, [AS_HELP_STRING([--with-capabilities], [Enable option to drop Linux capabilities via libcap])],, with_capabilities="no")
+if test "x$with_capabilities" = xyes
+then
+ AC_CHECK_LIB([cap], [cap_init], [], [missing_libraries="$missing_libraries libcap"])
+ AC_CHECK_HEADERS([sys/capability.h], [:], [missing_headers="$missing_headers $ac_header"])
+fi
+
AC_ARG_ENABLE(delayacct, [AS_HELP_STRING([--enable-delayacct], [enable Linux delay accounting])],, enable_delayacct="no")
if test "x$enable_delayacct" = xyes; then
m4_ifdef([PKG_PROG_PKG_CONFIG], [
@@ -408,6 +415,7 @@ AC_MSG_RESULT([
(Linux) affinity: $enable_linux_affinity
(Linux) delay accounting: $enable_delayacct
(Linux) sensors: $with_sensors
+ (Linux) capabilities: $with_capabilities
unicode: $enable_unicode
hwloc: $enable_hwloc
setuid: $enable_setuid

© 2014-2024 Faster IT GmbH | imprint | privacy policy