summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript44
1 files changed, 44 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript
index 54342d5371..5bb8f69640 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -600,6 +600,50 @@ return 0;
if conf.env.with_iconv:
conf.DEFINE('HAVE_ICONV', 1)
+ seteuid = False
+ if not seteuid:
+ seteuid = conf.CHECK_CODE('''
+ #define AUTOCONF_TEST 1
+ #define USE_SETREUID 1
+ #include "./lib/util_sec.c"
+ ''',
+ 'USE_SETREUID',
+ addmain=False,
+ execute=True,
+ msg="Checking whether setreuid is available")
+ if not seteuid:
+ seteuid = conf.CHECK_CODE('''
+ #define AUTOCONF_TEST 1
+ #define USE_SETRESUID 1
+ #include "./lib/util_sec.c"
+ ''',
+ 'USE_SETRESUID',
+ addmain=False,
+ execute=True,
+ msg="Checking whether setresuid is available")
+ if not seteuid:
+ seteuid = conf.CHECK_CODE('''
+ #define AUTOCONF_TEST 1
+ #define USE_SETEUID 1
+ #include "./lib/util_sec.c"
+ ''',
+ 'USE_SETEUID',
+ addmain=False,
+ execute=True,
+ msg="Checking whether seteuid is available")
+ if not seteuid:
+ seteuid = conf.CHECK_CODE('''
+ #define AUTOCONF_TEST 1
+ #define USE_SETUIDX 1
+ #include "./lib/util_sec.c"
+ ''',
+ 'USE_SETUIDX',
+ addmain=False,
+ execute=True,
+ mandatory=True,
+ msg="Checking whether setuidx is available")
+
+
# FIXME: these should be tests for features, but the old build system just
# checks for OSes.
import sys