From 105064c8a6ab98177a73355b72b489e69a2f98e8 Mon Sep 17 00:00:00 2001 From: Giovanni Bechis Date: Wed, 30 Aug 2017 17:59:55 +0200 Subject: Rework pledge support after seccomp support has been added --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') 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, -- cgit v1.2.1