From 2a6b029f9969491319600b4623d56a85e57b9833 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 31 Dec 2003 14:59:17 +1100 Subject: - (dtucker) [configure.ac] Only test setresuid and setresgid if they exist. --- ChangeLog | 3 ++- configure.ac | 40 ++++++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c2e2f25c..cd48ba423 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 6c8621ce5..5ac6acb38 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 @@ AC_CHECK_FUNCS(\ 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 @@ AC_CHECK_DECL(tcsendbreak, [#include ] ) -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 #include 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 #include 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) -- cgit v1.2.3