From 8487f959d10fe1ad1c8de0e97e623a2927165eaf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 19 Aug 1998 15:01:03 +0000 Subject: added a test for a working setresuid (This used to be commit dbe333b590ef004ccbd31a14ad161d73139b2486) --- source3/configure.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index 113b264cc0..df707063f8 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -65,6 +65,15 @@ AC_TRY_COMPILE([#include ],[int i = setresuid], echo yes; AC_DEFINE(HAVE_SETRESUID_DECL), echo no) +# and glibc has setresuid under linux but the function does +# nothing until kernel 2.1.44! very dumb. +echo $ac_n "checking for real setresuid $ac_c" +AC_TRY_RUN([#include +main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}], +echo yes;AC_DEFINE(HAVE_SETRESUID), +echo no) + + AC_FUNC_MEMCMP ############################################### @@ -149,7 +158,7 @@ AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync execl bzero memset) AC_CHECK_FUNCS(memmove vsnprintf setsid glob strpbrk pipe crypt16 getauthuid) AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction innetgr) AC_CHECK_FUNCS(initgroups select rdchk getgrnam pathconf putprpwnam) -AC_CHECK_FUNCS(setresuid setuidx setgroups mktime rename ftruncate) +AC_CHECK_FUNCS(setuidx setgroups mktime rename ftruncate) AC_CHECK_FUNCS(set_auth_parameters atexit grantpt getspnam dup2) AC_CHECK_FUNCS(bigcrypt getprpwnam setluid yp_get_default_domain getpwanam) -- cgit