diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-12-17 18:53:26 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-12-17 18:53:26 +1100 |
commit | e937be36c309fff54978e56159503bcfee76d4c0 (patch) | |
tree | 71b5bc2c7cfc424e7a68a67f27953600174dfe3f /configure.ac | |
parent | 8975ddf11b17bf58191c653a0173d91e50e942c7 (diff) |
- (dtucker) [acconfig.h configure.ac uidswap.c] Bug #645: Check for
setres[ug]id() present but not implemented (eg some Linux/glibc
combinations).
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index e7249b9c..50b43ae3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.176 2003/12/08 20:35:59 tim Exp $ +# $Id: configure.ac,v 1.177 2003/12/17 07:53:26 dtucker Exp $ AC_INIT AC_CONFIG_SRCDIR([ssh.c]) @@ -780,6 +780,30 @@ AC_CHECK_DECL(tcsendbreak, [#include <termios.h>] ) +dnl Some platorms have setresuid that isn't implemented +AC_MSG_CHECKING(if setresuid seems to work) +AC_TRY_RUN([ +#include <stdlib.h> +#include <errno.h> +int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} + ], + [AC_MSG_RESULT(yes)], + [AC_DEFINE(BROKEN_SETRESUID), + AC_MSG_RESULT(not implemented)] +) + +dnl Some platorms have setresgid that isn't implemented +AC_MSG_CHECKING(if setresgid seems to work) +AC_TRY_RUN([ +#include <stdlib.h> +#include <errno.h> +int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} + ], + [AC_MSG_RESULT(yes)], + [AC_DEFINE(BROKEN_SETRESGID) + AC_MSG_RESULT(not implemented)] +) + dnl Checks for time functions AC_CHECK_FUNCS(gettimeofday time) dnl Checks for utmp functions |