summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-12-31 14:59:17 +1100
committerDarren Tucker <dtucker@zip.com.au>2003-12-31 14:59:17 +1100
commit2a6b029f9969491319600b4623d56a85e57b9833 (patch)
tree209585c321e43e61cb1c2380b5a6fa0d6070ca7e /configure.ac
parentea2870619d295b0ff6398b3115c4a4e0ac543edb (diff)
- (dtucker) [configure.ac] Only test setresuid and setresgid if they exist.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 22 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index 6c8621ce5..5ac6acb38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.178 2003/12/18 01:52:19 dtucker Exp $ 1# $Id: configure.ac,v 1.179 2003/12/31 03:59:17 dtucker Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -749,7 +749,7 @@ AC_CHECK_FUNCS(\
749 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \ 749 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \
750 pstat readpassphrase realpath recvmsg rresvport_af sendmsg \ 750 pstat readpassphrase realpath recvmsg rresvport_af sendmsg \
751 setdtablesize setegid setenv seteuid setgroups setlogin setpcred \ 751 setdtablesize setegid setenv seteuid setgroups setlogin setpcred \
752 setproctitle setregid setresgid setresuid setreuid setrlimit \ 752 setproctitle setregid setreuid setrlimit \
753 setsid setvbuf sigaction sigvec snprintf socketpair strerror \ 753 setsid setvbuf sigaction sigvec snprintf socketpair strerror \
754 strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \ 754 strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \
755 truncate utimes vhangup vsnprintf waitpid \ 755 truncate utimes vhangup vsnprintf waitpid \
@@ -783,29 +783,33 @@ AC_CHECK_DECL(tcsendbreak,
783 [#include <termios.h>] 783 [#include <termios.h>]
784) 784)
785 785
786dnl Some platorms have setresuid that isn't implemented 786AC_CHECK_FUNCS(setresuid, [
787AC_MSG_CHECKING(if setresuid seems to work) 787 dnl Some platorms have setresuid that isn't implemented, test for this
788AC_TRY_RUN([ 788 AC_MSG_CHECKING(if setresuid seems to work)
789 AC_TRY_RUN([
789#include <stdlib.h> 790#include <stdlib.h>
790#include <errno.h> 791#include <errno.h>
791int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 792int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
792 ], 793 ],
793 [AC_MSG_RESULT(yes)], 794 [AC_MSG_RESULT(yes)],
794 [AC_DEFINE(BROKEN_SETRESUID), 795 [AC_DEFINE(BROKEN_SETRESUID),
795 AC_MSG_RESULT(not implemented)] 796 AC_MSG_RESULT(not implemented)]
796) 797 )
798])
797 799
798dnl Some platorms have setresgid that isn't implemented 800AC_CHECK_FUNCS(setresgid, [
799AC_MSG_CHECKING(if setresgid seems to work) 801 dnl Some platorms have setresgid that isn't implemented, test for this
800AC_TRY_RUN([ 802 AC_MSG_CHECKING(if setresgid seems to work)
803 AC_TRY_RUN([
801#include <stdlib.h> 804#include <stdlib.h>
802#include <errno.h> 805#include <errno.h>
803int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 806int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
804 ], 807 ],
805 [AC_MSG_RESULT(yes)], 808 [AC_MSG_RESULT(yes)],
806 [AC_DEFINE(BROKEN_SETRESGID) 809 [AC_DEFINE(BROKEN_SETRESGID)
807 AC_MSG_RESULT(not implemented)] 810 AC_MSG_RESULT(not implemented)]
808) 811 )
812])
809 813
810dnl Checks for time functions 814dnl Checks for time functions
811AC_CHECK_FUNCS(gettimeofday time) 815AC_CHECK_FUNCS(gettimeofday time)