- (dtucker) [configure.ac] Only test setresuid and setresgid if they exist.
diff --git a/ChangeLog b/ChangeLog
index 4c2e2f2..cd48ba4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
[auth2-passwd.c]
Ignore password change request during password auth (which we currently
don't support) and discard proposed new password. corrections/ok markus@
+ - (dtucker) [configure.ac] Only test setresuid and setresgid if they exist.
20031219
- (dtucker) [defines.h] Bug #458: Define SIZE_T_MAX as UINT_MAX if we
@@ -1636,4 +1637,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
-$Id: ChangeLog,v 1.3157 2003/12/31 00:43:24 dtucker Exp $
+$Id: ChangeLog,v 1.3158 2003/12/31 03:59:17 dtucker Exp $
diff --git a/configure.ac b/configure.ac
index 6c8621c..5ac6acb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.178 2003/12/18 01:52:19 dtucker Exp $
+# $Id: configure.ac,v 1.179 2003/12/31 03:59:17 dtucker Exp $
AC_INIT
AC_CONFIG_SRCDIR([ssh.c])
@@ -749,7 +749,7 @@
mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \
pstat readpassphrase realpath recvmsg rresvport_af sendmsg \
setdtablesize setegid setenv seteuid setgroups setlogin setpcred \
- setproctitle setregid setresgid setresuid setreuid setrlimit \
+ setproctitle setregid setreuid setrlimit \
setsid setvbuf sigaction sigvec snprintf socketpair strerror \
strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \
truncate utimes vhangup vsnprintf waitpid \
@@ -783,29 +783,33 @@
[#include <termios.h>]
)
-dnl Some platorms have setresuid that isn't implemented
-AC_MSG_CHECKING(if setresuid seems to work)
-AC_TRY_RUN([
+AC_CHECK_FUNCS(setresuid, [
+ dnl Some platorms have setresuid that isn't implemented, test for this
+ 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)]
-)
+ ],
+ [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([
+AC_CHECK_FUNCS(setresgid, [
+ dnl Some platorms have setresgid that isn't implemented, test for this
+ 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)]
-)
+ ],
+ [AC_MSG_RESULT(yes)],
+ [AC_DEFINE(BROKEN_SETRESGID)
+ AC_MSG_RESULT(not implemented)]
+ )
+])
dnl Checks for time functions
AC_CHECK_FUNCS(gettimeofday time)