build: fix waf checks for seteuid on non-Linux platforms
authorMichael Adam <obnox@samba.org>
Wed, 11 Jul 2012 13:39:18 +0000 (15:39 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 11 Jul 2012 15:44:45 +0000 (08:44 -0700)
An indentation error had linux-specific checks called on non-linux
with the effect that "#define USE_LINUX_THREAD_CREDENTIALS 1"
was effective.

source3/wscript

index 12529e5e69a76f8435a4774646e428f559c7a12c..f28cad128bb0e3692945edb44449ac477234f29b 100755 (executable)
@@ -733,6 +733,8 @@ int i; i = PAM_RADIO_TYPE;
             conf.DEFINE('WITH_PAM', 1)
             conf.DEFINE('WITH_PAM_MODULES', 1)
 
+    seteuid = False
+
 #
 # Ensure we select the correct set of system calls on Linux.
 #
@@ -772,10 +774,7 @@ syscall(SYS_setgroups32, 0, NULL);
             'USE_LINUX_32BIT_SYSCALLS',
             msg="Checking whether Linux should use 32-bit credential calls");
 
-    seteuid = False
-
-    if not seteuid:
-       if (conf.CONFIG_SET('USE_LINUX_32BIT_SYSCALLS')):
+        if (conf.CONFIG_SET('USE_LINUX_32BIT_SYSCALLS')):
                seteuid = conf.CHECK_CODE('''
                                 #define AUTOCONF_TEST 1
                                 #define USE_LINUX_THREAD_CREDENTIALS 1
@@ -787,7 +786,7 @@ syscall(SYS_setgroups32, 0, NULL);
                                 addmain=False,
                                 execute=True,
                                 msg="Checking whether we can use Linux thread-specific credentials with 32-bit system calls")
-       else:
+        else:
                seteuid = conf.CHECK_CODE('''
                                 #define AUTOCONF_TEST 1
                                 #define USE_LINUX_THREAD_CREDENTIALS 1