summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGiovanni Bechis <giovanni@paclan.it>2017-08-30 17:59:55 +0200
committerdormando <dormando@rydia.net>2017-11-04 13:07:28 -0700
commit105064c8a6ab98177a73355b72b489e69a2f98e8 (patch)
treef80bfda6484a5bacc1c36dbc7ca94f3843658a5c /configure.ac
parent7f4e0246e5c27baa9a7a690e5905f5ee56b80ece (diff)
downloadmemcached-105064c8a6ab98177a73355b72b489e69a2f98e8.tar.gz
Rework pledge support after seccomp support has been added
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7fa848b..ca51927 100644
--- a/configure.ac
+++ b/configure.ac
@@ -577,8 +577,17 @@ AS_IF([test "x$enable_seccomp" = "xyes" ], [
], [])
])
+AC_CHECK_FUNCS(pledge, [
+ AC_CHECK_HEADER(unistd.h, [
+ AC_DEFINE([HAVE_DROP_PRIVILEGES], 1,
+ [Define this if you have an implementation of drop_privileges()])
+ build_openbsd_privs=yes
+ ], [])
+],[])
+
AM_CONDITIONAL([BUILD_SOLARIS_PRIVS],[test "$build_solaris_privs" = "yes"])
AM_CONDITIONAL([BUILD_LINUX_PRIVS],[test "$build_linux_privs" = "yes"])
+AM_CONDITIONAL([BUILD_OPENBSD_PRIVS],[test "$build_openbsd_privs" = "yes"])
AC_CHECK_HEADER(umem.h, [
AC_DEFINE([HAVE_UMEM_H], 1,