diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/m4/rewrite.m4 | 58 | ||||
-rw-r--r-- | source4/build/tests/summary.c | 5 | ||||
-rw-r--r-- | source4/ntvfs/posix/config.m4 | 57 |
3 files changed, 57 insertions, 63 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4 index 577864fc5a..ef75ba37a2 100644 --- a/source4/build/m4/rewrite.m4 +++ b/source4/build/m4/rewrite.m4 @@ -1136,64 +1136,6 @@ if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then fi fi - -################################################ -# look for a method of setting the effective uid -seteuid=no; -if test $seteuid = no; then -AC_CACHE_CHECK([for setresuid],samba_cv_USE_SETRESUID,[ -AC_TRY_RUN([ -#define AUTOCONF_TEST 1 -#define USE_SETRESUID 1 -#include "confdefs.h" -#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 - seteuid=yes;AC_DEFINE(USE_SETRESUID,1,[Whether setresuid() is available]) -fi -fi - - -if test $seteuid = no; then -AC_CACHE_CHECK([for setreuid],samba_cv_USE_SETREUID,[ -AC_TRY_RUN([ -#define AUTOCONF_TEST 1 -#define USE_SETREUID 1 -#include "confdefs.h" -#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 - seteuid=yes;AC_DEFINE(USE_SETREUID,1,[Whether setreuid() is available]) -fi -fi - -if test $seteuid = no; then -AC_CACHE_CHECK([for seteuid],samba_cv_USE_SETEUID,[ -AC_TRY_RUN([ -#define AUTOCONF_TEST 1 -#define USE_SETEUID 1 -#include "confdefs.h" -#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 - seteuid=yes;AC_DEFINE(USE_SETEUID,1,[Whether seteuid() is available]) -fi -fi - -if test $seteuid = no; then -AC_CACHE_CHECK([for setuidx],samba_cv_USE_SETUIDX,[ -AC_TRY_RUN([ -#define AUTOCONF_TEST 1 -#define USE_SETUIDX 1 -#include "confdefs.h" -#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 - seteuid=yes;AC_DEFINE(USE_SETUIDX,1,[Whether setuidx() is available]) -fi -fi - - AC_CACHE_CHECK([for working mmap],samba_cv_HAVE_MMAP,[ AC_TRY_RUN([#include "${srcdir-.}/build/tests/shared_mmap.c"], samba_cv_HAVE_MMAP=yes,samba_cv_HAVE_MMAP=no,samba_cv_HAVE_MMAP=cross)]) diff --git a/source4/build/tests/summary.c b/source4/build/tests/summary.c index 8c318fe7d5..b6384a4083 100644 --- a/source4/build/tests/summary.c +++ b/source4/build/tests/summary.c @@ -13,11 +13,6 @@ main() printf("WARNING: No automated network interface determination\n"); #endif -#if !(defined(USE_SETEUID) || defined(USE_SETREUID) || defined(USE_SETRESUID) || defined(USE_SETUIDX)) - printf("ERROR: no seteuid method available\n"); - /* REWRITE: exit(1); */ -#endif - #if !(defined(STAT_STATVFS) || defined(STAT_STATVFS64) || defined(STAT_STATFS3_OSF1) || defined(STAT_STATFS2_BSIZE) || defined(STAT_STATFS4) || defined(STAT_STATFS2_FSIZE) || defined(STAT_STATFS2_FS_DATA)) printf("ERROR: No disk free routine!\n"); exit(1); diff --git a/source4/ntvfs/posix/config.m4 b/source4/ntvfs/posix/config.m4 index d8a2e3ec36..3415948f95 100644 --- a/source4/ntvfs/posix/config.m4 +++ b/source4/ntvfs/posix/config.m4 @@ -21,3 +21,60 @@ ac_cv_decl_have_stat_tv_nsec=no) if test x"$ac_cv_decl_have_stat_tv_nsec" = x"yes"; then AC_DEFINE(HAVE_STAT_TV_NSEC,1,[Whether stat has tv_nsec nanosecond fields]) fi + + +################################################ +# look for a method of setting the effective uid +seteuid=no; +if test $seteuid = no; then +AC_CACHE_CHECK([for setresuid],samba_cv_USE_SETRESUID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETRESUID 1 +#include "confdefs.h" +#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 + seteuid=yes;AC_DEFINE(USE_SETRESUID,1,[Whether setresuid() is available]) +fi +fi + + +if test $seteuid = no; then +AC_CACHE_CHECK([for setreuid],samba_cv_USE_SETREUID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETREUID 1 +#include "confdefs.h" +#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 + seteuid=yes;AC_DEFINE(USE_SETREUID,1,[Whether setreuid() is available]) +fi +fi + +if test $seteuid = no; then +AC_CACHE_CHECK([for seteuid],samba_cv_USE_SETEUID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETEUID 1 +#include "confdefs.h" +#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 + seteuid=yes;AC_DEFINE(USE_SETEUID,1,[Whether seteuid() is available]) +fi +fi + +if test $seteuid = no; then +AC_CACHE_CHECK([for setuidx],samba_cv_USE_SETUIDX,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETUIDX 1 +#include "confdefs.h" +#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 + seteuid=yes;AC_DEFINE(USE_SETUIDX,1,[Whether setuidx() is available]) +fi +fi |