diff options
author | Jeremy Allison <jra@samba.org> | 1998-12-03 23:43:08 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-12-03 23:43:08 +0000 |
commit | 301b611ab7b9f95b8b87f2768f799acc7f58e507 (patch) | |
tree | 173903b3066706295affac8aeda685fc092921a9 /source/configure.in | |
parent | c464ffdeeb6c5868f1212ea4c5ef7d8dc6c68561 (diff) | |
download | samba-301b611ab7b9f95b8b87f2768f799acc7f58e507.tar.gz samba-301b611ab7b9f95b8b87f2768f799acc7f58e507.tar.xz samba-301b611ab7b9f95b8b87f2768f799acc7f58e507.zip |
Samba 2.0 wasn't building on Linux-alpha - so I added
HAVE_SETRESGID and HAVE_SETRESGID_DECL defines, based
on the HAVE_SETRESUID checks.
I also updated the places that setresgid was being called
based on HAVE_SETRESUID being defined and made sure *both*
were defined before allowing the call.
Jeremy.
Diffstat (limited to 'source/configure.in')
-rw-r--r-- | source/configure.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/configure.in b/source/configure.in index 235147297e4..bbe28cb2bf8 100644 --- a/source/configure.in +++ b/source/configure.in @@ -128,6 +128,14 @@ if test x"$samba_cv_have_setresuid_decl" = x"yes"; then 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], samba_cv_have_crypt_decl=yes,samba_cv_have_crypt_decl=no)]) @@ -145,6 +153,16 @@ 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 <errno.h> +main() { setresgid(1,1,1); setresgid(2,2,2); exit(errno==EPERM?0:1);}], + 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 ############################################### |