* samba/configure.in: Remove tests for setresuid and setresgid.

* samba/include/includes.h: Remove declarations of setresuid and
setresgid.
This commit is contained in:
Pavel Roskin 2001-02-08 01:29:38 +00:00
parent e30e6b8a5a
commit bbc91a29a5
3 changed files with 4 additions and 45 deletions

View File

@ -1,5 +1,9 @@
2001-02-07 Pavel Roskin <proski@gnu.org>
* 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.

View File

@ -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 <unistd.h>],[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 <unistd.h>],[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 <unistd.h>],[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 <errno.h>
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 <unistd.h>
#include <errno.h>
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
###############################################

View File

@ -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);