diff options
author | Günther Deschner <gd@samba.org> | 2010-09-23 18:15:09 -0700 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-09-23 18:15:09 -0700 |
commit | 0a1d153b256e45d7862235ab0fdaa9e92ae883f2 (patch) | |
tree | c8601db9d9e9dd6c616971162d526c059d8c8104 | |
parent | 00be7ea4130955021704066401f6d47bd1c717e7 (diff) | |
download | samba-0a1d153b256e45d7862235ab0fdaa9e92ae883f2.tar.gz samba-0a1d153b256e45d7862235ab0fdaa9e92ae883f2.tar.bz2 samba-0a1d153b256e45d7862235ab0fdaa9e92ae883f2.zip |
s3-waf: add check for seteuid method.
Thanks to Kai and Metze!
Guenther
-rw-r--r-- | source3/wscript | 44 |
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 |