From bbc91a29a58a669324c5e5ea3aa9214af8f00702 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 8 Feb 2001 01:29:38 +0000 Subject: [PATCH] * samba/configure.in: Remove tests for setresuid and setresgid. * samba/include/includes.h: Remove declarations of setresuid and setresgid. --- vfs/ChangeLog | 4 ++++ vfs/samba/configure.in | 37 ------------------------------------ vfs/samba/include/includes.h | 8 -------- 3 files changed, 4 insertions(+), 45 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 946766219..913437445 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,5 +1,9 @@ 2001-02-07 Pavel Roskin + * samba/configure.in: Remove tests for setresuid and setresgid. + * samba/include/includes.h: Remove declarations of setresuid and + setresgid. + * samba/configure.in: Don't check for root permissions. Don't call tests/trapdoor.c and tests/ftruncroot.c. * samba/tests/trapdoor.c: Remove. diff --git a/vfs/samba/configure.in b/vfs/samba/configure.in index de5edb7bc..3dfb80793 100644 --- a/vfs/samba/configure.in +++ b/vfs/samba/configure.in @@ -239,22 +239,6 @@ if test x"$samba_cv_errno" = x"yes"; then AC_DEFINE(HAVE_ERRNO_DECL) fi -# stupid glibc has the functions but no declaration. grrrr. -AC_CACHE_CHECK([for setresuid declaration],samba_cv_have_setresuid_decl,[ - AC_TRY_COMPILE([#include ],[int i = (int)setresuid], - samba_cv_have_setresuid_decl=yes,samba_cv_have_setresuid_decl=no)]) -if test x"$samba_cv_have_setresuid_decl" = x"yes"; then - AC_DEFINE(HAVE_SETRESUID_DECL) -fi - -# stupid glibc has the functions but no declaration. grrrr. -AC_CACHE_CHECK([for setresgid declaration],samba_cv_have_setresgid_decl,[ - AC_TRY_COMPILE([#include ],[int i = (int)setresgid], - samba_cv_have_setresgid_decl=yes,samba_cv_have_setresgid_decl=no)]) -if test x"$samba_cv_have_setresgid_decl" = x"yes"; then - AC_DEFINE(HAVE_SETRESGID_DECL) -fi - # stupid glibc has the functions but no declaration. grrrr. AC_CACHE_CHECK([for crypt declaration],samba_cv_have_crypt_decl,[ AC_TRY_COMPILE([#include ],[int i = (int)crypt], @@ -263,27 +247,6 @@ if test x"$samba_cv_have_crypt_decl" = x"yes"; then AC_DEFINE(HAVE_CRYPT_DECL) fi -# and glibc has setresuid under linux but the function does -# nothing until kernel 2.1.44! very dumb. -AC_CACHE_CHECK([for real setresuid],samba_cv_have_setresuid,[ - AC_TRY_RUN([#include -main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}], - samba_cv_have_setresuid=yes,samba_cv_have_setresuid=no,samba_cv_have_setresuid=cross)]) -if test x"$samba_cv_have_setresuid" = x"yes"; then - AC_DEFINE(HAVE_SETRESUID) -fi - -# Do the same check for setresguid... -# -AC_CACHE_CHECK([for real setresgid],samba_cv_have_setresgid,[ - AC_TRY_RUN([#include -#include -main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}], - samba_cv_have_setresgid=yes,samba_cv_have_setresgid=no,samba_cv_have_setresgid=cross)]) -if test x"$samba_cv_have_setresgid" = x"yes"; then - AC_DEFINE(HAVE_SETRESGID) -fi - AC_FUNC_MEMCMP ############################################### diff --git a/vfs/samba/include/includes.h b/vfs/samba/include/includes.h index 1180f8576..5aea43c2e 100644 --- a/vfs/samba/include/includes.h +++ b/vfs/samba/include/includes.h @@ -811,14 +811,6 @@ int ftruncate(int f,long l); unsigned long strtoul(const char *nptr, char **endptr, int base); #endif -#if (defined(HAVE_SETRESUID) && !defined(HAVE_SETRESUID_DECL)) -/* stupid glibc */ -int setresuid(uid_t ruid, uid_t euid, uid_t suid); -#endif -#if (defined(HAVE_SETRESGID) && !defined(HAVE_SETRESGID_DECL)) -int setresgid(gid_t rgid, gid_t egid, gid_t sgid); -#endif - #if (defined(HAVE_CRYPT) && !defined(HAVE_CRYPT_DECL) && !defined(KRB4_AUTH)) /* stupid glibc */ int crypt(const char *key, const char *salt);