- (dtucker) [configure.ac] Only test setresuid and setresgid if they exist.

This commit is contained in:
Darren Tucker 2003-12-31 14:59:17 +11:00
parent ea2870619d
commit 2a6b029f99
2 changed files with 24 additions and 19 deletions

View File

@ -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 $

View File

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