summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-06-29 13:46:23 -0700
committerJeremy Allison <jra@samba.org>2012-06-30 00:32:36 +0200
commitf81fd1ccc3228bf06455ad4c3265b71ca17ae407 (patch)
treed09aed8da40fb158d599f5fffc6b7765734f91ca /source3
parentd91bf0d42863c996df5bf3c0d57e329d7a58a6af (diff)
downloadsamba-f81fd1ccc3228bf06455ad4c3265b71ca17ae407.tar.gz
samba-f81fd1ccc3228bf06455ad4c3265b71ca17ae407.tar.bz2
samba-f81fd1ccc3228bf06455ad4c3265b71ca17ae407.zip
Try and fix the autoconf build on Solaris/Nexenta/etc.
Their AC_TRY_RUN doesn't include any current CPPFLAGS. Make the set[res]uid checks independent of this. Needs a small change to the waf build in order to code with the change. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 30 00:32:36 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in6
-rw-r--r--source3/lib/util_sec.c3
-rwxr-xr-xsource3/wscript5
3 files changed, 10 insertions, 4 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 483072f0f5..a9640d87e3 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2773,7 +2773,7 @@ AC_CACHE_CHECK([for Linux thread-specific credentials],samba_cv_USE_LINUX_THREAD
AC_TRY_RUN([
#define AUTOCONF_TEST 1
#define USE_LINUX_THREAD_CREDENTIALS 1
-#include "confdefs.h"
+#include "${srcdir-.}/../lib/util/setid.c"
#include "${srcdir-.}/lib/util_sec.c"],
samba_cv_USE_LINUX_THREAD_CREDENTIALS=yes,samba_cv_USE_LINUX_THREAD_CREDENTIALS=no,samba_cv_USE_LINUX_THREAD_CREDENTIALS=cross)])
if test x"$samba_cv_USE_LINUX_THREAD_CREDENTIALS" = x"yes"; then
@@ -2789,6 +2789,7 @@ AC_TRY_RUN([
#define AUTOCONF_TEST 1
#define USE_SETREUID 1
#include "confdefs.h"
+#include "${srcdir-.}/../lib/util/setid.c"
#include "${srcdir-.}/lib/util_sec.c"],
samba_cv_USE_SETREUID=yes,samba_cv_USE_SETREUID=no,samba_cv_USE_SETREUID=cross)])
if test x"$samba_cv_USE_SETREUID" = x"yes"; then
@@ -2804,6 +2805,7 @@ AC_TRY_RUN([
#define AUTOCONF_TEST 1
#define USE_SETRESUID 1
#include "confdefs.h"
+#include "${srcdir-.}/../lib/util/setid.c"
#include "${srcdir-.}/lib/util_sec.c"],
samba_cv_USE_SETRESUID=yes,samba_cv_USE_SETRESUID=no,samba_cv_USE_SETRESUID=cross)])
if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
@@ -2817,6 +2819,7 @@ AC_TRY_RUN([
#define AUTOCONF_TEST 1
#define USE_SETEUID 1
#include "confdefs.h"
+#include "${srcdir-.}/../lib/util/setid.c"
#include "${srcdir-.}/lib/util_sec.c"],
samba_cv_USE_SETEUID=yes,samba_cv_USE_SETEUID=no,samba_cv_USE_SETEUID=cross)])
if test x"$samba_cv_USE_SETEUID" = x"yes"; then
@@ -2830,6 +2833,7 @@ AC_TRY_RUN([
#define AUTOCONF_TEST 1
#define USE_SETUIDX 1
#include "confdefs.h"
+#include "${srcdir-.}/../lib/util/setid.c"
#include "${srcdir-.}/lib/util_sec.c"],
samba_cv_USE_SETUIDX=yes,samba_cv_USE_SETUIDX=no,samba_cv_USE_SETUIDX=cross)])
if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c
index cee11d9f96..11d85a102a 100644
--- a/source3/lib/util_sec.c
+++ b/source3/lib/util_sec.c
@@ -40,9 +40,6 @@
#include <sys/id.h>
#endif
-/* In autoconf/test mode include the definitions of samba_setXXX. */
-#include "../lib/util/setid.c"
-
#define DEBUG(x, y) printf y
#define smb_panic(x) exit(1)
#define bool int
diff --git a/source3/wscript b/source3/wscript
index 449bf20e05..cc05095c25 100755
--- a/source3/wscript
+++ b/source3/wscript
@@ -733,6 +733,7 @@ int i; i = PAM_RADIO_TYPE;
seteuid = conf.CHECK_CODE('''
#define AUTOCONF_TEST 1
#define USE_LINUX_THREAD_CREDENTIALS 1
+ #include "../lib/util/setid.c"
#include "./lib/util_sec.c"
''',
'USE_LINUX_THREAD_CREDENTIALS',
@@ -743,6 +744,7 @@ int i; i = PAM_RADIO_TYPE;
seteuid = conf.CHECK_CODE('''
#define AUTOCONF_TEST 1
#define USE_SETREUID 1
+ #include "../lib/util/setid.c"
#include "./lib/util_sec.c"
''',
'USE_SETREUID',
@@ -753,6 +755,7 @@ int i; i = PAM_RADIO_TYPE;
seteuid = conf.CHECK_CODE('''
#define AUTOCONF_TEST 1
#define USE_SETRESUID 1
+ #include "../lib/util/setid.c"
#include "./lib/util_sec.c"
''',
'USE_SETRESUID',
@@ -763,6 +766,7 @@ int i; i = PAM_RADIO_TYPE;
seteuid = conf.CHECK_CODE('''
#define AUTOCONF_TEST 1
#define USE_SETEUID 1
+ #include "../lib/util/setid.c"
#include "./lib/util_sec.c"
''',
'USE_SETEUID',
@@ -773,6 +777,7 @@ int i; i = PAM_RADIO_TYPE;
seteuid = conf.CHECK_CODE('''
#define AUTOCONF_TEST 1
#define USE_SETUIDX 1
+ #include "../lib/util/setid.c"
#include "./lib/util_sec.c"
''',
'USE_SETUIDX',