From 0a1d153b256e45d7862235ab0fdaa9e92ae883f2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 23 Sep 2010 18:15:09 -0700 Subject: s3-waf: add check for seteuid method. Thanks to Kai and Metze! Guenther --- source3/wscript | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'source3/wscript') 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 -- cgit