diff options
author | 2003-03-15 21:23:53 +0000 | |
---|---|---|
committer | 2003-03-15 21:23:53 +0000 | |
commit | f7c10939c48965618c7d8a45bfe3236e402c7288 (patch) | |
tree | 5e0dcd7292f3abcc57363663943b1e5287e1f695 | |
parent | recoginzed -> recognized; (diff) | |
download | wireguard-openbsd-f7c10939c48965618c7d8a45bfe3236e402c7288.tar.xz wireguard-openbsd-f7c10939c48965618c7d8a45bfe3236e402c7288.zip |
update to what will soon be sudo 1.6.7
49 files changed, 7117 insertions, 3734 deletions
diff --git a/usr.bin/sudo/BUGS b/usr.bin/sudo/BUGS index 628f98e3dbd..2eb4338e81d 100644 --- a/usr.bin/sudo/BUGS +++ b/usr.bin/sudo/BUGS @@ -1,4 +1,4 @@ -Known bugs in sudo version 1.6.6 +Known bugs in sudo version 1.6.7 ================================ 1) Sudo should have an option to log when removing "dangerous" diff --git a/usr.bin/sudo/CHANGES b/usr.bin/sudo/CHANGES index ee37c482402..77449fe35c7 100644 --- a/usr.bin/sudo/CHANGES +++ b/usr.bin/sudo/CHANGES @@ -1529,3 +1529,57 @@ Sudo 1.6.5p2 released. 477) Fixed a security hole in prompt rewriting found by Global InterSec. Sudo 1.6.6 released. + +478) Wildcards now work correctly in the env_keep Defaults directive> + +479) Added support for non-root timestamp dirs. This allows the timestamp + dir to be shared via NFS (though this is not recommended). + +480) Removed double printing of bad environment variable table in -V mode. + +481) configure script has been regenerated with autoconf 2.5.7. + This required some changes to configure.in. + +482) Fixed a compilation problem on SunOS; thanks to Alek O. Komarnitsky. + +483) SecurID 5.0 API support from Michael Stroucken. + +484) Restore state of signal handlers to what we had upon startup. + Fixes a problem when using sudo with nohup; thanks to Paul Markham. + +485) Revamp set_perms() to use setresuid() or setreuid() when available + in preference to POSIX stuff since they allow us to properly + implement "stay_setuid" whereas POSIX does not really. + +486) In strict mode sudo did not throw an error for undefined User_Aliases. + +487) Fixed a Makefile bug on IRIX. + +488) Write the prompt *after* turning off echo to avoid some password + characters being echoed on heavily-loaded machines with fast typists. + +489) Added %U and %H escapes in the prompt and fixed treatment of %%. + +490) Visudo will now add a final newline to sudoers if the user's editor + not add one before EOF. + +491) The lexer state is now reset to its initial value on EOF. + Previously, the state was not reset between parser invocations + which could cause problems for visudo in rare cases. + +492) Added support for Defaults that apply based on the RunasUser. + +493) Sudo now includes copies of strlc{at,py} and uses them throughout. + +494) Sudo is now careful to avoid interger overflow when allocating + memory. This is one of those "should not happen" situations. + +495) A new option, --with-stow can be used to package sudo with GNU stow. + +496) auth/kerb5.c now compiles under Heimdal. + +497) The volatile prefix is used in the hopes of preventing compilers + from optimizing away memory zeroing. Unfortunately, this results + in some warnings from gcc. + +Sudo 1.6.7 released. diff --git a/usr.bin/sudo/INSTALL b/usr.bin/sudo/INSTALL index c2a9cf59bb0..6834462e0d8 100644 --- a/usr.bin/sudo/INSTALL +++ b/usr.bin/sudo/INSTALL @@ -1,4 +1,4 @@ -Installation instructions for Sudo 1.6.6 +Installation instructions for Sudo 1.6.7 ======================================== Sudo uses a `configure' script to probe the capabilities and type @@ -147,15 +147,15 @@ Special features/options: (or at least the library and header files). --with-kerb4 - Enable kerberos v4 support. Tested only with the Cygnus Network - Security package (CNS). This uses kerberos passphrases for - authentication but does not use the kerberos cookie scheme. + Enable Kerberos IV support. Tested only with the Cygnus Network + Security package (CNS). This uses Kerberos passphrases for + authentication but does not use the Kerberos cookie scheme. --with-kerb5 - Enable kerberos v5 support. Tested against MIT Kerberos V, + Enable Kerberos V support. Tested against MIT Kerberos V, release 1.1, although also expected to work against CNS. This - This uses kerberos passphrases for authentication but does not - use the kerberos cookie scheme. Will not work for Kerberos V + This uses Kerberos passphrases for authentication but does not + use the Kerberos cookie scheme. Will not work for Kerberos V older than version 1.1. --with-authenticate @@ -177,7 +177,7 @@ Special features/options: /etc/pam.conf to obtain syslog output for debugging purposes. --with-AFS - Enable AFS support with kerberos authentication. Should work under + Enable AFS support with Kerberos authentication. Should work under AFS 3.3. If your AFS doesn't have -laudit you should be able to link without it. @@ -222,6 +222,10 @@ Special features/options: where it is broken. 4.4BSD has setreuid() but it doesn't really work. + --disable-setresuid + Disable use of the setresuid() function for operating systems + where it is broken (none currently known). + --disable-sia Disable SIA support. This is the "Security Integration Architecture" on Digital UNIX. If you disable SIA sudo will @@ -271,6 +275,11 @@ Special features/options: --with-otp-only This option is now just an alias for --without-passwd. + --with-stow + Properly handle GNU stow packaging. The sudoers file will + physically live in ${prefix}/etc and /etc/sudoers will be + a symbolic link. + The following options are also configurable at runtime: --with-long-otp-prompt diff --git a/usr.bin/sudo/LICENSE b/usr.bin/sudo/LICENSE index 9756b3d4540..b283ede7d5e 100644 --- a/usr.bin/sudo/LICENSE +++ b/usr.bin/sudo/LICENSE @@ -1,6 +1,6 @@ Sudo is distributed under the following BSD-style license: - Copyright (c) 1994-1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com> + Copyright (c) 1994-1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/usr.bin/sudo/Makefile.in b/usr.bin/sudo/Makefile.in index 1a5f76f049b..3eea84b89dc 100644 --- a/usr.bin/sudo/Makefile.in +++ b/usr.bin/sudo/Makefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 1998-2002 Todd C. Miller <Todd.Miller@courtesan.com> +# Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -34,7 +34,7 @@ # # @configure_input@ # -# $Sudo: Makefile.in,v 1.225 2002/04/18 15:41:30 millert Exp $ +# $Sudo: Makefile.in,v 1.230 2003/03/15 20:31:02 millert Exp $ # #### Start of system configuration section. #### @@ -113,12 +113,13 @@ SRCS = alloc.c alloca.c check.c def_data.c defaults.c env.c fileops.c \ find_path.c fnmatch.c getcwd.c getspwuid.c goodpath.c \ interfaces.c lex.yy.c lsearch.c logging.c parse.c parse.lex \ parse.yacc set_perms.c sigaction.c snprintf.c strcasecmp.c strerror.c \ - sudo.c sudo.tab.c testsudoers.c tgetpass.c utime.c visudo.c \ - $(AUTH_SRCS) + strlcat.c strlcpy.c sudo.c sudo.tab.c testsudoers.c tgetpass.c utime.c \ + visudo.c $(AUTH_SRCS) AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/bsdauth.c auth/dce.c auth/fwtk.c \ auth/kerb4.c auth/kerb5.c auth/pam.c auth/passwd.c auth/rfc1938.c \ - auth/secureware.c auth/securid.c auth/sia.c auth/sudo_auth.c + auth/secureware.c auth/securid.c auth/securid5.c auth/sia.c \ + auth/sudo_auth.c HDRS = compat.h def_data.h defaults.h ins_2001.h ins_classic.h ins_csops.h \ ins_goons.h insults.h interfaces.h logging.h parse.h sudo.h sudo.tab.h \ @@ -138,7 +139,7 @@ TESTOBJS = interfaces.o testsudoers.o $(PARSEOBJS) LIBOBJS = @LIBOBJS@ @ALLOCA@ -VERSION = 1.6.6 +VERSION = 1.6.7 DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES HISTORY INSTALL INSTALL.configure \ LICENSE Makefile.in PORTING README RUNSON TODO TROUBLESHOOTING \ @@ -225,6 +226,8 @@ getcwd.o: getcwd.c config.h compat.h lsearch.o: lsearch.c config.h compat.h emul/search.h snprintf.o: snprintf.c config.h compat.h strcasecmp.o: strcasecmp.c config.h +strlcat.o: strlcat.c config.h +strlcpy.o: strlcpy.c config.h strerror.o: strerror.c config.h utime.o: utime.c config.h pathnames.h compat.h emul/utime.h @@ -255,12 +258,14 @@ secureware.o: $(authdir)/secureware.c $(AUTHDEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/secureware.c securid.o: $(authdir)/securid.c $(AUTHDEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/securid.c +securid5.o: $(authdir)/securid5.c $(AUTHDEP) + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/securid5.c sia.o: $(authdir)/sia.c $(AUTHDEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/sia.c sudo.man.in: $(srcdir)/sudo.pod @rm -f $(srcdir)/$@ - ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" > $@ ) + ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e 1d -e '/^=pod/q' -e 's/^/.\\" /p' sudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" >> $@ ) sudo.man: sudo.man.in CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status @@ -269,7 +274,7 @@ sudo.cat: sudo.man visudo.man.in: $(srcdir)/visudo.pod @rm -f $(srcdir)/$@ - ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" visudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" > $@ ) + ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e 1d -e '/^=pod/q' -e 's/^/.\\" /p' visudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" visudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" >> $@ ) visudo.man: visudo.man.in CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status @@ -278,7 +283,7 @@ visudo.cat: visudo.man sudoers.man.in: $(srcdir)/sudoers.pod @rm -f $(srcdir)/$@ - ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" > $@ ) + ( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e 1d -e '/^=pod/q' -e 's/^/.\\" /p' sudoers.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" >> $@ ) sudoers.man:: sudoers.man.in CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status diff --git a/usr.bin/sudo/README b/usr.bin/sudo/README index 9ab603d03e1..1d704e958de 100644 --- a/usr.bin/sudo/README +++ b/usr.bin/sudo/README @@ -1,4 +1,4 @@ -This is Sudo version 1.6.6 +This is Sudo version 1.6.7 The sudo philosophy =================== @@ -45,7 +45,7 @@ tokenizer and pre-yacc'd grammar parser). You'll also have to uncomment a few lines from the Makefile or run configure with the --with-devel option. You can get flex via anonymous ftp from ftp://ftp.ee.lbl.gov/pub/flex* as well as any GNU mirror. You can -get GNU bison from ftp://prep.ai.mit.edu/pub/gnu/bison* or any GNU +get GNU bison from ftp://ftp.gnu.org/pub/gnu/bison/ or any GNU mirror. Building the release diff --git a/usr.bin/sudo/RUNSON b/usr.bin/sudo/RUNSON index d0de74918fb..5747fc228c7 100644 --- a/usr.bin/sudo/RUNSON +++ b/usr.bin/sudo/RUNSON @@ -6,10 +6,10 @@ the current version of sudo does not mean it won't work... Name Rev Arch Used Version By Options ======= ======= ======= =============== ======= =============== =============== Auspex 1.6.1 sun4 bundled cc 1.3.4 Alek Komarnitsky none -SunOS 4.1.3 sun4 bundled cc 1.6.6 Todd Miller none -SunOS 4.1.3 sun4 gcc2.9.5.2 1.6.6 Todd Miller none +SunOS 4.1.3 sun4 bundled cc 1.6.7 Todd Miller none +SunOS 4.1.3 sun4 gcc2.9.5.2 1.6.7 Todd Miller none SunOS 4.1.3 sun4 gcc2.7.2.1 1.5.3 Todd Miller --with-kerb4 -SunOS 4.1.3 sun4 gcc2.9.5.2 1.6.6 Todd Miller --with-skey +SunOS 4.1.3 sun4 gcc2.9.5.2 1.6.7 Todd Miller --with-skey Solaris 2.5.1 sparc SC4.0 1.5.6p1 Brian Jackson none Solaris 2.5.1 sun4u gcc2.7.2.3 1.5.4 Leon von Stauber none Solaris 2.5.1 i386 gcc2.7.2 1.5.4 Leon von Stauber none @@ -24,11 +24,12 @@ Solaris 7 i386 Workshop 5.0 1.6 Brian Jackson none Solaris 7 sun4u egcs 1.1.2 1.5.9p4 Scott Kinnane none Solaris 7 sparc SC4.2 1.6.6 Todd Miller none Solaris 7 sun4u Workshop 6.2 1.6.3p7 Donna Dickerson none -Solaris 7 sparc 2.95.2 1.6.6 Todd Miller --with-skey +Solaris 7 sparc gcc2.95.2 1.6.6 Todd Miller --with-skey Solaris 2.6 sun4u egcs 1.1.2 1.5.9p4 Scott Kinnane none -Solaris 8 sparc 2.95.2 1.6.6 Todd Miller --with-skey +Solaris 8 sparc gcc2.95.2 1.6.6 Todd Miller --with-skey Solaris 8 sparc SC4.2 1.6.6 Todd Miller none Solaris 8 sun4u Workshop 6.2 1.6.3p7 Donna Dickerson none +Solaris 8 sun4u gcc2.95.3 1.6.6 Banu Yobas none ISC 4.0 i386 bundled cc 1.4 Andy Smith none ISC 4.0 i386 gcc2.7.0 1.4 Andy Smith none ISC 4.1 i386 bundled cc 1.4 Andy Smith none @@ -45,8 +46,10 @@ HP-UX 10.20 hp700 gcc2.9.5.2 1.6.6 Todd Miller --with-skey HP-UX 10.20 hp700 bundled cc 1.6.6 Todd Miller none HP-UX 10.20 hp700 gcc 2.95.2 1.6.2 Jeff Earickson --with-DCE HP-UX 11.00 hp700 ansi-c 1.5.5b1 Alek Komarnitsky --with-C2 -HP-UX 11.00 hp700 bundled cc 1.5.5p5 Lynn Osburn none -HP-UX 11.00 hp700 HP C compiler 1.6.2 Jeff Earickson --with-pam +HP-UX 11.00 hp700 bundled cc 1.6.7 Todd Miller none +HP-UX 11.00 hp700 bundled cc 1.6.7 Todd Miller --with-pam +HP-UX 11.00 hp700 gcc 3.2 1.6.7 Todd Miller none +HP-UX 11.00 hp700 gcc 3.2 1.6.7 Todd Miller --with-pam HP-UX 11.11 hp800 HP C compiler 1.6.5p2 Bill Marmagas --with-pam Ultrix 4.3 mips bundled cc 1.6.3b2 Todd Miller none Ultrix 4.3 mips gcc2.7.2.1 1.5.9 Todd Miller --with-skey @@ -93,6 +96,8 @@ AIX 4.2.1 rs6000 bundled cc 1.5.7p4 Sam Mabjish none AIX 4.2.1 rs6000 egcs 1.1.2 1.5.9p4 Scott Kinnane none AIX 4.3 rs6000 bundled cc 1.5.4 Leon von Stauber none AIX 4.3.2 rs6000 egcs 1.1.2 1.5.9p4 Scott Kinnane none +AIX 5.0.1.0 rs6000 bundled cc 1.6.6 David Littlewood none +AIX 5.1 PowerPC gcc-3.2.1 1.6.6 Neil MacGregor none ConvexOS 9.1 convex bundled cc 1.3.6 Todd Miller none ConvexOS 9.1 convex gcc2.4.5 1.3.6 Todd Miller none BSD/OS 4.1 i386 cc 1.6.3 Todd Miller --with-skey @@ -108,12 +113,13 @@ Linux 2.0.34 i586 egcs-2.91.57 1.5.6p2 Darrin Chandler none Linux 2.0.36 i586 gcc-2.7.2.3 1.5.7p4 Nathan Haney none Linux 2.0.33pl1 m68k gcc 2.7.2.3 1.5.6 James Troup none Linux 2.2.12 i586 gcc-2.95.2 1.6.3 Todd Miller --with-pam -Linux 2.4.9 i686 gcc-2.96 1.6.6 Todd Miller --with-pam +Linux 2.4.18 i686 gcc-3.2 1.6.7 Todd Miller --with-pam Linux 2.2.13 alpha egcs-2.91.66 1.6.3 Todd Miller --with-pam Linux 2.2.6-15 ppc egcs-1.1.2 1.5.9p4 Barbara Schelkle none Linux 2.0.34 mips gcc-2.7.2 1.6 Tristan Roddis none UnixWare 1.1.4 i386 gcc-2.7.2 1.4 Michael Hancock none UnixWare 7.1.1 i686 cc 1.6.5p1 Mike Petkau none +UnixWare 7.1.3 i686 cc 1.6.6 Larry Rosenman none Pyramid DC/OSx 1.1 bundled cc 1.4 Les Schuettpelz none ATT SVR4.x i486 Metaware CC 1.4 Chris Ellington none SINIX 5.42 R4000 bundled cc 1.4 Paul Tuininga none diff --git a/usr.bin/sudo/TODO b/usr.bin/sudo/TODO index 8bfda23ce7e..c72e3abea3d 100644 --- a/usr.bin/sudo/TODO +++ b/usr.bin/sudo/TODO @@ -60,55 +60,69 @@ TODO list (most will be addressed in sudo 2.0) 22) Use strtol() and strtoul(), not atoi() -23) In parse.yacc get rid of unneeded '{ ; }' - 24) Look into %e, %p, %k in parse.lex -25) Make syslog stuff work on vanilla ultrix +24) Make syslog stuff work on vanilla ultrix -26) Implement date_format and log_format options. +25) Implement date_format and log_format options. -27) Add support for: Default:user@host +26) Add support for: Default:user@host -28) Do login-style -sh hack for sudo -s? (new option or do it always?) +27) Do login-style -sh hack for sudo -s? (new option or do it always?) -29) Make visudo rcs-aware +28) Make visudo rcs-aware -30) Add support for parsing multiple sudoers files. Basically make +29) Add support for parsing multiple sudoers files. Basically make _PATH_SUDOERS be a colon-separated list of pathname like EDITOR. Requires _PATH_SUDOERS_TMP chages (perhaps "%s.tmp"). -31) Add -i (simulate initial login) option as per 946 +sudo +30) Add -i (simulate initial login) option as per 946 +sudo (requires two-pass parser). Also add "default_path" Defaults option to go with it. (See MINUS_I.patch) -32) Some people want to be able to specify a special password in sudoers +31) Some people want to be able to specify a special password in sudoers in addition or instead of the normal one. The best argument for this so far is to be able to use separate passwords for the target users that are not the passwd file ones. -33) Add support for trusted users. E.g. allow user to run a certain +32) Add support for trusted users. E.g. allow user to run a certain command regardless of what dir it is in if it is owned by the trusted user. -34) Add mechanism to choose logfile based on RunasUser +33) Add mechanism to choose logfile based on RunasUser -35) Split the parser into two stages. The first parse checks for +34) Split the parser into two stages. The first parse checks for syntax and sets the Defaults options and sets up the data structures to check a user. The second stage does the actual user check. -36) Add a flag similar to '-l' but that spits out sudo commands in +35) Add a flag similar to '-l' but that spits out sudo commands in a format suitable for cut & paste (requires parser overhaul first). -37) Someone wants a recursive version of the dir specifier. Ie: +36) Someone wants a recursive version of the dir specifier. Ie: SOME_MODIFIER:/usr/local/ to allow anything under /usr/local to be run. -38) An option to set the shell to the target user would make sense. +37) An option to set the shell to the target user would make sense. See other target user-related issues above. -39) Add an option (-D) to dump the defaults after the sudoers file +38) Add an option (-D) to dump the defaults after the sudoers file has been parsed. Should only be available to root and should allow a -u user modifier. -40) For sudo 1.7 wipe out the environment by default. +39) For sudo 1.7 wipe out the environment by default. + +40) Allow /etc/sudoers to be a symlink but require the parent dir to + be root-owned and not writable by anything else. Should really + traverse the tree to the root doing this. + +41) Improve interfaces.c STREAMS code (see ntpd's ntp_io.c for hints) + +42) Wildcard support for user and group names? (netgroup too?) + +43) If root_sudo is off, still allow sudo -u to non-root users? + +44) Add configure option to id user based on euid not ruid? + +45) Split $EDITOR/$VISUAL in visudo into an argument vector based on whitespace + +46) Make Kerberos paths and libs situation as sane as possible diff --git a/usr.bin/sudo/aclocal.m4 b/usr.bin/sudo/aclocal.m4 index 8a156b0fe61..38e1fb93173 100644 --- a/usr.bin/sudo/aclocal.m4 +++ b/usr.bin/sudo/aclocal.m4 @@ -1,6 +1,6 @@ dnl Local m4 macors for autoconf (used by sudo) dnl -dnl Copyright (c) 1994-1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com> +dnl Copyright (c) 1994-1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> dnl dnl XXX - should cache values in all cases!!! dnl @@ -308,7 +308,7 @@ main() { if ((f = fopen("conftestdata", "w")) == NULL) exit(1); - (void) sprintf(b, "%u", u); + (void) sprintf(b, "%lu", (unsigned long) u); (void) fprintf(f, "%d\n", strlen(b)); (void) fclose(f); exit(0); diff --git a/usr.bin/sudo/alloc.c b/usr.bin/sudo/alloc.c index ed872b98524..26a7f20e5f2 100644 --- a/usr.bin/sudo/alloc.c +++ b/usr.bin/sudo/alloc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2002 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -55,13 +55,32 @@ #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) # include <malloc.h> #endif /* HAVE_MALLOC_H && !STDC_HEADERS */ +#include <limits.h> #include "sudo.h" #ifndef lint -static const char rcsid[] = "$Sudo: alloc.c,v 1.11 2002/01/09 16:56:04 millert Exp $"; +static const char rcsid[] = "$Sudo: alloc.c,v 1.18 2003/03/15 20:31:01 millert Exp $"; #endif /* lint */ +/* + * If there is no SIZE_MAX or SIZE_T_MAX we have to assume that size_t + * could be signed (as it is on SunOS 4.x). This just means that + * emalloc2() and erealloc3() cannot allocate huge amounts on such a + * platform but that is OK since sudo doesn't need to do so anyway. + */ +#ifndef SIZE_MAX +# ifdef SIZE_T_MAX +# define SIZE_MAX SIZE_T_MAX +# else +# ifdef INT_MAX +# define SIZE_MAX INT_MAX +# else +# define SIZE_MAX 0x7fffffff +# endif /* ULONG_MAX */ +# endif /* SIZE_T_MAX */ +#endif /* SIZE_MAX */ + extern char **Argv; /* from sudo.c */ /* @@ -74,6 +93,40 @@ emalloc(size) { VOID *ptr; + if (size == 0) { + (void) fprintf(stderr, "%s: internal error, tried to emalloc(0)\n", + Argv[0]); + exit(1); + } + if ((ptr = (VOID *) malloc(size)) == NULL) { + (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]); + exit(1); + } + return(ptr); +} + +/* + * emalloc2() allocates nmemb * size bytes and exits with an error + * if overflow would occur or if the system malloc(3) fails. + */ +VOID * +emalloc2(nmemb, size) + size_t nmemb; + size_t size; +{ + VOID *ptr; + + if (nmemb == 0 || size == 0) { + (void) fprintf(stderr, "%s: internal error, tried to emalloc2(0)\n", + Argv[0]); + exit(1); + } + if (nmemb > SIZE_MAX / size) { + (void) fprintf(stderr, "%s: internal error, emalloc2() overflow\n", + Argv[0]); + exit(1); + } + size *= nmemb; if ((ptr = (VOID *) malloc(size)) == NULL) { (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]); exit(1); @@ -92,6 +145,43 @@ erealloc(ptr, size) size_t size; { + if (size == 0) { + (void) fprintf(stderr, "%s: internal error, tried to erealloc(0)\n", + Argv[0]); + exit(1); + } + ptr = ptr ? (VOID *) realloc(ptr, size) : (VOID *) malloc(size); + if (ptr == NULL) { + (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]); + exit(1); + } + return(ptr); +} + +/* + * erealloc3() realloc(3)s nmemb * size bytes and exits with an error + * if overflow would occur or if the system malloc(3)/realloc(3) fails. + * You can call erealloc() with a NULL pointer even if the system realloc(3) + * does not support this. + */ +VOID * +erealloc3(ptr, nmemb, size) + VOID *ptr; + size_t nmemb; + size_t size; +{ + + if (nmemb == 0 || size == 0) { + (void) fprintf(stderr, "%s: internal error, tried to erealloc3(0)\n", + Argv[0]); + exit(1); + } + if (nmemb > SIZE_MAX / size) { + (void) fprintf(stderr, "%s: internal error, erealloc3() overflow\n", + Argv[0]); + exit(1); + } + size *= nmemb; ptr = ptr ? (VOID *) realloc(ptr, size) : (VOID *) malloc(size); if (ptr == NULL) { (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]); @@ -109,10 +199,12 @@ estrdup(src) const char *src; { char *dst = NULL; + size_t size; if (src != NULL) { - dst = (char *) emalloc(strlen(src) + 1); - (void) strcpy(dst, src); + size = strlen(src) + 1; + dst = (char *) emalloc(size); + (void) memcpy(dst, src, size); } return(dst); } diff --git a/usr.bin/sudo/auth/afs.c b/usr.bin/sudo/auth/afs.c index e00e690acc0..131c439d5b8 100644 --- a/usr.bin/sudo/auth/afs.c +++ b/usr.bin/sudo/auth/afs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999, 2001, 2002 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -65,7 +65,7 @@ #include <afs/kautils.h> #ifndef lint -static const char rcsid[] = "$Sudo: afs.c,v 1.7 2002/04/18 15:39:19 millert Exp $"; +static const char rcsid[] = "$Sudo: afs.c,v 1.8 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ int diff --git a/usr.bin/sudo/auth/aix_auth.c b/usr.bin/sudo/auth/aix_auth.c index 4ae2f5a2e7f..0ad08af6b7b 100644 --- a/usr.bin/sudo/auth/aix_auth.c +++ b/usr.bin/sudo/auth/aix_auth.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999-2002 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,7 +61,7 @@ #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: aix_auth.c,v 1.12 2002/01/21 22:25:14 millert Exp $"; +static const char rcsid[] = "$Sudo: aix_auth.c,v 1.14 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ int @@ -70,13 +70,14 @@ aixauth_verify(pw, prompt, auth) char *prompt; sudo_auth *auth; { - char *message, *pass; + volatile char *pass; + char *message; int reenter = 1; int rval = AUTH_FAILURE; pass = tgetpass(prompt, def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags); if (pass) { - if (authenticate(pw->pw_name, pass, &reenter, &message) == 0) + if (authenticate(pw->pw_name, (char *)pass, &reenter, &message) == 0) rval = AUTH_SUCCESS; memset(pass, 0, strlen(pass)); } diff --git a/usr.bin/sudo/auth/bsdauth.c b/usr.bin/sudo/auth/bsdauth.c index 2bfc6f0fd0c..62a88827771 100644 --- a/usr.bin/sudo/auth/bsdauth.c +++ b/usr.bin/sudo/auth/bsdauth.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 2000-2002 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,7 +66,7 @@ #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: bsdauth.c,v 1.8 2002/01/22 03:37:55 millert Exp $"; +static const char rcsid[] = "$Sudo: bsdauth.c,v 1.10 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ extern char *login_style; /* from sudo.c */ @@ -112,7 +112,8 @@ bsdauth_verify(pw, prompt, auth) char *prompt; sudo_auth *auth; { - char *s, *pass; + volatile char *pass; + char *s; size_t len; int authok = 0; sigaction_t sa, osa; @@ -159,7 +160,7 @@ bsdauth_verify(pw, prompt, auth) nil_pw = 1; if (pass) { - authok = auth_userresponse(as, pass, 1); + authok = auth_userresponse(as, (char *)pass, 1); memset(pass, 0, strlen(pass)); } diff --git a/usr.bin/sudo/auth/dce.c b/usr.bin/sudo/auth/dce.c index 8d4115b38d3..a063c3a2dbb 100644 --- a/usr.bin/sudo/auth/dce.c +++ b/usr.bin/sudo/auth/dce.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998, 1999, 2001 + * Copyright (c) 1996, 1998, 1999, 2001, 2002 * Todd C. Miller <Todd.Miller@courtesan.com>. All rights reserved. * * This code is derived from software contributed by Jeff Earickson @@ -79,7 +79,7 @@ #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: dce.c,v 1.8 2001/12/14 19:52:53 millert Exp $"; +static const char rcsid[] = "$Sudo: dce.c,v 1.9 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ static int check_dce_status __P((error_status_t, char *)); diff --git a/usr.bin/sudo/auth/fwtk.c b/usr.bin/sudo/auth/fwtk.c index 9eedda404f7..db6d3a8efd6 100644 --- a/usr.bin/sudo/auth/fwtk.c +++ b/usr.bin/sudo/auth/fwtk.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999-2002 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -64,7 +64,7 @@ #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: fwtk.c,v 1.15 2002/01/21 22:25:14 millert Exp $"; +static const char rcsid[] = "$Sudo: fwtk.c,v 1.17 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ int @@ -108,8 +108,8 @@ fwtk_verify(pw, prompt, auth) char *prompt; sudo_auth *auth; { - char *pass; /* Password from the user */ - char buf[SUDO_PASS_MAX + 12]; /* General prupose buffer */ + volatile char *pass; /* Password from the user */ + volatile char buf[SUDO_PASS_MAX + 12]; /* General prupose buffer */ char resp[128]; /* Response from the server */ int error; extern int nil_pw; diff --git a/usr.bin/sudo/auth/kerb4.c b/usr.bin/sudo/auth/kerb4.c index fd64aabba5e..dabc4a82975 100644 --- a/usr.bin/sudo/auth/kerb4.c +++ b/usr.bin/sudo/auth/kerb4.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999, 2001, 2002 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -62,7 +62,7 @@ #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: kerb4.c,v 1.6 2001/12/14 19:52:53 millert Exp $"; +static const char rcsid[] = "$Sudo: kerb4.c,v 1.7 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ int diff --git a/usr.bin/sudo/auth/kerb5.c b/usr.bin/sudo/auth/kerb5.c index 1992c1dd6c7..50ef2b43648 100644 --- a/usr.bin/sudo/auth/kerb5.c +++ b/usr.bin/sudo/auth/kerb5.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999, 2001, 2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * This code is derived from software contributed by Frank Cusack @@ -65,7 +65,7 @@ #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: kerb5.c,v 1.11 2001/12/14 19:52:53 millert Exp $"; +static const char rcsid[] = "$Sudo: kerb5.c,v 1.13 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ static int verify_krb_v5_tgt __P((krb5_context, krb5_ccache, char *)); @@ -93,16 +93,12 @@ kerb5_init(pw, promptp, auth) auth->data = (VOID *) &sudo_krb5_data; /* Stash all our data here */ - if (error = krb5_init_context(&(sudo_krb5_data.sudo_context))) { - log_error(NO_EXIT|NO_MAIL, - "%s: unable to initialize context: %s", auth->name, - error_message(error)); + if ((error = krb5_init_context(&(sudo_krb5_data.sudo_context)))) return(AUTH_FAILURE); - } sudo_context = sudo_krb5_data.sudo_context; - if (error = krb5_parse_name(sudo_context, pw->pw_name, - &(sudo_krb5_data.princ))) { + if ((error = krb5_parse_name(sudo_context, pw->pw_name, + &(sudo_krb5_data.princ)))) { log_error(NO_EXIT|NO_MAIL, "%s: unable to parse '%s': %s", auth->name, pw->pw_name, error_message(error)); @@ -115,7 +111,7 @@ kerb5_init(pw, promptp, auth) * The API does not currently provide this unless the auth is standalone. */ #if 1 - if (error = krb5_unparse_name(sudo_context, princ, &pname)) { + if ((error = krb5_unparse_name(sudo_context, princ, &pname))) { log_error(NO_EXIT|NO_MAIL, "%s: unable to unparse princ ('%s'): %s", auth->name, pw->pw_name, error_message(error)); @@ -130,7 +126,7 @@ kerb5_init(pw, promptp, auth) #endif /* For CNS compatibility */ - if (error = krb5_cc_register(sudo_context, &krb5_mcc_ops, FALSE)) { + if ((error = krb5_cc_register(sudo_context, &krb5_mcc_ops, FALSE))) { if (error != KRB5_CC_TYPE_EXISTS) { log_error(NO_EXIT|NO_MAIL, "%s: unable to use Memory ccache: %s", auth->name, @@ -141,8 +137,8 @@ kerb5_init(pw, promptp, auth) (void) snprintf(cache_name, sizeof(cache_name), "MEMORY:sudocc_%ld", (long) getpid()); - if (error = krb5_cc_resolve(sudo_context, cache_name, - &(sudo_krb5_data.ccache))) { + if ((error = krb5_cc_resolve(sudo_context, cache_name, + &(sudo_krb5_data.ccache)))) { log_error(NO_EXIT|NO_MAIL, "%s: unable to resolve ccache: %s", auth->name, error_message(error)); @@ -150,7 +146,7 @@ kerb5_init(pw, promptp, auth) } ccache = sudo_krb5_data.ccache; - if (error = krb5_cc_initialize(sudo_context, ccache, princ)) { + if ((error = krb5_cc_initialize(sudo_context, ccache, princ))) { log_error(NO_EXIT|NO_MAIL, "%s: unable to initialize ccache: %s", auth->name, error_message(error)); @@ -172,7 +168,6 @@ kerb5_verify(pw, pass, auth) krb5_creds creds; krb5_error_code error; krb5_get_init_creds_opt opts; - char cache_name[64]; sudo_context = ((sudo_krb5_datap) auth->data)->sudo_context; princ = ((sudo_krb5_datap) auth->data)->princ; @@ -182,9 +177,9 @@ kerb5_verify(pw, pass, auth) krb5_get_init_creds_opt_init(&opts); /* Note that we always obtain a new TGT to verify the user */ - if (error = krb5_get_init_creds_password(sudo_context, &creds, princ, + if ((error = krb5_get_init_creds_password(sudo_context, &creds, princ, pass, krb5_prompter_posix, - NULL, 0, NULL, &opts)) { + NULL, 0, NULL, &opts))) { if (error == KRB5KRB_AP_ERR_BAD_INTEGRITY) /* Bad password */ return(AUTH_FAILURE); /* Some other error */ @@ -195,7 +190,7 @@ kerb5_verify(pw, pass, auth) } /* Stash the TGT so we can verify it. */ - if (error = krb5_cc_store_cred(sudo_context, ccache, &creds)) { + if ((error = krb5_cc_store_cred(sudo_context, ccache, &creds))) { log_error(NO_EXIT|NO_MAIL, "%s: unable to store credentials: %s", auth->name, error_message(error)); @@ -263,26 +258,25 @@ verify_krb_v5_tgt(sudo_context, ccache, auth_name) * Get the server principal for the local host. * (Use defaults of "host" and canonicalized local name.) */ - if (error = krb5_sname_to_principal(sudo_context, NULL, NULL, - KRB5_NT_SRV_HST, &princ)) { + if ((error = krb5_sname_to_principal(sudo_context, NULL, NULL, + KRB5_NT_SRV_HST, &princ))) { log_error(NO_EXIT|NO_MAIL, "%s: unable to get host principal: %s", auth_name, error_message(error)); return(-1); } - /* Extract the name directly. Yow. */ - strncpy(phost, krb5_princ_component(sudo_context, princ, 1)->data, - sizeof(phost) - 1); - phost[sizeof(phost) - 1] = '\0'; + /* Extract the name directly. + strlcpy(phost, krb5_principal_get_realm(sudo_context, princ, 1), + sizeof(phost)); /* * Do we have host/<host> keys? * (use default keytab, kvno IGNORE_VNO to get the first match, * and enctype is currently ignored anyhow.) */ - if (error = krb5_kt_read_service_key(sudo_context, NULL, princ, 0, - ENCTYPE_DES_CBC_MD5, &keyblock)) { + if ((error = krb5_kt_read_service_key(sudo_context, NULL, princ, 0, + ETYPE_DES_CBC_MD5, &keyblock))) { /* Keytab or service key does not exist. */ log_error(NO_EXIT, "%s: host service key not found: %s", auth_name, @@ -307,7 +301,7 @@ verify_krb_v5_tgt(sudo_context, ccache, auth_name) NULL, NULL, NULL); cleanup: if (packet.data) - krb5_free_data_contents(sudo_context, &packet); + krb5_data_free(&packet); krb5_free_principal(sudo_context, princ); if (error) diff --git a/usr.bin/sudo/auth/pam.c b/usr.bin/sudo/auth/pam.c index 28603f5a897..74c9a8a5b45 100644 --- a/usr.bin/sudo/auth/pam.c +++ b/usr.bin/sudo/auth/pam.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999-2002 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,7 +66,7 @@ #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: pam.c,v 1.29 2002/01/22 16:43:23 millert Exp $"; +static const char rcsid[] = "$Sudo: pam.c,v 1.32 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ static int sudo_conv __P((int, PAM_CONST struct pam_message **, @@ -201,11 +201,11 @@ sudo_conv(num_msg, msg, response, appdata_ptr) struct pam_response **response; VOID *appdata_ptr; { - struct pam_response *pr; + volatile struct pam_response *pr; PAM_CONST struct pam_message *pm; const char *p = def_prompt; - char *pass; - int n; + volatile char *pass; + int n, flags; extern int nil_pw; if ((*response = malloc(num_msg * sizeof(struct pam_response))) == NULL) @@ -213,17 +213,17 @@ sudo_conv(num_msg, msg, response, appdata_ptr) (void) memset(*response, 0, num_msg * sizeof(struct pam_response)); for (pr = *response, pm = *msg, n = num_msg; n--; pr++, pm++) { + flags = tgetpass_flags; switch (pm->msg_style) { case PAM_PROMPT_ECHO_ON: - tgetpass_flags |= TGP_ECHO; + flags |= TGP_ECHO; case PAM_PROMPT_ECHO_OFF: /* Only override PAM prompt if it matches /^Password: ?/ */ if (strncmp(pm->msg, "Password:", 9) || (pm->msg[9] != '\0' && (pm->msg[9] != ' ' || pm->msg[10] != '\0'))) p = pm->msg; /* Read the password. */ - pass = tgetpass(p, def_ival(I_PASSWD_TIMEOUT) * 60, - tgetpass_flags); + pass = tgetpass(p, def_ival(I_PASSWD_TIMEOUT) * 60, flags); pr->resp = estrdup(pass ? pass : ""); if (*pr->resp == '\0') nil_pw = 1; /* empty password */ diff --git a/usr.bin/sudo/auth/passwd.c b/usr.bin/sudo/auth/passwd.c index 98a9fdb6889..26bf6df0f9e 100644 --- a/usr.bin/sudo/auth/passwd.c +++ b/usr.bin/sudo/auth/passwd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999-2002 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,7 +61,7 @@ #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: passwd.c,v 1.11 2002/01/17 15:56:15 millert Exp $"; +static const char rcsid[] = "$Sudo: passwd.c,v 1.12 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ #define DESLEN 13 diff --git a/usr.bin/sudo/auth/rfc1938.c b/usr.bin/sudo/auth/rfc1938.c index 0ad125d48d3..4824e2d33ac 100644 --- a/usr.bin/sudo/auth/rfc1938.c +++ b/usr.bin/sudo/auth/rfc1938.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994-1996, 1998-1999, 2001 + * Copyright (c) 1994-1996, 1998-1999, 2001, 2003 * Todd C. Miller <Todd.Miller@courtesan.com>. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -58,22 +58,26 @@ #include <pwd.h> #if defined(HAVE_SKEY) -#include <skey.h> -#define RFC1938 skey -#define rfc1938challenge skeychallenge -#define rfc1938verify skeyverify +# include <skey.h> +# define RFC1938 skey +# ifdef __NetBSD__ +# define rfc1938challenge(a,b,c,d) skeychallenge((a),(b),(c),(d)) +# else +# define rfc1938challenge(a,b,c,d) skeychallenge((a),(b),(c)) +# endif +# define rfc1938verify(a,b) skeyverify((a),(b)) #elif defined(HAVE_OPIE) -#include <opie.h> -#define RFC1938 opie -#define rfc1938challenge opiechallenge -#define rfc1938verify opieverify +# include <opie.h> +# define RFC1938 opie +# define rfc1938challenge(a,b,c,d) opiechallenge((a),(b),(c)) +# define rfc1938verify(a,b) opieverify((a),(b)) #endif #include "sudo.h" #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: rfc1938.c,v 1.9 2001/12/14 19:52:53 millert Exp $"; +static const char rcsid[] = "$Sudo: rfc1938.c,v 1.11 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ int @@ -115,7 +119,7 @@ rfc1938_setup(pw, promptp, auth) * If the user is not in the OTP db, only post a fatal error if * we are running alone (since they may just use a normal passwd). */ - if (rfc1938challenge(&rfc1938, pw->pw_name, challenge) != 0) { + if (rfc1938challenge(&rfc1938, pw->pw_name, challenge, sizeof(challenge))) { if (IS_ONEANDONLY(auth)) { (void) fprintf(stderr, "%s: You do not exist in the %s database.\n", diff --git a/usr.bin/sudo/auth/securid5.c b/usr.bin/sudo/auth/securid5.c new file mode 100644 index 00000000000..62b443e9fb6 --- /dev/null +++ b/usr.bin/sudo/auth/securid5.c @@ -0,0 +1,236 @@ +/* + * Copyright (c) 1999-2002 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 2002 Michael Stroucken <michael@stroucken.org> + * All rights reserved. + * + * This code is derived from software contributed by Michael Stroucken + * <michael@stroucken.org> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 4. Products derived from this software may not be called "Sudo" nor + * may "Sudo" appear in their names without specific prior written + * permission from the author. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#include <sys/types.h> +#include <sys/param.h> +#include <stdio.h> +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif /* STDC_HEADERS */ +#ifdef HAVE_STRING_H +# include <string.h> +#else +# ifdef HAVE_STRINGS_H +# include <strings.h> +# endif +#endif /* HAVE_STRING_H */ +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif /* HAVE_UNISTD_H */ +#include <pwd.h> + +/* Needed for SecurID v5.0 Authentication on UNIX */ +#define UNIX 1 +#include <acexport.h> +#include <sdacmvls.h> + +#include "sudo.h" +#include "sudo_auth.h" + +#ifndef lint +static const char rcsid[] = "$Sudo: securid5.c,v 1.2 2002/05/20 20:51:23 millert Exp $"; +#endif /* lint */ + +/* + * securid_init - Initialises communications with ACE server + * Arguments in: + * pw - UNUSED + * promptp - UNUSED + * auth - sudo authentication structure + * + * Results out: + * auth - auth->data contains pointer to new SecurID handle + * return code - Fatal if initialization unsuccessful, otherwise + * success. + */ +int +securid_init(pw, promptp, auth) + struct passwd *pw; + char **promptp; + sudo_auth *auth; +{ + static SDI_HANDLE sd_dat; /* SecurID handle */ + + auth->data = (VOID *) &sd_dat; /* For method-specific data */ + + /* Start communications */ + if (AceInitialize() != SD_FALSE) + return(AUTH_SUCCESS); + + fprintf(stderr, "Failed to initialise ACE API library.\n"); + return(AUTH_FATAL); +} + +/* + * securid_setup - Initialises a SecurID transaction and locks out other + * ACE servers + * + * Arguments in: + * pw - struct passwd for username + * promptp - UNUSED + * auth - sudo authentication structure for SecurID handle + * + * Results out: + * return code - Success if transaction started correctly, fatal + * otherwise + */ +int +securid_setup(pw, promptp, auth) + struct passwd *pw; + char **promptp; + sudo_auth *auth; +{ + SDI_HANDLE *sd = (SDI_HANDLE *) auth->data; + int retval; + + /* Re-initialize SecurID every time. */ + if (SD_Init(sd) != ACM_OK) { + (void) fprintf(stderr, "%s: Cannot contact SecurID server\n", Argv[0]); + return(AUTH_FATAL); + } + + /* Lock new PIN code */ + retval = SD_Lock(*sd, pw->pw_name); + + switch (retval) { + case ACE_UNDEFINED_USERNAME: + fprintf(stderr, "Invalid username length for SecurID\n"); + return(AUTH_FATAL); + + case ACE_ERR_INVALID_HANDLE: + fprintf(stderr, "Invalid Authentication Handle for SecurID\n"); + return(AUTH_FATAL); + + case ACM_ACCESS_DENIED: + fprintf(stderr, "SecurID communication has failed\n"); + return(AUTH_FATAL); + + case ACM_OK: + fprintf(stderr, "User ID locked for SecurID Authentication\n"); + return(AUTH_SUCCESS); + } +} + +/* + * securid_verify - Authenticates user and handles ACE responses + * + * Arguments in: + * pw - struct passwd for username + * pass - UNUSED + * auth - sudo authentication structure for SecurID handle + * + * Results out: + * return code - Success on successful authentication, failure on + * incorrect authentication, fatal on errors + */ +int +securid_verify(pw, pass, auth) + struct passwd *pw; + char *pass; + sudo_auth *auth; +{ + SDI_HANDLE *sd = (SDI_HANDLE *) auth->data; + int rval; + + pass = (char *) tgetpass("Enter your PASSCODE: ", + def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags); + + /* Have ACE verify password */ + switch (SD_Check(*sd, pass, pw->pw_name)) { + case ACE_UNDEFINED_PASSCODE: + fprintf(stderr, "Invalid passcode length for SecurID\n"); + rval = AUTH_FATAL; + break; + + case ACE_UNDEFINED_USERNAME: + fprintf(stderr, "Invalid username length for SecurID\n"); + rval = AUTH_FATAL; + break; + + case ACE_ERR_INVALID_HANDLE: + fprintf(stderr, "Invalid Authentication Handle for SecurID\n"); + rval = AUTH_FATAL; + + case ACM_ACCESS_DENIED: + rval = AUTH_FAILURE; + break; + + case ACM_NEXT_CODE_REQUIRED: + /* Sometimes (when current token close to expire?) + ACE challenges for the next token displayed + (entered without the PIN) */ + pass = (char *) tgetpass("\ +!!! ATTENTION !!!\n\ +Wait for the token code to change, \n\ +then enter the new token code.\n", \ + def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags); + + if (SD_Next(*sd, pass) == ACM_OK) { + rval = AUTH_SUCCESS; + break; + } + + rval = AUTH_FAILURE; + break; + + case ACM_NEW_PIN_REQUIRED: + /* + * This user's SecurID has not been activated yet, + * or the pin has been reset + */ + /* XXX - Is setting up a new PIN within sudo's scope? */ + SD_Pin(*sd, ""); + fprintf(stderr, "Your SecurID access has not yet been set up.\n"); + fprintf(stderr, "Please set up a PIN before you try to authenticate.\n"); + rval = AUTH_FATAL; + break; + } + + /* Free resources */ + SD_Close(*sd); + + /* Return stored state to calling process */ + return(rval); +} diff --git a/usr.bin/sudo/auth/sudo_auth.c b/usr.bin/sudo/auth/sudo_auth.c index eb4c3c4f9a9..c02fd2e51a3 100644 --- a/usr.bin/sudo/auth/sudo_auth.c +++ b/usr.bin/sudo/auth/sudo_auth.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999-2002 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,7 +67,7 @@ #include "insults.h" #ifndef lint -static const char rcsid[] = "$Sudo: sudo_auth.c,v 1.25 2001/12/14 19:52:54 millert Exp $"; +static const char rcsid[] = "$Sudo: sudo_auth.c,v 1.28 2003/03/15 20:37:44 millert Exp $"; #endif /* lint */ sudo_auth auth_switch[] = { @@ -113,7 +113,7 @@ verify_user(pw, prompt) int success = AUTH_FAILURE; int status; int flags; - char *p; + volatile char *p; sudo_auth *auth; sigaction_t sa, osa; @@ -138,7 +138,7 @@ verify_user(pw, prompt) for (auth = auth_switch; auth->name; auth++) { if (auth->init && IS_CONFIGURED(auth)) { if (NEEDS_USER(auth)) - set_perms(PERM_USER, 0); + set_perms(PERM_USER); status = (auth->init)(pw, &prompt, auth); if (status == AUTH_FAILURE) @@ -147,7 +147,7 @@ verify_user(pw, prompt) exit(1); /* assume error msg already printed */ if (NEEDS_USER(auth)) - set_perms(PERM_ROOT, 0); + set_perms(PERM_ROOT); } } @@ -156,7 +156,7 @@ verify_user(pw, prompt) for (auth = auth_switch; auth->name; auth++) { if (auth->setup && IS_CONFIGURED(auth)) { if (NEEDS_USER(auth)) - set_perms(PERM_USER, 0); + set_perms(PERM_USER); status = (auth->setup)(pw, &prompt, auth); if (status == AUTH_FAILURE) @@ -165,7 +165,7 @@ verify_user(pw, prompt) exit(1); /* assume error msg already printed */ if (NEEDS_USER(auth)) - set_perms(PERM_ROOT, 0); + set_perms(PERM_ROOT); } } @@ -186,12 +186,12 @@ verify_user(pw, prompt) continue; if (NEEDS_USER(auth)) - set_perms(PERM_USER, 0); + set_perms(PERM_USER); - success = auth->status = (auth->verify)(pw, p, auth); + success = auth->status = (auth->verify)(pw, (char *)p, auth); if (NEEDS_USER(auth)) - set_perms(PERM_ROOT, 0); + set_perms(PERM_ROOT); if (auth->status != AUTH_FAILURE) goto cleanup; @@ -217,14 +217,14 @@ cleanup: for (auth = auth_switch; auth->name; auth++) { if (auth->cleanup && IS_CONFIGURED(auth)) { if (NEEDS_USER(auth)) - set_perms(PERM_USER, 0); + set_perms(PERM_USER); status = (auth->cleanup)(pw, auth); if (status == AUTH_FATAL) /* XXX log */ exit(1); /* assume error msg already printed */ if (NEEDS_USER(auth)) - set_perms(PERM_ROOT, 0); + set_perms(PERM_ROOT); } } diff --git a/usr.bin/sudo/check.c b/usr.bin/sudo/check.c index 242aa005468..fb3f182d49e 100644 --- a/usr.bin/sudo/check.c +++ b/usr.bin/sudo/check.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1993-1996,1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1993-1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,7 +67,7 @@ #include "sudo.h" #ifndef lint -static const char rcsid[] = "$Sudo: check.c,v 1.203 2002/04/25 15:30:12 millert Exp $"; +static const char rcsid[] = "$Sudo: check.c,v 1.210 2003/03/15 20:31:01 millert Exp $"; #endif /* lint */ /* Status codes for timestamp_status() */ @@ -145,6 +145,8 @@ update_timestamp(timestampdir, timestampfile) char *timestampfile; { + if (timestamp_uid != 0) + set_perms(PERM_TIMESTAMP); if (touch(timestampfile ? timestampfile : timestampdir, time(NULL)) == -1) { if (timestampfile) { int fd = open(timestampfile, O_WRONLY|O_CREAT|O_TRUNC, 0600); @@ -158,6 +160,8 @@ update_timestamp(timestampdir, timestampfile) log_error(NO_EXIT|USE_ERRNO, "Can't mkdir %s", timestampdir); } } + if (timestamp_uid != 0) + set_perms(PERM_ROOT); } /* @@ -170,57 +174,101 @@ expand_prompt(old_prompt, user, host) char *user; char *host; { - size_t len; + size_t len, n; int subst; - char *p, *np, *new_prompt, lastchar; + char *p, *np, *new_prompt, *endp; /* How much space do we need to malloc for the prompt? */ subst = 0; - for (p = old_prompt, len = strlen(old_prompt), lastchar = '\0'; *p; p++) { - if (lastchar == '%') { - if (*p == 'h') { - len += strlen(user_shost) - 2; - subst = 1; - } else if (*p == 'u') { - len += strlen(user_name) - 2; - subst = 1; + for (p = old_prompt, len = strlen(old_prompt); *p; p++) { + if (p[0] =='%') { + switch (p[1]) { + case 'h': + p++; + len += strlen(user_shost) - 2; + subst = 1; + break; + case 'H': + p++; + len += strlen(user_host) - 2; + subst = 1; + break; + case 'u': + p++; + len += strlen(user_name) - 2; + subst = 1; + break; + case 'U': + p++; + len += strlen(*user_runas) - 2; + subst = 1; + break; + case '%': + p++; + len--; + subst = 1; + break; + default: + break; } } - - if (lastchar == '%' && *p == '%') { - lastchar = '\0'; - len--; - } else - lastchar = *p; } if (subst) { - new_prompt = (char *) emalloc(len + 1); - for (p = old_prompt, np = new_prompt, lastchar = '\0'; *p; p++) { - if (lastchar == '%' && (*p == 'h' || *p == 'u' || *p == '%')) { - /* substitute user/host name */ - if (*p == 'h') { - np--; - strcpy(np, user_shost); - np += strlen(user_shost); - } else if (*p == 'u') { - np--; - strcpy(np, user_name); - np += strlen(user_name); + new_prompt = (char *) emalloc(++len); + *new_prompt = '\0'; + endp = new_prompt + len - 1; + for (p = old_prompt, np = new_prompt; *p; p++) { + if (p[0] =='%') { + switch (p[1]) { + case 'h': + p++; + if ((n = strlcat(new_prompt, user_shost, len)) >= len) + goto oflow; + np += n; + continue; + case 'H': + p++; + if ((n = strlcat(new_prompt, user_host, len)) >= len) + goto oflow; + np += n; + continue; + case 'u': + p++; + if ((n = strlcat(new_prompt, user_name, len)) >= len) + goto oflow; + np += n; + continue; + case 'U': + p++; + if ((n = strlcat(new_prompt, *user_runas, len)) >= len) + goto oflow; + np += n; + continue; + case '%': + /* convert %% -> % */ + p++; + break; + default: + /* no conversion */ + break; } - } else - *np++ = *p; - - if (lastchar == '%' && *p == '%') - lastchar = '\0'; - else - lastchar = *p; + } + if (np >= endp) + goto oflow; + *np++ = *p; } *np = '\0'; } else new_prompt = old_prompt; return(new_prompt); + +oflow: + /* We pre-allocate enough space, so this should never happen. */ + (void) fprintf(stderr, "%s: internal error, expand_prompt() overflow\n", + Argv[0]); + exit(1); } /* @@ -307,6 +355,9 @@ timestamp_status(timestampdir, timestampfile, user, make_dirs) char *dirparent = def_str(I_TIMESTAMPDIR); int status = TS_ERROR; /* assume the worst */ + if (timestamp_uid != 0) + set_perms(PERM_TIMESTAMP); + /* * Sanity check dirparent and make it if it doesn't already exist. * We start out assuming the worst (that the dir is not sane) and @@ -318,9 +369,10 @@ timestamp_status(timestampdir, timestampfile, user, make_dirs) if (!S_ISDIR(sb.st_mode)) log_error(NO_EXIT, "%s exists but is not a directory (0%o)", dirparent, sb.st_mode); - else if (sb.st_uid != 0) - log_error(NO_EXIT, "%s owned by uid %ld, should be owned by root", - dirparent, (long) sb.st_uid); + else if (sb.st_uid != timestamp_uid) + log_error(NO_EXIT, "%s owned by uid %lu, should be uid %lu", + dirparent, (unsigned long) sb.st_uid, + (unsigned long) timestamp_uid); else if ((sb.st_mode & 0000022)) log_error(NO_EXIT, "%s writable by non-owner (0%o), should be mode 0700", @@ -342,8 +394,11 @@ timestamp_status(timestampdir, timestampfile, user, make_dirs) status = TS_MISSING; } } - if (status == TS_ERROR) + if (status == TS_ERROR) { + if (timestamp_uid != 0) + set_perms(PERM_ROOT); return(status); + } /* * Sanity check the user's ticket dir. We start by downgrading @@ -361,9 +416,10 @@ timestamp_status(timestampdir, timestampfile, user, make_dirs) } else log_error(NO_EXIT, "%s exists but is not a directory (0%o)", timestampdir, sb.st_mode); - } else if (sb.st_uid != 0) - log_error(NO_EXIT, "%s owned by uid %ld, should be owned by root", - timestampdir, (long) sb.st_uid); + } else if (sb.st_uid != timestamp_uid) + log_error(NO_EXIT, "%s owned by uid %lu, should be uid %lu", + timestampdir, (unsigned long) sb.st_uid, + (unsigned long) timestamp_uid); else if ((sb.st_mode & 0000022)) log_error(NO_EXIT, "%s writable by non-owner (0%o), should be mode 0700", @@ -402,10 +458,11 @@ timestamp_status(timestampdir, timestampfile, user, make_dirs) timestampfile, sb.st_mode); } else { /* If bad uid or file mode, complain and kill the bogus file. */ - if (sb.st_uid != 0) { + if (sb.st_uid != timestamp_uid) { log_error(NO_EXIT, - "%s owned by uid %ld, should be owned by root", - timestampfile, (long) sb.st_uid); + "%s owned by uid %ud, should be uid %lu", + timestampfile, (unsigned long) sb.st_uid, + (unsigned long) timestamp_uid); (void) unlink(timestampfile); } else if ((sb.st_mode & 0000022)) { log_error(NO_EXIT, @@ -456,6 +513,8 @@ timestamp_status(timestampdir, timestampfile, user, make_dirs) } } + if (timestamp_uid != 0) + set_perms(PERM_ROOT); return(status); } diff --git a/usr.bin/sudo/compat.h b/usr.bin/sudo/compat.h index 09f95e371ec..a5cf55fc593 100644 --- a/usr.bin/sudo/compat.h +++ b/usr.bin/sudo/compat.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2002 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Sudo: compat.h,v 1.63 2002/01/25 18:38:22 millert Exp $ + * $Sudo: compat.h,v 1.65 2003/03/15 20:31:02 millert Exp $ */ #ifndef _SUDO_COMPAT_H @@ -168,32 +168,6 @@ #endif /* - * Emulate sete[ug]id() via setres[ug]id(2) or setre[ug]id(2) - */ -#ifndef HAVE_SETEUID -# ifdef __hpux -# define seteuid(_EUID) (setresuid((uid_t) -1, _EUID, (uid_t) -1)) -# else -# define seteuid(_EUID) (setreuid((uid_t) -1, _EUID)) -# endif /* __hpux */ -#endif /* HAVE_SETEUID */ -#ifndef HAVE_SETEGID -# ifdef __hpux -# define setegid(_EGID) (setresgid((gid_t) -1, _EGID, (gid_t) -1)) -# else -# define setegid(_EGID) (setregid((gid_t) -1, _EGID)) -# endif /* __hpux */ -#endif /* HAVE_SETEGID */ - -/* - * Emulate setreuid() for HP-UX via setresuid(2) - */ -#if !defined(HAVE_SETREUID) && defined(__hpux) -# define setreuid(_RUID, _EUID) (setresuid(_RUID, _EUID, (uid_t) -1)) -# define HAVE_SETREUID -#endif /* !HAVE_SETEUID && __hpux */ - -/* * NCR's SVr4 has _innetgr(3) instead of innetgr(3) for some reason. */ #ifdef HAVE__INNETGR diff --git a/usr.bin/sudo/config.guess b/usr.bin/sudo/config.guess index 6012b39695f..795a1638dae 100644 --- a/usr.bin/sudo/config.guess +++ b/usr.bin/sudo/config.guess @@ -1,9 +1,11 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. +# +# $Sudo: config.guess,v 1.8 2003/01/20 19:39:04 millert Exp $ -timestamp='2001-07-12' +timestamp='2002-11-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,8 +26,9 @@ timestamp='2001-07-12' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Written by Per Bothner <bothner@cygnus.com>. -# Please send patches to <config-patches@gnu.org>. +# Originally written by Per Bothner <per@bothner.com>. +# Please send patches to <config-patches@gnu.org>. Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -87,30 +90,40 @@ if test $# != 0; then exit 1 fi +trap 'exit 1' 1 2 15 -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. -# CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. -set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c ; - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; - if test $? = 0 ; then +# This shell variable is my proudest work .. or something. --bje + +set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; +(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) + || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; +dummy=$tmpdir/dummy ; +files="$dummy.c $dummy.o $dummy.rel $dummy" ; +trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; - rm -f $dummy.c $dummy.o $dummy.rel ; + rm -f $files ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac' +esac ; +unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -127,29 +140,30 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) - # Netbsd (nbsd) targets should (where applicable) match one or + # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - *) machine=${UNAME_MACHINE}-unknown ;; + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null @@ -166,12 +180,62 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -180,6 +244,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. + eval $set_cc_for_build cat <<EOF >$dummy.s .data \$Lformat: @@ -205,10 +270,9 @@ main: jsr \$26,exit .end main EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null if test "$?" = 0 ; then - case `./$dummy` in + case `$dummy` in 0-0) UNAME_MACHINE="alpha" ;; @@ -227,9 +291,15 @@ EOF 2-307) UNAME_MACHINE="alphaev67" ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; esac fi - rm -f $dummy.s $dummy + rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) @@ -244,29 +314,11 @@ EOF Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -288,6 +340,10 @@ EOF NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; @@ -316,7 +372,7 @@ EOF echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) @@ -330,9 +386,6 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -359,18 +412,6 @@ EOF *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; @@ -387,6 +428,7 @@ EOF echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include <stdio.h> /* for printf() prototype */ @@ -408,16 +450,21 @@ EOF exit (-1); } EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -478,6 +525,7 @@ EOF exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <sys/systemcfg.h> @@ -489,9 +537,8 @@ EOF exit(0); } EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -500,7 +547,7 @@ EOF fi exit 0 ;; *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else @@ -540,10 +587,8 @@ EOF 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - case "${HPUX_REV}" in - 11.[0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 @@ -552,12 +597,13 @@ EOF case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac - fi ;; - esac - if [ "${HP_ARCH}" = "" ]; then - sed 's/^ //' << EOF >$dummy.c + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include <stdlib.h> @@ -590,11 +636,10 @@ EOF exit (0); } EOF - eval $set_cc_for_build - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy && rmdir $tmpdir + fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; @@ -603,6 +648,7 @@ EOF echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <unistd.h> int @@ -628,9 +674,8 @@ EOF exit (0); } EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -658,9 +703,6 @@ EOF parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -679,9 +721,6 @@ EOF C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; @@ -703,18 +742,12 @@ EOF CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; @@ -725,10 +758,19 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -739,11 +781,17 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:3*) + echo i586-pc-interix3 + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix + echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin @@ -764,20 +812,57 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) - case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in - big) echo mips-unknown-linux-gnu && exit 0 ;; - little) echo mipsel-unknown-linux-gnu && exit 0 ;; - esac + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + rm -f $dummy.c && rmdir $tmpdir + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + rm -f $dummy.c && rmdir $tmpdir + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -786,7 +871,7 @@ EOF PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi @@ -819,7 +904,8 @@ EOF # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. - ld_supported_targets=`cd /; ld --help 2>&1 \ + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// @@ -831,7 +917,7 @@ EOF ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; @@ -842,33 +928,30 @@ EOF exit 0 ;; esac # Determine whether the default compiler is a.out or elf - cat >$dummy.c <<EOF -#include <features.h> -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-pc-linux-gnu\n", argv[1]); -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-pc-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) @@ -885,6 +968,23 @@ EOF # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -906,22 +1006,19 @@ EOF UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -945,9 +1042,15 @@ EOF # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -964,9 +1067,6 @@ EOF mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; @@ -993,8 +1093,8 @@ EOF echo ns32k-sni-sysv fi exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) @@ -1006,6 +1106,10 @@ EOF # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; @@ -1034,6 +1138,9 @@ EOF SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; @@ -1044,15 +1151,17 @@ EOF echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1075,11 +1184,6 @@ EOF fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; @@ -1103,6 +1207,7 @@ esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +eval $set_cc_for_build cat >$dummy.c <<EOF #ifdef _SEQUENT_ # include <sys/types.h> @@ -1217,9 +1322,8 @@ main () } EOF -eval $set_cc_for_build -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. diff --git a/usr.bin/sudo/config.h.in b/usr.bin/sudo/config.h.in index 281fc132b5e..b83a6164c23 100644 --- a/usr.bin/sudo/config.h.in +++ b/usr.bin/sudo/config.h.in @@ -1,4 +1,4 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ +/* config.h.in. Generated from configure.in by autoheader. */ #ifndef _SUDO_CONFIG_H #define _SUDO_CONFIG_H @@ -18,7 +18,7 @@ /* Define if you want insults culled from the twisted minds of CSOps. */ #undef CSOPS_INSULTS -/* Define if using `alloca.c'. */ +/* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define if you want sudo to display "command not allowed" instead of @@ -46,19 +46,20 @@ /* Define if you use AFS. */ #undef HAVE_AFS -/* Define if you have `alloca', as a function or macro. */ +/* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA -/* Define if you have <alloca.h> and it should be used (not on Ultrix). */ +/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). + */ #undef HAVE_ALLOCA_H -/* Define if you have the `asprintf' function. */ +/* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF /* Define if you use AIX general authentication. */ #undef HAVE_AUTHENTICATE -/* Define if you have the `bigcrypt' function. */ +/* Define to 1 if you have the `bigcrypt' function. */ #undef HAVE_BIGCRYPT /* Define if you use BSD authentication. */ @@ -67,22 +68,23 @@ /* Define if you use OSF DCE. */ #undef HAVE_DCE -/* Define if you have the <dirent.h> header file, and it defines `DIR'. */ +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ #undef HAVE_DIRENT_H -/* Define if you have the `dispcrypt' function. */ +/* Define to 1 if you have the `dispcrypt' function. */ #undef HAVE_DISPCRYPT -/* Define if you have the `flock' function. */ +/* Define to 1 if you have the `flock' function. */ #undef HAVE_FLOCK /* Define if you have the `fnmatch' function. */ #undef HAVE_FNMATCH -/* Define if you have the `freeifaddrs' function. */ +/* Define to 1 if you have the `freeifaddrs' function. */ #undef HAVE_FREEIFADDRS -/* Define if you have the `fstat' function. */ +/* Define to 1 if you have the `fstat' function. */ #undef HAVE_FSTAT /* Define if you use the FWTK authsrv daemon. */ @@ -92,13 +94,13 @@ */ #undef HAVE_GETAUTHUID -/* Define if you have the `getcwd' function. */ +/* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD -/* Define if you have the `getdomainname' function. */ +/* Define to 1 if you have the `getdomainname' function. */ #undef HAVE_GETDOMAINNAME -/* Define if you have the `getifaddrs' function. */ +/* Define to 1 if you have the `getifaddrs' function. */ #undef HAVE_GETIFADDRS /* Define if you have the `getprpwnam' function. (SecureWare-style shadow @@ -116,16 +118,16 @@ passwords) */ #undef HAVE_GETSPWUID -/* Define if you have the `initgroups' function. */ +/* Define to 1 if you have the `initgroups' function. */ #undef HAVE_INITGROUPS -/* Define if you have the `initprivs' function. */ +/* Define to 1 if you have the `initprivs' function. */ #undef HAVE_INITPRIVS -/* Define if you have the `innetgr' function. */ +/* Define to 1 if you have the `innetgr' function. */ #undef HAVE_INNETGR -/* Define if you have the <inttypes.h> header file. */ +/* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define if you have isblank(3). */ @@ -145,37 +147,37 @@ /* Define if you use Kerberos V. */ #undef HAVE_KERB5 -/* Define if you have the `lockf' function. */ +/* Define to 1 if you have the `lockf' function. */ #undef HAVE_LOCKF -/* Define if you have the <login_cap.h> header file. */ +/* Define to 1 if you have the <login_cap.h> header file. */ #undef HAVE_LOGIN_CAP_H /* Define if your compiler supports the "long long" type. */ #undef HAVE_LONG_LONG -/* Define if you have the `lsearch' function. */ +/* Define to 1 if you have the `lsearch' function. */ #undef HAVE_LSEARCH -/* Define if you have the <malloc.h> header file. */ +/* Define to 1 if you have the <malloc.h> header file. */ #undef HAVE_MALLOC_H -/* Define if you have the `memchr' function. */ +/* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR -/* Define if you have the `memcpy' function. */ +/* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY -/* Define if you have the <memory.h> header file. */ +/* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H -/* Define if you have the `memset' function. */ +/* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET -/* Define if you have the <ndir.h> header file, and it defines `DIR'. */ +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ #undef HAVE_NDIR_H -/* Define if you have the <netgroup.h> header file. */ +/* Define to 1 if you have the <netgroup.h> header file. */ #undef HAVE_NETGROUP_H /* Define if you use NRL OPIE. */ @@ -184,7 +186,7 @@ /* Define if you use PAM. */ #undef HAVE_PAM -/* Define if you have the <paths.h> header file. */ +/* Define to 1 if you have the <paths.h> header file. */ #undef HAVE_PATHS_H /* Define if your struct sockadr has an sa_len field. */ @@ -193,31 +195,28 @@ /* Define if you use SecurID. */ #undef HAVE_SECURID -/* Define if you have the `setegid' function. */ -#undef HAVE_SETEGID +/* Define to 1 if you have the `setresuid' function. */ +#undef HAVE_SETRESUID -/* Define if you have the `seteuid' function. */ -#undef HAVE_SETEUID - -/* Define if you have the `setreuid' function. */ +/* Define to 1 if you have the `setreuid' function. */ #undef HAVE_SETREUID -/* Define if you have the `setrlimit' function. */ +/* Define to 1 if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT -/* Define if you have the `set_auth_parameters' function. */ +/* Define to 1 if you have the `set_auth_parameters' function. */ #undef HAVE_SET_AUTH_PARAMETERS /* Define if you use SIA. */ #undef HAVE_SIA -/* Define if you have the `sigaction' function. */ +/* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* Define if <signal.h> has the sigaction_t typedef. */ #undef HAVE_SIGACTION_T -/* Define if the system has the type `sig_atomic_t'. */ +/* Define to 1 if the system has the type `sig_atomic_t'. */ #undef HAVE_SIG_ATOMIC_T /* Define if you use S/Key. */ @@ -226,95 +225,103 @@ /* Define if your S/Key library has skeyaccess(). */ #undef HAVE_SKEYACCESS -/* Define if you have the `snprintf' function. */ +/* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF -/* Define if you have the <stdint.h> header file. */ +/* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H -/* Define if you have the <stdlib.h> header file. */ +/* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H -/* Define if you have the `strcasecmp' function. */ +/* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP -/* Define if you have the `strchr' function. */ +/* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR -/* Define if you have the `strerror' function. */ +/* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR -/* Define if you have the `strftime' function. */ +/* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME -/* Define if you have the <strings.h> header file. */ +/* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H -/* Define if you have the <string.h> header file. */ +/* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H -/* Define if you have the `strrchr' function. */ +/* Define to 1 if you have the `strlcat' function. */ +#undef HAVE_STRLCAT + +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + +/* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR -/* Define if you have the `sysconf' function. */ +/* Define to 1 if you have the `sysconf' function. */ #undef HAVE_SYSCONF -/* Define if you have the <sys/bsdtypes.h> header file. */ +/* Define to 1 if you have the <sys/bsdtypes.h> header file. */ #undef HAVE_SYS_BSDTYPES_H -/* Define if you have the <sys/dir.h> header file, and it defines `DIR'. */ +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ #undef HAVE_SYS_DIR_H -/* Define if you have the <sys/ndir.h> header file, and it defines `DIR'. */ +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ #undef HAVE_SYS_NDIR_H -/* Define if you have the <sys/select.h> header file. */ +/* Define to 1 if you have the <sys/select.h> header file. */ #undef HAVE_SYS_SELECT_H -/* Define if you have the <sys/sockio.h> header file. */ +/* Define to 1 if you have the <sys/sockio.h> header file. */ #undef HAVE_SYS_SOCKIO_H -/* Define if you have the <sys/stat.h> header file. */ +/* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H -/* Define if you have the <sys/types.h> header file. */ +/* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define if you have the <termios.h> header file and the `tcgetattr' function. */ #undef HAVE_TERMIOS_H -/* Define if you have the <termio.h> header file. */ +/* Define to 1 if you have the <termio.h> header file. */ #undef HAVE_TERMIO_H -/* Define if you have the `tzset' function. */ +/* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET -/* Define if you have the <unistd.h> header file. */ +/* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Define if you have the `utime' function. */ +/* Define to 1 if you have the `utime' function. */ #undef HAVE_UTIME -/* Define if you have the <utime.h> header file. */ +/* Define to 1 if you have the <utime.h> header file. */ #undef HAVE_UTIME_H /* Define if you have a POSIX utime() (uses struct utimbuf). */ #undef HAVE_UTIME_POSIX -/* Define if you have the `vasprintf' function. */ +/* Define to 1 if you have the `vasprintf' function. */ #undef HAVE_VASPRINTF -/* Define if you have the `vsnprintf' function. */ +/* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF -/* Define if you have the `wait3' function. */ +/* Define to 1 if you have the `wait3' function. */ #undef HAVE_WAIT3 -/* Define if you have the `waitpid' function. */ +/* Define to 1 if you have the `waitpid' function. */ #undef HAVE_WAITPID -/* Define if you have the `_innetgr' function. */ +/* Define to 1 if you have the `_innetgr' function. */ #undef HAVE__INNETGR /* Define if you want the hostname to be entered into the log file. */ @@ -388,11 +395,11 @@ /* Define to override the user's path with a builtin one. */ #undef SECURE_PATH -/* Define to send mail when the user is not not allowed to run a command. */ +/* Define to send mail when the user is not allowed to run a command. */ #undef SEND_MAIL_WHEN_NOT_OK -/* Define to send mail when the user is not not allowed to run sudo on this - host. */ +/* Define to send mail when the user is not allowed to run sudo on this host. + */ #undef SEND_MAIL_WHEN_NO_HOST /* Define to send mail when the user is not in the sudoers file. */ @@ -401,7 +408,7 @@ /* Define if you want sudo to start a shell if given no arguments. */ #undef SHELL_IF_NO_ARGS -/* Define if you want sudo to set /home/millert in shell mode. */ +/* Define if you want sudo to set $HOME in shell mode. */ #undef SHELL_SETS_HOME /* If using the C implementation of alloca, define if you know the @@ -412,7 +419,7 @@ STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION -/* Define if you have the ANSI C header files. */ +/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if the code in interfaces.c does not compile for you. */ @@ -435,6 +442,9 @@ */ #undef USE_INSULTS +/* Define if you use stow packaging. */ +#undef USE_STOW + /* Define if you want a different ticket file for each tty. */ #undef USE_TTY_TICKETS @@ -460,9 +470,6 @@ # define _GNU_SOURCE 1 #endif -/* Define if you need to in order for stat and other things to work. */ -#undef _POSIX_SOURCE - /* Define to empty if `const' does not conform to ANSI C. */ #undef const @@ -505,6 +512,13 @@ # endif #endif +/* GNU stow needs /etc/sudoers to be a symlink. */ +#ifdef HAVE_STOW +# define stat_sudoers stat +#else +# define stat_sudoers lstat +#endif + /* Solaris doesn't use const qualifiers in PAM. */ #ifdef sun # define PAM_CONST diff --git a/usr.bin/sudo/config.sub b/usr.bin/sudo/config.sub index 31600b0aae3..9fe531eebf5 100644 --- a/usr.bin/sudo/config.sub +++ b/usr.bin/sudo/config.sub @@ -1,9 +1,11 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. +# +# $Sudo: config.sub,v 1.11 2003/01/20 21:07:51 millert Exp $ -timestamp='2001-06-08' +timestamp='2002-11-30' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -29,7 +31,8 @@ timestamp='2001-06-08' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Please send patches to <config-patches@gnu.org>. +# Please send patches to <config-patches@gnu.org>. Submit a context +# diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -117,7 +120,7 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) + nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -223,26 +226,46 @@ esac case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ - | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ - | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 \ - | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ - | hppa64 \ - | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ - | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | sh[34] \ - | powerpc | powerpcle \ - | 1750a | dsp16xx | pdp10 | pdp11 \ - | mips16 | mips64 | mipsel | mips64el \ - | mips64orion | mips64orionel | mipstx39 | mipstx39el \ - | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \ - | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ - | v850 | c4x \ - | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ - | pj | pjl | h8500 | z8k) + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) @@ -265,31 +288,56 @@ case $basic_machine in exit 1 ;; # Recognize the basic CPU types with company name. - # FIXME: clean up the formatting here. - vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ - | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ - | xmp-* | ymp-* \ - | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ - | hppa2.0n-* | hppa64-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ - | alphaev6[78]-* \ - | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ - | clipper-* | orion-* \ - | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ - | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ - | mips16-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ - | mipstx39-* | mipstx39el-* | mcore-* \ - | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ - | [cjt]90-* \ - | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ - | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39 | mipstx39el \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -352,6 +400,10 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -372,16 +424,8 @@ case $basic_machine in basic_machine=c38-convex os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; crds | unos) @@ -396,6 +440,14 @@ case $basic_machine in decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola @@ -580,14 +632,6 @@ case $basic_machine in basic_machine=m68k-atari os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; @@ -602,6 +646,10 @@ case $basic_machine in basic_machine=m68k-rom68k os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) basic_machine=i386-pc os=-msdos @@ -681,6 +729,10 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose @@ -703,19 +755,19 @@ case $basic_machine in pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | k6 | nexgen) + pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon) + pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-*) + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) @@ -730,15 +782,25 @@ case $basic_machine in power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown - ;; + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown - ;; + ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; @@ -756,10 +818,22 @@ case $basic_machine in rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; sequent) basic_machine=i386-sequent ;; @@ -767,7 +841,7 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; - sparclite-wrs) + sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -833,10 +907,22 @@ case $basic_machine in basic_machine=i386-sequent os=-dynix ;; + t3d) + basic_machine=alpha-cray + os=-unicos + ;; t3e) - basic_machine=t3e-cray + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray os=-unicos ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff @@ -847,6 +933,10 @@ case $basic_machine in tx39el) basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -871,8 +961,8 @@ case $basic_machine in os=-vms ;; vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -893,17 +983,13 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; - windows32) - basic_machine=i386-pc - os=-windows32-msvcrt + xps | xps100) + basic_machine=xps100-honeywell ;; - xmp) - basic_machine=xmp-cray + ymp) + basic_machine=ymp-cray os=-unicos ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim @@ -924,13 +1010,6 @@ case $basic_machine in op60c) basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm ;; @@ -950,13 +1029,16 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4) + sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; + sh64) + basic_machine=sh64-unknown + ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -971,10 +1053,6 @@ case $basic_machine in pmac | pmac-mpw) basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; @@ -1037,9 +1115,12 @@ case $os in | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1051,8 +1132,10 @@ case $os in ;; esac ;; + -nto-qnx*) + ;; -nto*) - os=-nto-qnx + os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ @@ -1091,14 +1174,20 @@ case $os in -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; -nsk*) os=-nsk @@ -1137,8 +1226,8 @@ case $os in -xenix) os=-xenix ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint ;; -none) ;; @@ -1171,10 +1260,11 @@ case $basic_machine in arm*-semi) os=-aout ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; - pdp11-*) + pdp11-*) os=-none ;; *-dec | vax-*) @@ -1201,6 +1291,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; @@ -1264,19 +1357,19 @@ case $basic_machine in *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; *-masscomp) @@ -1348,7 +1441,7 @@ case $basic_machine in -ptx*) vendor=sequent ;; - -vxsim* | -vxworks*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) @@ -1363,6 +1456,9 @@ case $basic_machine in -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; + -vos*) + vendor=stratus + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; diff --git a/usr.bin/sudo/configure b/usr.bin/sudo/configure index ac05512483d..c73456469a4 100644 --- a/usr.bin/sudo/configure +++ b/usr.bin/sudo/configure @@ -1,12 +1,81 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52 for sudo 1.6.6. +# Generated by GNU Autoconf 2.57 for sudo 1.6.7. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -14,22 +83,113 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} -# Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -55,24 +215,20 @@ else fi rm -f conf$$ conf$$.exe conf$$.file -as_executable_p="test -f" - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: else - as_unset=false + as_mkdir_p=false fi -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + # IFS # We need space, tab and new line, in precisely that order. @@ -81,7 +237,8 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -94,9 +251,11 @@ exec 6>&1 # Initializations. # ac_default_prefix=/usr/local +ac_config_libobj_dir=. cross_compiling=no subdirs= -MFLAGS= MAKEFLAGS= +MFLAGS= +MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. @@ -104,6 +263,13 @@ SHELL=${CONFIG_SHELL-/bin/sh} # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} +# Identity of this package. +PACKAGE_NAME='sudo' +PACKAGE_TARNAME='sudo' +PACKAGE_VERSION='1.6.7' +PACKAGE_STRING='sudo 1.6.7' +PACKAGE_BUGREPORT='' + # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> @@ -141,6 +307,9 @@ ac_includes_default="\ # include <unistd.h> #endif" +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CFLAGS PROGS CPPFLAGS LDFLAGS SUDO_LDFLAGS SUDO_LIBS NET_LIBS AFS_LIBS OSDEFS AUTH_OBJS MANTYPE MAN_POSTINSTALL SUDOERS_MODE SUDOERS_UID SUDOERS_GID DEV mansectsu mansectform mansrcdir timedir timeout password_timeout sudo_umask passprompt long_otp_prompt lecture logfac goodpri badpri loglen ignore_dot mail_no_user mail_no_host mail_no_perms mailto mailsub badpass_message fqdn runas_default env_editor passwd_tries tty_tickets insults EGREPPROG CC ac_ct_CC EXEEXT OBJEXT CPP UNAMEPROG TRPROG SEDPROG NROFFPROG build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP YACC LIBOBJS ALLOCA LTLIBOBJS' +ac_subst_files='' + # Initialize some variables set by options. ac_init_help= ac_init_version=false @@ -179,13 +348,6 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Identity of this package. -PACKAGE_NAME='sudo' -PACKAGE_TARNAME='sudo' -PACKAGE_VERSION='1.6.6' -PACKAGE_STRING='sudo 1.6.6' -PACKAGE_BUGREPORT='' - ac_prev= for ac_option do @@ -318,7 +480,7 @@ do with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -497,7 +659,7 @@ do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done @@ -509,18 +671,19 @@ do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. +# FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias -# FIXME: should be removed in autoconf 3.0. +# FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe @@ -536,13 +699,23 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -552,13 +725,16 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else - { echo "$as_me: error: cannot find sources in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias @@ -599,8 +775,8 @@ ac_cv_env_CPP_value=$CPP if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. - cat <<EOF -\`configure' configures sudo 1.6.6 to adapt to many kinds of systems. + cat <<_ACEOF +\`configure' configures sudo 1.6.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -620,9 +796,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -EOF +_ACEOF - cat <<EOF + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -649,21 +825,21 @@ Fine tuning of the installation directories: --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] -EOF +_ACEOF - cat <<\EOF + cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] - --host=HOST build programs to run on HOST [BUILD] -EOF + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sudo 1.6.6:";; + short | recursive ) echo "Configuration of sudo 1.6.7:";; esac - cat <<\EOF + cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) @@ -672,6 +848,7 @@ Optional Features: Do not require authentication by default --disable-root-mailer Don't run the mailer as root, run as the user --disable-setreuid Don't try to use the setreuid() function + --disable-setresuid Don't try to use the setresuid() function --disable-saved-ids Don't try to use POSIX saved ids --disable-shadow Never use shadow passwords --disable-root-sudo Don't allow root to run sudo @@ -749,6 +926,7 @@ Optional Packages: --with-goons-insults include the insults from the "Goon Show" --with-secure-path override the user's path with a builtin one --without-interfaces don't try to read the ip addr of ether interfaces + --with-stow properly handle GNU stow packaging Some influential environment variables: CC C compiler command @@ -762,40 +940,60 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -EOF +_ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` - for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue - cd $ac_subdir - # A "../" for each directory in /$ac_subdir. - ac_dots=`echo $ac_subdir | - sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` - - case $srcdir in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_subdir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; - esac + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure.gnu; then + if test -f $ac_srcdir/configure.gnu; then echo - $SHELL $ac_sub_srcdir/configure.gnu --help=recursive - elif test -f $ac_sub_srcdir/configure; then + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then echo - $SHELL $ac_sub_srcdir/configure --help=recursive - elif test -f $ac_sub_srcdir/configure.ac || - test -f $ac_sub_srcdir/configure.in; then + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then echo $ac_configure --help else - echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done @@ -803,33 +1001,33 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then - cat <<\EOF -sudo configure 1.6.6 -generated by GNU Autoconf 2.52 + cat <<\_ACEOF +sudo configure 1.6.7 +generated by GNU Autoconf 2.57 -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -EOF +_ACEOF exit 0 fi exec 5>config.log -cat >&5 <<EOF +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sudo $as_me 1.6.6, which was -generated by GNU Autoconf 2.52. Invocation command line was +It was created by sudo $as_me 1.6.7, which was +generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ -EOF +_ACEOF { cat <<_ASUNAME -## ---------- ## -## Platform. ## -## ---------- ## +## --------- ## +## Platform. ## +## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` @@ -848,51 +1046,96 @@ hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -PATH = $PATH - _ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + } >&5 -cat >&5 <<EOF -## ------------ ## -## Core tests. ## -## ------------ ## +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF -EOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= +ac_configure_args0= +ac_configure_args1= ac_sep= -for ac_arg +ac_must_keep_next=false +for ac_pass in 1 2 do - case $ac_arg in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args$ac_sep\"$ac_arg\"" - ac_sep=" " ;; - *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" - ac_sep=" " ;; - esac - # Get rid of the leading space. + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep\"$ac_arg\"" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. - echo >&5 - echo "## ----------------- ##" >&5 - echo "## Cache variables. ##" >&5 - echo "## ----------------- ##" >&5 - echo >&5 - # The following way of writing the cache mishandles newlines in values, + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in @@ -906,21 +1149,53 @@ trap 'exit_status=$? "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; -} >&5 - sed "/^$/d" confdefs.h >conftest.log - if test -s conftest.log; then - echo >&5 - echo "## ------------ ##" >&5 - echo "## confdefs.h. ##" >&5 - echo "## ------------ ##" >&5 - echo >&5 - cat conftest.log >&5 - fi - (echo; echo) >&5 - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" >&5 - echo "$as_me: exit $exit_status" >&5 - rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do @@ -933,6 +1208,33 @@ rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then @@ -944,9 +1246,9 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:947: loading site script $ac_site_file" >&5 + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} - cat "$ac_site_file" >&5 + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done @@ -955,7 +1257,7 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:958: loading cache $cache_file" >&5 + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -963,7 +1265,7 @@ echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { echo "$as_me:966: creating cache $cache_file" >&5 + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -979,42 +1281,42 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:982: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:986: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:992: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:994: former value: $ac_old_val" >&5 + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:996: current value: $ac_new_val" >&5 + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac - # Pass precious variables to config.status. It doesn't matter if - # we pass some twice (in addition to the command line arguments). + # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" - ;; + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:1015: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:1017: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1025,30 +1327,61 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac -echo "#! $SHELL" >conftest.sh -echo "exit 0" >>conftest.sh -chmod +x conftest.sh -if { (echo "$as_me:1037: PATH=\".;.\"; conftest.sh") >&5 - (PATH=".;."; conftest.sh) 2>&5 - ac_status=$? - echo "$as_me:1040: \$? = $ac_status" >&5 - (exit $ac_status); }; then - ac_path_separator=';' -else - ac_path_separator=: -fi -PATH_SEPARATOR="$ac_path_separator" -rm -f conftest.sh -ac_config_headers="$ac_config_headers config.h pathnames.h" -echo "Configuring Sudo version 1.6.6" + + + + + + + + + + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers config.h pathnames.h" + +echo "Configuring Sudo version 1.6.7" + + + + + + + + + + + + + + + + + + + + + + + + + + timeout=5 password_timeout=5 @@ -1087,7 +1420,9 @@ CHECKSIA=true test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man' test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin' test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin' -test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' +test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc' + + # Check whether --with-otp-only or --without-otp-only was given. if test "${with_otp_only+set}" = set; then @@ -1095,36 +1430,39 @@ if test "${with_otp_only+set}" = set; then case $with_otp_only in yes) with_passwd=no -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define WITHOUT_PASSWD 1 -EOF +_ACEOF - { echo "$as_me:1102: WARNING: --with-otp-only option deprecated, treating as --without-passwd" >&5 + { echo "$as_me:$LINENO: WARNING: --with-otp-only option deprecated, treating as --without-passwd" >&5 echo "$as_me: WARNING: --with-otp-only option deprecated, treating as --without-passwd" >&2;} ;; esac fi; + # Check whether --with-alertmail or --without-alertmail was given. if test "${with_alertmail+set}" = set; then withval="$with_alertmail" case $with_alertmail in *) with_mailto="$with_alertmail" - { echo "$as_me:1113: WARNING: --with-alertmail option deprecated, treating as --mailto" >&5 + { echo "$as_me:$LINENO: WARNING: --with-alertmail option deprecated, treating as --mailto" >&5 echo "$as_me: WARNING: --with-alertmail option deprecated, treating as --mailto" >&2;} ;; esac fi; + + # Check whether --with-CC or --without-CC was given. if test "${with_CC+set}" = set; then withval="$with_CC" case $with_CC in - yes) { { echo "$as_me:1123: error: \"must give --with-CC an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-CC an argument.\"" >&5 echo "$as_me: error: \"must give --with-CC an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1127: error: \"illegal argument: --without-CC.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"illegal argument: --without-CC.\"" >&5 echo "$as_me: error: \"illegal argument: --without-CC.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1133,15 +1471,16 @@ echo "$as_me: error: \"illegal argument: --without-CC.\"" >&2;} esac fi; + # Check whether --with-incpath or --without-incpath was given. if test "${with_incpath+set}" = set; then withval="$with_incpath" case $with_incpath in - yes) { { echo "$as_me:1140: error: \"must give --with-incpath an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-incpath an argument.\"" >&5 echo "$as_me: error: \"must give --with-incpath an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1144: error: \"--without-incpath not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-incpath not supported.\"" >&5 echo "$as_me: error: \"--without-incpath not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1153,15 +1492,16 @@ echo "$as_me: error: \"--without-incpath not supported.\"" >&2;} esac fi; + # Check whether --with-libpath or --without-libpath was given. if test "${with_libpath+set}" = set; then withval="$with_libpath" case $with_libpath in - yes) { { echo "$as_me:1160: error: \"must give --with-libpath an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-libpath an argument.\"" >&5 echo "$as_me: error: \"must give --with-libpath an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1164: error: \"--without-libpath not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-libpath not supported.\"" >&5 echo "$as_me: error: \"--without-libpath not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1173,15 +1513,16 @@ echo "$as_me: error: \"--without-libpath not supported.\"" >&2;} esac fi; + # Check whether --with-libraries or --without-libraries was given. if test "${with_libraries+set}" = set; then withval="$with_libraries" case $with_libraries in - yes) { { echo "$as_me:1180: error: \"must give --with-libraries an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-libraries an argument.\"" >&5 echo "$as_me: error: \"must give --with-libraries an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1184: error: \"--without-libraries not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-libraries not supported.\"" >&5 echo "$as_me: error: \"--without-libraries not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1199,6 +1540,7 @@ echo "$as_me: error: \"--without-libraries not supported.\"" >&2;} esac fi; + # Check whether --with-devel or --without-devel was given. if test "${with_devel+set}" = set; then withval="$with_devel" @@ -1214,6 +1556,7 @@ if test "${with_devel+set}" = set; then esac fi; + # Check whether --with-efence or --without-efence was given. if test "${with_efence+set}" = set; then withval="$with_efence" @@ -1230,6 +1573,7 @@ if test "${with_efence+set}" = set; then esac fi; + # Check whether --with-csops or --without-csops was given. if test "${with_csops+set}" = set; then withval="$with_csops" @@ -1248,44 +1592,46 @@ if test "${with_csops+set}" = set; then esac fi; + # Check whether --with-passwd or --without-passwd was given. if test "${with_passwd+set}" = set; then withval="$with_passwd" case $with_passwd in yes) ;; - no) cat >>confdefs.h <<\EOF + no) cat >>confdefs.h <<\_ACEOF #define WITHOUT_PASSWD 1 -EOF +_ACEOF - echo "$as_me:1260: checking whether to use shadow/passwd file authentication" >&5 + echo "$as_me:$LINENO: checking whether to use shadow/passwd file authentication" >&5 echo $ECHO_N "checking whether to use shadow/passwd file authentication... $ECHO_C" >&6 - echo "$as_me:1262: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - *) { { echo "$as_me:1265: error: \"Sorry, --with-passwd does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"Sorry, --with-passwd does not take an argument.\"" >&5 echo "$as_me: error: \"Sorry, --with-passwd does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-skey or --without-skey was given. if test "${with_skey+set}" = set; then withval="$with_skey" case $with_skey in yes) if test -n "$with_opie"; then - { { echo "$as_me:1277: error: \"cannot use both S/Key and OPIE\"" >&5 + { { echo "$as_me:$LINENO: error: \"cannot use both S/Key and OPIE\"" >&5 echo "$as_me: error: \"cannot use both S/Key and OPIE\"" >&2;} { (exit 1); exit 1; }; } fi -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_SKEY 1 -EOF +_ACEOF - echo "$as_me:1286: checking whether to try S/Key authentication" >&5 + echo "$as_me:$LINENO: checking whether to try S/Key authentication" >&5 echo $ECHO_N "checking whether to try S/Key authentication... $ECHO_C" >&6 - echo "$as_me:1288: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 AUTH_OBJS="${AUTH_OBJS} rfc1938.o" ;; @@ -1295,23 +1641,24 @@ echo "${ECHO_T}yes" >&6 esac fi; + # Check whether --with-opie or --without-opie was given. if test "${with_opie+set}" = set; then withval="$with_opie" case $with_opie in yes) if test -n "$with_skey"; then - { { echo "$as_me:1303: error: \"cannot use both S/Key and OPIE\"" >&5 + { { echo "$as_me:$LINENO: error: \"cannot use both S/Key and OPIE\"" >&5 echo "$as_me: error: \"cannot use both S/Key and OPIE\"" >&2;} { (exit 1); exit 1; }; } fi -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_OPIE 1 -EOF +_ACEOF - echo "$as_me:1312: checking whether to try NRL OPIE authentication" >&5 + echo "$as_me:$LINENO: checking whether to try NRL OPIE authentication" >&5 echo $ECHO_N "checking whether to try NRL OPIE authentication... $ECHO_C" >&6 - echo "$as_me:1314: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 AUTH_OBJS="${AUTH_OBJS} rfc1938.o" ;; @@ -1321,63 +1668,65 @@ echo "${ECHO_T}yes" >&6 esac fi; + # Check whether --with-long-otp-prompt or --without-long-otp-prompt was given. if test "${with_long_otp_prompt+set}" = set; then withval="$with_long_otp_prompt" case $with_long_otp_prompt in yes) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define LONG_OTP_PROMPT 1 -EOF +_ACEOF - echo "$as_me:1333: checking whether to use a two line prompt for OTP authentication" >&5 + echo "$as_me:$LINENO: checking whether to use a two line prompt for OTP authentication" >&5 echo $ECHO_N "checking whether to use a two line prompt for OTP authentication... $ECHO_C" >&6 - echo "$as_me:1335: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 long_otp_prompt=on ;; no) long_otp_prompt=off ;; - *) { { echo "$as_me:1341: error: \"--with-long-otp-prompt does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-long-otp-prompt does not take an argument.\"" >&5 echo "$as_me: error: \"--with-long-otp-prompt does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-SecurID or --without-SecurID was given. if test "${with_SecurID+set}" = set; then withval="$with_SecurID" case $with_SecurID in no) ;; *) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_SECURID 1 -EOF +_ACEOF - echo "$as_me:1358: checking whether to use SecurID for authentication" >&5 + echo "$as_me:$LINENO: checking whether to use SecurID for authentication" >&5 echo $ECHO_N "checking whether to use SecurID for authentication... $ECHO_C" >&6 - echo "$as_me:1360: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 with_passwd=no - AUTH_OBJS="securid.o" ;; esac fi; + # Check whether --with-fwtk or --without-fwtk was given. if test "${with_fwtk+set}" = set; then withval="$with_fwtk" case $with_fwtk in no) ;; *) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_FWTK 1 -EOF +_ACEOF - echo "$as_me:1378: checking whether to use FWTK AuthSRV for authentication" >&5 + echo "$as_me:$LINENO: checking whether to use FWTK AuthSRV for authentication" >&5 echo $ECHO_N "checking whether to use FWTK AuthSRV for authentication... $ECHO_C" >&6 - echo "$as_me:1380: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 with_passwd=no AUTH_OBJS="fwtk.o" @@ -1390,146 +1739,154 @@ echo "${ECHO_T}yes" >&6 esac fi; + # Check whether --with-kerb4 or --without-kerb4 was given. if test "${with_kerb4+set}" = set; then withval="$with_kerb4" case $with_kerb4 in - yes) echo "$as_me:1397: checking whether to try Kerberos 4 authentication" >&5 + yes) echo "$as_me:$LINENO: checking whether to try Kerberos 4 authentication" >&5 echo $ECHO_N "checking whether to try Kerberos 4 authentication... $ECHO_C" >&6 - echo "$as_me:1399: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; no) ;; - *) { { echo "$as_me:1403: error: \"--with-kerb4 does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-kerb4 does not take an argument.\"" >&5 echo "$as_me: error: \"--with-kerb4 does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-kerb5 or --without-kerb5 was given. if test "${with_kerb5+set}" = set; then withval="$with_kerb5" case $with_kerb5 in - yes) echo "$as_me:1414: checking whether to try Kerberos 5 authentication" >&5 + yes) echo "$as_me:$LINENO: checking whether to try Kerberos 5 authentication" >&5 echo $ECHO_N "checking whether to try Kerberos 5 authentication... $ECHO_C" >&6 - echo "$as_me:1416: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; no) ;; - *) { { echo "$as_me:1420: error: \"--with-kerb5 does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-kerb5 does not take an argument.\"" >&5 echo "$as_me: error: \"--with-kerb5 does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-authenticate or --without-authenticate was given. if test "${with_authenticate+set}" = set; then withval="$with_authenticate" case $with_authenticate in yes) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_AUTHENTICATE 1 -EOF +_ACEOF - echo "$as_me:1436: checking whether to use AIX general authentication" >&5 + echo "$as_me:$LINENO: checking whether to use AIX general authentication" >&5 echo $ECHO_N "checking whether to use AIX general authentication... $ECHO_C" >&6 - echo "$as_me:1438: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 with_passwd=no AUTH_OBJS="aix_auth.o" ;; no) ;; - *) { { echo "$as_me:1444: error: \"--with-authenticate does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-authenticate does not take an argument.\"" >&5 echo "$as_me: error: \"--with-authenticate does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" case $with_pam in yes) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_PAM 1 -EOF +_ACEOF - echo "$as_me:1460: checking whether to use PAM authentication" >&5 + echo "$as_me:$LINENO: checking whether to use PAM authentication" >&5 echo $ECHO_N "checking whether to use PAM authentication... $ECHO_C" >&6 - echo "$as_me:1462: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 with_passwd=no AUTH_OBJS="pam.o" ;; no) ;; - *) { { echo "$as_me:1468: error: \"--with-pam does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-pam does not take an argument.\"" >&5 echo "$as_me: error: \"--with-pam does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-AFS or --without-AFS was given. if test "${with_AFS+set}" = set; then withval="$with_AFS" case $with_AFS in yes) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_AFS 1 -EOF +_ACEOF - echo "$as_me:1484: checking whether to try AFS (kerberos) authentication" >&5 + echo "$as_me:$LINENO: checking whether to try AFS (kerberos) authentication" >&5 echo $ECHO_N "checking whether to try AFS (kerberos) authentication... $ECHO_C" >&6 - echo "$as_me:1486: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 AUTH_OBJS="${AUTH_OBJS} afs.o" ;; no) ;; - *) { { echo "$as_me:1491: error: \"--with-AFS does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-AFS does not take an argument.\"" >&5 echo "$as_me: error: \"--with-AFS does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-DCE or --without-DCE was given. if test "${with_DCE+set}" = set; then withval="$with_DCE" case $with_DCE in yes) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_DCE 1 -EOF +_ACEOF - echo "$as_me:1507: checking whether to try DCE (kerberos) authentication" >&5 + echo "$as_me:$LINENO: checking whether to try DCE (kerberos) authentication" >&5 echo $ECHO_N "checking whether to try DCE (kerberos) authentication... $ECHO_C" >&6 - echo "$as_me:1509: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 AUTH_OBJS="${AUTH_OBJS} dce.o" ;; no) ;; - *) { { echo "$as_me:1514: error: \"--with-DCE does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-DCE does not take an argument.\"" >&5 echo "$as_me: error: \"--with-DCE does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-logincap or --without-logincap was given. if test "${with_logincap+set}" = set; then withval="$with_logincap" case $with_logincap in yes|no) ;; - *) { { echo "$as_me:1526: error: \"--with-logincap does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-logincap does not take an argument.\"" >&5 echo "$as_me: error: \"--with-logincap does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-bsdauth or --without-bsdauth was given. if test "${with_bsdauth+set}" = set; then withval="$with_bsdauth" @@ -1537,14 +1894,14 @@ if test "${with_bsdauth+set}" = set; then yes) with_logincap=yes ;; no) ;; - *) { { echo "$as_me:1540: error: \"--with-bsdauth does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-bsdauth does not take an argument.\"" >&5 echo "$as_me: error: \"--with-bsdauth does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -echo "$as_me:1547: checking whether to lecture users the first time they run sudo" >&5 +echo "$as_me:$LINENO: checking whether to lecture users the first time they run sudo" >&5 echo $ECHO_N "checking whether to lecture users the first time they run sudo... $ECHO_C" >&6 # Check whether --with-lecture or --without-lecture was given. @@ -1555,217 +1912,218 @@ if test "${with_lecture+set}" = set; then ;; no|none) lecture=off ;; - *) { { echo "$as_me:1558: error: \"unknown argument to --with-lecture: $with_lecture\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"unknown argument to --with-lecture: $with_lecture\"" >&5 echo "$as_me: error: \"unknown argument to --with-lecture: $with_lecture\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; if test "$lecture" = "on"; then - echo "$as_me:1565: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define NO_LECTURE 1 -EOF +_ACEOF - echo "$as_me:1573: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:1577: checking whether sudo should log via syslog or to a file by default" >&5 +echo "$as_me:$LINENO: checking whether sudo should log via syslog or to a file by default" >&5 echo $ECHO_N "checking whether sudo should log via syslog or to a file by default... $ECHO_C" >&6 # Check whether --with-logging or --without-logging was given. if test "${with_logging+set}" = set; then withval="$with_logging" case $with_logging in - yes) { { echo "$as_me:1584: error: \"must give --with-logging an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-logging an argument.\"" >&5 echo "$as_me: error: \"must give --with-logging an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1588: error: \"--without-logging not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-logging not supported.\"" >&5 echo "$as_me: error: \"--without-logging not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; syslog) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define LOGGING SLOG_SYSLOG -EOF +_ACEOF - echo "$as_me:1597: result: syslog" >&5 + echo "$as_me:$LINENO: result: syslog" >&5 echo "${ECHO_T}syslog" >&6 ;; - file) cat >>confdefs.h <<\EOF + file) cat >>confdefs.h <<\_ACEOF #define LOGGING SLOG_FILE -EOF +_ACEOF - echo "$as_me:1604: result: file" >&5 + echo "$as_me:$LINENO: result: file" >&5 echo "${ECHO_T}file" >&6 ;; - both) cat >>confdefs.h <<\EOF + both) cat >>confdefs.h <<\_ACEOF #define LOGGING SLOG_BOTH -EOF +_ACEOF - echo "$as_me:1611: result: both" >&5 + echo "$as_me:$LINENO: result: both" >&5 echo "${ECHO_T}both" >&6 ;; - *) { { echo "$as_me:1614: error: \"unknown argument to --with-logging: $with_logging\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"unknown argument to --with-logging: $with_logging\"" >&5 echo "$as_me: error: \"unknown argument to --with-logging: $with_logging\"" >&2;} { (exit 1); exit 1; }; } ;; esac else - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LOGGING SLOG_SYSLOG -EOF - echo "$as_me:1623: result: syslog" >&5 +_ACEOF + echo "$as_me:$LINENO: result: syslog" >&5 echo "${ECHO_T}syslog" >&6 fi; -echo "$as_me:1627: checking which syslog facility sudo should log with" >&5 +echo "$as_me:$LINENO: checking which syslog facility sudo should log with" >&5 echo $ECHO_N "checking which syslog facility sudo should log with... $ECHO_C" >&6 # Check whether --with-logfac or --without-logfac was given. if test "${with_logfac+set}" = set; then withval="$with_logfac" case $with_logfac in - yes) { { echo "$as_me:1634: error: \"must give --with-logfac an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-logfac an argument.\"" >&5 echo "$as_me: error: \"must give --with-logfac an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1638: error: \"--without-logfac not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-logfac not supported.\"" >&5 echo "$as_me: error: \"--without-logfac not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; authpriv|auth|daemon|user|local0|local1|local2|local3|local4|local5|local6|local7) logfac=$with_logfac ;; - *) { { echo "$as_me:1644: error: \"$with_logfac is not a supported syslog facility.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"$with_logfac is not a supported syslog facility.\"" >&5 echo "$as_me: error: \"$with_logfac is not a supported syslog facility.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define LOGFAC "$logfac" -EOF +_ACEOF -echo "$as_me:1655: result: $logfac" >&5 +echo "$as_me:$LINENO: result: $logfac" >&5 echo "${ECHO_T}$logfac" >&6 -echo "$as_me:1658: checking at which syslog priority to log commands" >&5 +echo "$as_me:$LINENO: checking at which syslog priority to log commands" >&5 echo $ECHO_N "checking at which syslog priority to log commands... $ECHO_C" >&6 # Check whether --with-goodpri or --without-goodpri was given. if test "${with_goodpri+set}" = set; then withval="$with_goodpri" case $with_goodpri in - yes) { { echo "$as_me:1665: error: \"must give --with-goodpri an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-goodpri an argument.\"" >&5 echo "$as_me: error: \"must give --with-goodpri an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1669: error: \"--without-goodpri not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-goodpri not supported.\"" >&5 echo "$as_me: error: \"--without-goodpri not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; alert|crit|debug|emerg|err|info|notice|warning) goodpri=$with_goodpri ;; - *) { { echo "$as_me:1676: error: \"$with_goodpri is not a supported syslog priority.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"$with_goodpri is not a supported syslog priority.\"" >&5 echo "$as_me: error: \"$with_goodpri is not a supported syslog priority.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define PRI_SUCCESS "$goodpri" -EOF +_ACEOF -echo "$as_me:1687: result: $goodpri" >&5 +echo "$as_me:$LINENO: result: $goodpri" >&5 echo "${ECHO_T}$goodpri" >&6 -echo "$as_me:1690: checking at which syslog priority to log failures" >&5 +echo "$as_me:$LINENO: checking at which syslog priority to log failures" >&5 echo $ECHO_N "checking at which syslog priority to log failures... $ECHO_C" >&6 # Check whether --with-badpri or --without-badpri was given. if test "${with_badpri+set}" = set; then withval="$with_badpri" case $with_badpri in - yes) { { echo "$as_me:1697: error: \"must give --with-badpri an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-badpri an argument.\"" >&5 echo "$as_me: error: \"must give --with-badpri an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1701: error: \"--without-badpri not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-badpri not supported.\"" >&5 echo "$as_me: error: \"--without-badpri not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; alert|crit|debug|emerg|err|info|notice|warning) badpri=$with_badpri ;; - *) { { echo "$as_me:1708: error: $with_badpri is not a supported syslog priority." >&5 + *) { { echo "$as_me:$LINENO: error: $with_badpri is not a supported syslog priority." >&5 echo "$as_me: error: $with_badpri is not a supported syslog priority." >&2;} { (exit 1); exit 1; }; } ;; esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define PRI_FAILURE "$badpri" -EOF +_ACEOF + +echo "$as_me:$LINENO: result: $badpri" >&5 +echo "${ECHO_T}$badpri" >&6 -echo "$as_me:1719: result: badpri" >&5 -echo "${ECHO_T}badpri" >&6 # Check whether --with-logpath or --without-logpath was given. if test "${with_logpath+set}" = set; then withval="$with_logpath" case $with_logpath in - yes) { { echo "$as_me:1726: error: \"must give --with-logpath an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-logpath an argument.\"" >&5 echo "$as_me: error: \"must give --with-logpath an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1730: error: \"--without-logpath not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-logpath not supported.\"" >&5 echo "$as_me: error: \"--without-logpath not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -echo "$as_me:1737: checking how long a line in the log file should be" >&5 +echo "$as_me:$LINENO: checking how long a line in the log file should be" >&5 echo $ECHO_N "checking how long a line in the log file should be... $ECHO_C" >&6 # Check whether --with-loglen or --without-loglen was given. if test "${with_loglen+set}" = set; then withval="$with_loglen" case $with_loglen in - yes) { { echo "$as_me:1744: error: \"must give --with-loglen an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-loglen an argument.\"" >&5 echo "$as_me: error: \"must give --with-loglen an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1748: error: \"--without-loglen not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-loglen not supported.\"" >&5 echo "$as_me: error: \"--without-loglen not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; [0-9]*) loglen=$with_loglen ;; - *) { { echo "$as_me:1754: error: \"you must enter a number, not $with_loglen\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"you must enter a number, not $with_loglen\"" >&5 echo "$as_me: error: \"you must enter a number, not $with_loglen\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define MAXLOGFILELEN $loglen -EOF +_ACEOF -echo "$as_me:1765: result: $loglen" >&5 +echo "$as_me:$LINENO: result: $loglen" >&5 echo "${ECHO_T}$loglen" >&6 -echo "$as_me:1768: checking whether sudo should ignore '.' or '' in \$PATH" >&5 +echo "$as_me:$LINENO: checking whether sudo should ignore '.' or '' in \$PATH" >&5 echo $ECHO_N "checking whether sudo should ignore '.' or '' in \$PATH... $ECHO_C" >&6 # Check whether --with-ignore-dot or --without-ignore-dot was given. @@ -1776,7 +2134,7 @@ if test "${with_ignore_dot+set}" = set; then ;; no) ignore_dot=off ;; - *) { { echo "$as_me:1779: error: \"--with-ignore-dot does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-ignore-dot does not take an argument.\"" >&5 echo "$as_me: error: \"--with-ignore-dot does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1784,18 +2142,18 @@ esac fi; if test "$ignore_dot" = "on"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define IGNORE_DOT_PATH 1 -EOF +_ACEOF - echo "$as_me:1791: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:1794: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:1798: checking whether to send mail when a user is not in sudoers" >&5 +echo "$as_me:$LINENO: checking whether to send mail when a user is not in sudoers" >&5 echo $ECHO_N "checking whether to send mail when a user is not in sudoers... $ECHO_C" >&6 # Check whether --with-mail-if-no-user or --without-mail-if-no-user was given. @@ -1806,7 +2164,7 @@ if test "${with_mail_if_no_user+set}" = set; then ;; no) mail_no_user=off ;; - *) { { echo "$as_me:1809: error: \"--with-mail-if-no-user does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-mail-if-no-user does not take an argument.\"" >&5 echo "$as_me: error: \"--with-mail-if-no-user does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1814,18 +2172,18 @@ esac fi; if test "$mail_no_user" = "on"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define SEND_MAIL_WHEN_NO_USER 1 -EOF +_ACEOF - echo "$as_me:1821: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:1824: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:1828: checking whether to send mail when user listed but not for this host" >&5 +echo "$as_me:$LINENO: checking whether to send mail when user listed but not for this host" >&5 echo $ECHO_N "checking whether to send mail when user listed but not for this host... $ECHO_C" >&6 # Check whether --with-mail-if-no-host or --without-mail-if-no-host was given. @@ -1836,7 +2194,7 @@ if test "${with_mail_if_no_host+set}" = set; then ;; no) mail_no_host=off ;; - *) { { echo "$as_me:1839: error: \"--with-mail-if-no-host does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-mail-if-no-host does not take an argument.\"" >&5 echo "$as_me: error: \"--with-mail-if-no-host does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1844,18 +2202,18 @@ esac fi; if test "$mail_no_host" = "on"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define SEND_MAIL_WHEN_NO_HOST 1 -EOF +_ACEOF - echo "$as_me:1851: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:1854: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:1858: checking whether to send mail when a user tries a disallowed command" >&5 +echo "$as_me:$LINENO: checking whether to send mail when a user tries a disallowed command" >&5 echo $ECHO_N "checking whether to send mail when a user tries a disallowed command... $ECHO_C" >&6 # Check whether --with-mail-if-noperms or --without-mail-if-noperms was given. @@ -1866,7 +2224,7 @@ if test "${with_mail_if_noperms+set}" = set; then ;; no) mail_noperms=off ;; - *) { { echo "$as_me:1869: error: \"--with-mail-if-noperms does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-mail-if-noperms does not take an argument.\"" >&5 echo "$as_me: error: \"--with-mail-if-noperms does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1874,29 +2232,29 @@ esac fi; if test "$mail_noperms" = "on"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define SEND_MAIL_WHEN_NOT_OK 1 -EOF +_ACEOF - echo "$as_me:1881: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:1884: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:1888: checking who should get the mail that sudo sends" >&5 +echo "$as_me:$LINENO: checking who should get the mail that sudo sends" >&5 echo $ECHO_N "checking who should get the mail that sudo sends... $ECHO_C" >&6 # Check whether --with-mailto or --without-mailto was given. if test "${with_mailto+set}" = set; then withval="$with_mailto" case $with_mailto in - yes) { { echo "$as_me:1895: error: \"must give --with-mailto an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-mailto an argument.\"" >&5 echo "$as_me: error: \"must give --with-mailto an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:1899: error: \"--without-mailto not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-mailto not supported.\"" >&5 echo "$as_me: error: \"--without-mailto not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1905,44 +2263,46 @@ echo "$as_me: error: \"--without-mailto not supported.\"" >&2;} esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define MAILTO "$mailto" -EOF +_ACEOF -echo "$as_me:1912: result: $mailto" >&5 +echo "$as_me:$LINENO: result: $mailto" >&5 echo "${ECHO_T}$mailto" >&6 + # Check whether --with-mailsubject or --without-mailsubject was given. if test "${with_mailsubject+set}" = set; then withval="$with_mailsubject" case $with_mailsubject in - yes) { { echo "$as_me:1919: error: \"must give --with-mailsubject an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-mailsubject an argument.\"" >&5 echo "$as_me: error: \"must give --with-mailsubject an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; no) echo "Sorry, --without-mailsubject not supported." ;; *) mailsub="$with_mailsubject" - echo "$as_me:1926: checking sudo mail subject" >&5 + echo "$as_me:$LINENO: checking sudo mail subject" >&5 echo $ECHO_N "checking sudo mail subject... $ECHO_C" >&6 - echo "$as_me:1928: result: Using alert mail subject: $mailsub" >&5 + echo "$as_me:$LINENO: result: Using alert mail subject: $mailsub" >&5 echo "${ECHO_T}Using alert mail subject: $mailsub" >&6 ;; esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define MAILSUBJECT "$mailsub" -EOF +_ACEOF + -echo "$as_me:1938: checking for bad password prompt" >&5 +echo "$as_me:$LINENO: checking for bad password prompt" >&5 echo $ECHO_N "checking for bad password prompt... $ECHO_C" >&6 # Check whether --with-passprompt or --without-passprompt was given. if test "${with_passprompt+set}" = set; then withval="$with_passprompt" case $with_passprompt in - yes) { { echo "$as_me:1945: error: \"must give --with-passprompt an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-passprompt an argument.\"" >&5 echo "$as_me: error: \"must give --with-passprompt an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1951,21 +2311,22 @@ echo "$as_me: error: \"must give --with-passprompt an argument.\"" >&2;} *) passprompt="$with_passprompt" esac fi; -echo "$as_me:1954: result: $passprompt" >&5 +echo "$as_me:$LINENO: result: $passprompt" >&5 echo "${ECHO_T}$passprompt" >&6 -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define PASSPROMPT "$passprompt" -EOF +_ACEOF -echo "$as_me:1961: checking for bad password message" >&5 + +echo "$as_me:$LINENO: checking for bad password message" >&5 echo $ECHO_N "checking for bad password message... $ECHO_C" >&6 # Check whether --with-badpass-message or --without-badpass-message was given. if test "${with_badpass_message+set}" = set; then withval="$with_badpass_message" case $with_badpass_message in - yes) { { echo "$as_me:1968: error: \"Must give --with-badpass-message an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"Must give --with-badpass-message an argument.\"" >&5 echo "$as_me: error: \"Must give --with-badpass-message an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -1976,14 +2337,14 @@ echo "$as_me: error: \"Must give --with-badpass-message an argument.\"" >&2;} esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define INCORRECT_PASSWORD "$badpass_message" -EOF +_ACEOF -echo "$as_me:1983: result: $badpass_message" >&5 +echo "$as_me:$LINENO: result: $badpass_message" >&5 echo "${ECHO_T}$badpass_message" >&6 -echo "$as_me:1986: checking whether to expect fully qualified hosts in sudoers" >&5 +echo "$as_me:$LINENO: checking whether to expect fully qualified hosts in sudoers" >&5 echo $ECHO_N "checking whether to expect fully qualified hosts in sudoers... $ECHO_C" >&6 # Check whether --with-fqdn or --without-fqdn was given. @@ -1994,7 +2355,7 @@ if test "${with_fqdn+set}" = set; then ;; no) fqdn=off ;; - *) { { echo "$as_me:1997: error: \"--with-fqdn does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-fqdn does not take an argument.\"" >&5 echo "$as_me: error: \"--with-fqdn does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -2002,32 +2363,34 @@ esac fi; if test "$fqdn" = "on"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define FQDN 1 -EOF +_ACEOF - echo "$as_me:2009: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:2012: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi + # Check whether --with-timedir or --without-timedir was given. if test "${with_timedir+set}" = set; then withval="$with_timedir" case $with_timedir in - yes) { { echo "$as_me:2020: error: \"must give --with-timedir an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-timedir an argument.\"" >&5 echo "$as_me: error: \"must give --with-timedir an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:2024: error: \"--without-timedir not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-timedir not supported.\"" >&5 echo "$as_me: error: \"--without-timedir not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-sendmail or --without-sendmail was given. if test "${with_sendmail+set}" = set; then withval="$with_sendmail" @@ -2043,15 +2406,16 @@ EOF esac fi; + # Check whether --with-sudoers-mode or --without-sudoers-mode was given. if test "${with_sudoers_mode+set}" = set; then withval="$with_sudoers_mode" case $with_sudoers_mode in - yes) { { echo "$as_me:2050: error: \"must give --with-sudoers-mode an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-sudoers-mode an argument.\"" >&5 echo "$as_me: error: \"must give --with-sudoers-mode an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:2054: error: \"--without-sudoers-mode not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-sudoers-mode not supported.\"" >&5 echo "$as_me: error: \"--without-sudoers-mode not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -2059,63 +2423,65 @@ echo "$as_me: error: \"--without-sudoers-mode not supported.\"" >&2;} ;; 0*) SUDOERS_MODE=$with_sudoers_mode ;; - *) { { echo "$as_me:2062: error: \"you must use a numeric uid, not a name.\"" >&5 -echo "$as_me: error: \"you must use a numeric uid, not a name.\"" >&2;} + *) { { echo "$as_me:$LINENO: error: \"you must use an octal mode, not a name.\"" >&5 +echo "$as_me: error: \"you must use an octal mode, not a name.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-sudoers-uid or --without-sudoers-uid was given. if test "${with_sudoers_uid+set}" = set; then withval="$with_sudoers_uid" case $with_sudoers_uid in - yes) { { echo "$as_me:2073: error: \"must give --with-sudoers-uid an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-sudoers-uid an argument.\"" >&5 echo "$as_me: error: \"must give --with-sudoers-uid an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:2077: error: \"--without-sudoers-uid not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-sudoers-uid not supported.\"" >&5 echo "$as_me: error: \"--without-sudoers-uid not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; [0-9]*) SUDOERS_UID=$with_sudoers_uid ;; - *) { { echo "$as_me:2083: error: \"you must use a numeric uid, not a name.\"" >&5 -echo "$as_me: error: \"you must use a numeric uid, not a name.\"" >&2;} + *) { { echo "$as_me:$LINENO: error: \"you must use an unsigned numeric uid, not a name.\"" >&5 +echo "$as_me: error: \"you must use an unsigned numeric uid, not a name.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-sudoers-gid or --without-sudoers-gid was given. if test "${with_sudoers_gid+set}" = set; then withval="$with_sudoers_gid" case $with_sudoers_gid in - yes) { { echo "$as_me:2094: error: \"must give --with-sudoers-gid an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-sudoers-gid an argument.\"" >&5 echo "$as_me: error: \"must give --with-sudoers-gid an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:2098: error: \"--without-sudoers-gid not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-sudoers-gid not supported.\"" >&5 echo "$as_me: error: \"--without-sudoers-gid not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; [0-9]*) SUDOERS_GID=$with_sudoers_gid ;; - *) { { echo "$as_me:2104: error: \"you must use a numeric gid, not a name.\"" >&5 -echo "$as_me: error: \"you must use a numeric gid, not a name.\"" >&2;} + *) { { echo "$as_me:$LINENO: error: \"you must use an unsigned numeric gid, not a name.\"" >&5 +echo "$as_me: error: \"you must use an unsigned numeric gid, not a name.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -echo "$as_me:2111: checking for umask programs should be run with" >&5 +echo "$as_me:$LINENO: checking for umask programs should be run with" >&5 echo $ECHO_N "checking for umask programs should be run with... $ECHO_C" >&6 # Check whether --with-umask or --without-umask was given. if test "${with_umask+set}" = set; then withval="$with_umask" case $with_umask in - yes) { { echo "$as_me:2118: error: \"must give --with-umask an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-umask an argument.\"" >&5 echo "$as_me: error: \"must give --with-umask an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -2123,37 +2489,37 @@ echo "$as_me: error: \"must give --with-umask an argument.\"" >&2;} ;; [0-9]*) sudo_umask=$with_umask ;; - *) { { echo "$as_me:2126: error: \"you must enter a numeric mask.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"you must enter a numeric mask.\"" >&5 echo "$as_me: error: \"you must enter a numeric mask.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define SUDO_UMASK $sudo_umask -EOF +_ACEOF if test "$sudo_umask" = "0777"; then - echo "$as_me:2138: result: user" >&5 + echo "$as_me:$LINENO: result: user" >&5 echo "${ECHO_T}user" >&6 else - echo "$as_me:2141: result: $sudo_umask" >&5 + echo "$as_me:$LINENO: result: $sudo_umask" >&5 echo "${ECHO_T}$sudo_umask" >&6 fi -echo "$as_me:2145: checking for default user to run commands as" >&5 +echo "$as_me:$LINENO: checking for default user to run commands as" >&5 echo $ECHO_N "checking for default user to run commands as... $ECHO_C" >&6 # Check whether --with-runas-default or --without-runas-default was given. if test "${with_runas_default+set}" = set; then withval="$with_runas_default" case $with_runas_default in - yes) { { echo "$as_me:2152: error: \"must give --with-runas-default an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-runas-default an argument.\"" >&5 echo "$as_me: error: \"must give --with-runas-default an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:2156: error: \"--without-runas-default not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-runas-default not supported.\"" >&5 echo "$as_me: error: \"--without-runas-default not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -2162,71 +2528,72 @@ echo "$as_me: error: \"--without-runas-default not supported.\"" >&2;} esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define RUNAS_DEFAULT "$runas_default" -EOF +_ACEOF -echo "$as_me:2169: result: $runas_default" >&5 +echo "$as_me:$LINENO: result: $runas_default" >&5 echo "${ECHO_T}$runas_default" >&6 + # Check whether --with-exempt or --without-exempt was given. if test "${with_exempt+set}" = set; then withval="$with_exempt" case $with_exempt in - yes) { { echo "$as_me:2176: error: \"must give --with-exempt an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-exempt an argument.\"" >&5 echo "$as_me: error: \"must give --with-exempt an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:2180: error: \"--without-exempt not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-exempt not supported.\"" >&5 echo "$as_me: error: \"--without-exempt not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; *) -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define EXEMPTGROUP "$with_exempt" -EOF +_ACEOF - echo "$as_me:2189: checking for group to be exempt from password" >&5 + echo "$as_me:$LINENO: checking for group to be exempt from password" >&5 echo $ECHO_N "checking for group to be exempt from password... $ECHO_C" >&6 - echo "$as_me:2191: result: $with_exempt" >&5 + echo "$as_me:$LINENO: result: $with_exempt" >&5 echo "${ECHO_T}$with_exempt" >&6 ;; esac fi; -echo "$as_me:2197: checking for editor that visudo should use" >&5 +echo "$as_me:$LINENO: checking for editor that visudo should use" >&5 echo $ECHO_N "checking for editor that visudo should use... $ECHO_C" >&6 # Check whether --with-editor or --without-editor was given. if test "${with_editor+set}" = set; then withval="$with_editor" case $with_editor in - yes) { { echo "$as_me:2204: error: \"must give --with-editor an argument.\"" >&5 + yes) { { echo "$as_me:$LINENO: error: \"must give --with-editor an argument.\"" >&5 echo "$as_me: error: \"must give --with-editor an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; - no) { { echo "$as_me:2208: error: \"--without-editor not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-editor not supported.\"" >&5 echo "$as_me: error: \"--without-editor not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; *) -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define EDITOR "$with_editor" -EOF +_ACEOF - echo "$as_me:2217: result: $with_editor" >&5 + echo "$as_me:$LINENO: result: $with_editor" >&5 echo "${ECHO_T}$with_editor" >&6 ;; esac else - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define EDITOR _PATH_VI -EOF - echo "$as_me:2225: result: vi" >&5 +_ACEOF + echo "$as_me:$LINENO: result: vi" >&5 echo "${ECHO_T}vi" >&6 fi; -echo "$as_me:2229: checking whether to obey EDITOR and VISUAL environment variables" >&5 +echo "$as_me:$LINENO: checking whether to obey EDITOR and VISUAL environment variables" >&5 echo $ECHO_N "checking whether to obey EDITOR and VISUAL environment variables... $ECHO_C" >&6 # Check whether --with-env-editor or --without-env-editor was given. @@ -2237,7 +2604,7 @@ if test "${with_env_editor+set}" = set; then ;; no) env_editor=off ;; - *) { { echo "$as_me:2240: error: \"--with-env-editor does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-env-editor does not take an argument.\"" >&5 echo "$as_me: error: \"--with-env-editor does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -2245,18 +2612,18 @@ esac fi; if test "$env_editor" = "on"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define ENV_EDITOR 1 -EOF +_ACEOF - echo "$as_me:2252: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:2255: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:2259: checking number of tries a user gets to enter their password" >&5 +echo "$as_me:$LINENO: checking number of tries a user gets to enter their password" >&5 echo $ECHO_N "checking number of tries a user gets to enter their password... $ECHO_C" >&6 # Check whether --with-passwd-tries or --without-passwd-tries was given. @@ -2264,53 +2631,53 @@ if test "${with_passwd_tries+set}" = set; then withval="$with_passwd_tries" case $with_passwd_tries in yes) ;; - no) { { echo "$as_me:2267: error: \"--without-editor not supported.\"" >&5 + no) { { echo "$as_me:$LINENO: error: \"--without-editor not supported.\"" >&5 echo "$as_me: error: \"--without-editor not supported.\"" >&2;} { (exit 1); exit 1; }; } ;; [1-9]*) passwd_tries=$with_passwd_tries ;; - *) { { echo "$as_me:2273: error: \"you must enter the numer of tries, > 0\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"you must enter the numer of tries, > 0\"" >&5 echo "$as_me: error: \"you must enter the numer of tries, > 0\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define TRIES_FOR_PASSWORD $passwd_tries -EOF +_ACEOF -echo "$as_me:2284: result: $passwd_tries" >&5 +echo "$as_me:$LINENO: result: $passwd_tries" >&5 echo "${ECHO_T}$passwd_tries" >&6 -echo "$as_me:2287: checking time in minutes after which sudo will ask for a password again" >&5 +echo "$as_me:$LINENO: checking time in minutes after which sudo will ask for a password again" >&5 echo $ECHO_N "checking time in minutes after which sudo will ask for a password again... $ECHO_C" >&6 # Check whether --with-timeout or --without-timeout was given. if test "${with_timeout+set}" = set; then withval="$with_timeout" - echo $with_timeout; case $with_timeout in + case $with_timeout in yes) ;; no) timeout=0 ;; [0-9]*) timeout=$with_timeout ;; - *) { { echo "$as_me:2299: error: \"you must enter the numer of minutes.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"you must enter the numer of minutes.\"" >&5 echo "$as_me: error: \"you must enter the numer of minutes.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define TIMEOUT $timeout -EOF +_ACEOF -echo "$as_me:2310: result: $timeout" >&5 +echo "$as_me:$LINENO: result: $timeout" >&5 echo "${ECHO_T}$timeout" >&6 -echo "$as_me:2313: checking time in minutes after the password prompt will time out" >&5 +echo "$as_me:$LINENO: checking time in minutes after the password prompt will time out" >&5 echo $ECHO_N "checking time in minutes after the password prompt will time out... $ECHO_C" >&6 # Check whether --with-password-timeout or --without-password-timeout was given. @@ -2322,43 +2689,44 @@ if test "${with_password_timeout+set}" = set; then ;; [0-9]*) password_timeout=$with_password_timeout ;; - *) { { echo "$as_me:2325: error: \"you must enter the numer of minutes.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"you must enter the numer of minutes.\"" >&5 echo "$as_me: error: \"you must enter the numer of minutes.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define PASSWORD_TIMEOUT $password_timeout -EOF +_ACEOF -echo "$as_me:2336: result: $password_timeout" >&5 +echo "$as_me:$LINENO: result: $password_timeout" >&5 echo "${ECHO_T}$password_timeout" >&6 + # Check whether --with-execv or --without-execv was given. if test "${with_execv+set}" = set; then withval="$with_execv" case $with_execv in - yes) echo "$as_me:2343: checking whether to use execvp or execv" >&5 + yes) echo "$as_me:$LINENO: checking whether to use execvp or execv" >&5 echo $ECHO_N "checking whether to use execvp or execv... $ECHO_C" >&6 - echo "$as_me:2345: result: execv" >&5 + echo "$as_me:$LINENO: result: execv" >&5 echo "${ECHO_T}execv" >&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define USE_EXECV 1 -EOF +_ACEOF ;; no) ;; - *) { { echo "$as_me:2354: error: \"--with-execv does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-execv does not take an argument.\"" >&5 echo "$as_me: error: \"--with-execv does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; -echo "$as_me:2361: checking whether to use per-tty ticket files" >&5 +echo "$as_me:$LINENO: checking whether to use per-tty ticket files" >&5 echo $ECHO_N "checking whether to use per-tty ticket files... $ECHO_C" >&6 # Check whether --with-tty-tickets or --without-tty-tickets was given. @@ -2369,7 +2737,7 @@ if test "${with_tty_tickets+set}" = set; then ;; no) tty_tickets=off ;; - *) { { echo "$as_me:2372: error: \"--with-tty-tickets does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-tty-tickets does not take an argument.\"" >&5 echo "$as_me: error: \"--with-tty-tickets does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -2377,18 +2745,18 @@ esac fi; if test "$tty_tickets" = "on"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define USE_TTY_TICKETS 1 -EOF +_ACEOF - echo "$as_me:2384: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:2387: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:2391: checking whether to include insults" >&5 +echo "$as_me:$LINENO: checking whether to include insults" >&5 echo $ECHO_N "checking whether to include insults... $ECHO_C" >&6 # Check whether --with-insults or --without-insults was given. @@ -2401,7 +2769,7 @@ if test "${with_insults+set}" = set; then ;; no) insults=off ;; - *) { { echo "$as_me:2404: error: \"--with-insults does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-insults does not take an argument.\"" >&5 echo "$as_me: error: \"--with-insults does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -2409,17 +2777,18 @@ esac fi; if test "$insults" = "on"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define USE_INSULTS 1 -EOF +_ACEOF - echo "$as_me:2416: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:2419: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi + # Check whether --with-all-insults or --without-all-insults was given. if test "${with_all_insults+set}" = set; then withval="$with_all_insults" @@ -2430,79 +2799,83 @@ if test "${with_all_insults+set}" = set; then with_goons_insults=yes ;; no) ;; - *) { { echo "$as_me:2433: error: \"--with-all-insults does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-all-insults does not take an argument.\"" >&5 echo "$as_me: error: \"--with-all-insults does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-classic-insults or --without-classic-insults was given. if test "${with_classic_insults+set}" = set; then withval="$with_classic_insults" case $with_classic_insults in yes) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define CLASSIC_INSULTS 1 -EOF +_ACEOF ;; no) ;; - *) { { echo "$as_me:2451: error: \"--with-classic-insults does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-classic-insults does not take an argument.\"" >&5 echo "$as_me: error: \"--with-classic-insults does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-csops-insults or --without-csops-insults was given. if test "${with_csops_insults+set}" = set; then withval="$with_csops_insults" case $with_csops_insults in yes) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define CSOPS_INSULTS 1 -EOF +_ACEOF ;; no) ;; - *) { { echo "$as_me:2469: error: \"--with-csops-insults does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-csops-insults does not take an argument.\"" >&5 echo "$as_me: error: \"--with-csops-insults does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-hal-insults or --without-hal-insults was given. if test "${with_hal_insults+set}" = set; then withval="$with_hal_insults" case $with_hal_insults in yes) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAL_INSULTS 1 -EOF +_ACEOF ;; no) ;; - *) { { echo "$as_me:2487: error: \"--with-hal-insults does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-hal-insults does not take an argument.\"" >&5 echo "$as_me: error: \"--with-hal-insults does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac fi; + # Check whether --with-goons-insults or --without-goons-insults was given. if test "${with_goons_insults+set}" = set; then withval="$with_goons_insults" case $with_goons_insults in yes) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define GOONS_INSULTS 1 -EOF +_ACEOF ;; no) ;; - *) { { echo "$as_me:2505: error: \"--with-goons-insults does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-goons-insults does not take an argument.\"" >&5 echo "$as_me: error: \"--with-goons-insults does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -2510,18 +2883,18 @@ esac fi; if test "$insults" = "on"; then - echo "$as_me:2513: checking which insult sets to include" >&5 + echo "$as_me:$LINENO: checking which insult sets to include" >&5 echo $ECHO_N "checking which insult sets to include... $ECHO_C" >&6 i="" test "$with_goons_insults" = "yes" && i="goons ${i}" test "$with_hal_insults" = "yes" && i="hal ${i}" test "$with_csops_insults" = "yes" && i="csops ${i}" test "$with_classic_insults" = "yes" && i="classic ${i}" - echo "$as_me:2520: result: $i" >&5 + echo "$as_me:$LINENO: result: $i" >&5 echo "${ECHO_T}$i" >&6 fi -echo "$as_me:2524: checking whether to override the user's path" >&5 +echo "$as_me:$LINENO: checking whether to override the user's path" >&5 echo $ECHO_N "checking whether to override the user's path... $ECHO_C" >&6 # Check whether --with-secure-path or --without-secure-path was given. @@ -2529,110 +2902,139 @@ if test "${with_secure_path+set}" = set; then withval="$with_secure_path" case $with_secure_path in yes) -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define SECURE_PATH "/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc" -EOF +_ACEOF - echo "$as_me:2536: result: :/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc" >&5 + echo "$as_me:$LINENO: result: :/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc" >&5 echo "${ECHO_T}:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc" >&6 ;; - no) echo "$as_me:2539: result: no" >&5 + no) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - *) cat >>confdefs.h <<EOF + *) cat >>confdefs.h <<_ACEOF #define SECURE_PATH "$with_secure_path" -EOF +_ACEOF - echo "$as_me:2546: result: $with_secure_path" >&5 + echo "$as_me:$LINENO: result: $with_secure_path" >&5 echo "${ECHO_T}$with_secure_path" >&6 ;; esac else - echo "$as_me:2551: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; -echo "$as_me:2555: checking whether to get ip addresses from the network interfaces" >&5 +echo "$as_me:$LINENO: checking whether to get ip addresses from the network interfaces" >&5 echo $ECHO_N "checking whether to get ip addresses from the network interfaces... $ECHO_C" >&6 # Check whether --with-interfaces or --without-interfaces was given. if test "${with_interfaces+set}" = set; then withval="$with_interfaces" case $with_interfaces in - yes) echo "$as_me:2562: result: yes" >&5 + yes) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; no) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define STUB_LOAD_INTERFACES 1 -EOF +_ACEOF - echo "$as_me:2570: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - *) { { echo "$as_me:2573: error: \"--with-interfaces does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--with-interfaces does not take an argument.\"" >&5 echo "$as_me: error: \"--with-interfaces does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac else - echo "$as_me:2579: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +fi; + +echo "$as_me:$LINENO: checking whether stow should be used" >&5 +echo $ECHO_N "checking whether stow should be used... $ECHO_C" >&6 + +# Check whether --with-stow or --without-stow was given. +if test "${with_stow+set}" = set; then + withval="$with_stow" + case $with_stow in + yes) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define USE_STOW 1 +_ACEOF + + ;; + no) echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + *) { { echo "$as_me:$LINENO: error: \"--with-stow does not take an argument.\"" >&5 +echo "$as_me: error: \"--with-stow does not take an argument.\"" >&2;} + { (exit 1); exit 1; }; } + ;; +esac +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi; -echo "$as_me:2583: checking whether to do user authentication by default" >&5 + +echo "$as_me:$LINENO: checking whether to do user authentication by default" >&5 echo $ECHO_N "checking whether to do user authentication by default... $ECHO_C" >&6 # Check whether --enable-authentication or --disable-authentication was given. if test "${enable_authentication+set}" = set; then enableval="$enable_authentication" case "$enableval" in - yes) echo "$as_me:2589: result: yes" >&5 + yes) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; - no) echo "$as_me:2592: result: no" >&5 + no) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define NO_AUTHENTICATION 1 -EOF +_ACEOF ;; - *) echo "$as_me:2600: result: no" >&5 + *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "Ignoring unknown argument to --enable-authentication: $enableval" ;; esac else - echo "$as_me:2607: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 fi; -echo "$as_me:2611: checking whether to disable running the mailer as root" >&5 +echo "$as_me:$LINENO: checking whether to disable running the mailer as root" >&5 echo $ECHO_N "checking whether to disable running the mailer as root... $ECHO_C" >&6 # Check whether --enable-root-mailer or --disable-root-mailer was given. if test "${enable_root_mailer+set}" = set; then enableval="$enable_root_mailer" case "$enableval" in - yes) echo "$as_me:2617: result: no" >&5 + yes) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - no) echo "$as_me:2620: result: yes" >&5 + no) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define NO_ROOT_MAILER 1 -EOF +_ACEOF ;; - *) echo "$as_me:2628: result: no" >&5 + *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "Ignoring unknown argument to --enable-root-mailer: $enableval" ;; esac else - echo "$as_me:2635: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; @@ -2640,208 +3042,219 @@ fi; if test "${enable_setreuid+set}" = set; then enableval="$enable_setreuid" case "$enableval" in - no) BROKEN_SETREUID=1 + no) SKIP_SETREUID=yes ;; *) ;; esac fi; -echo "$as_me:2650: checking whether to disable use of POSIX saved ids" >&5 +# Check whether --enable-setresuid or --disable-setresuid was given. +if test "${enable_setresuid+set}" = set; then + enableval="$enable_setresuid" + case "$enableval" in + no) SKIP_SETRESUID=yes + ;; + *) ;; + esac + +fi; + +echo "$as_me:$LINENO: checking whether to disable use of POSIX saved ids" >&5 echo $ECHO_N "checking whether to disable use of POSIX saved ids... $ECHO_C" >&6 # Check whether --enable-saved-ids or --disable-saved-ids was given. if test "${enable_saved_ids+set}" = set; then enableval="$enable_saved_ids" case "$enableval" in - yes) echo "$as_me:2656: result: no" >&5 + yes) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - no) echo "$as_me:2659: result: yes" >&5 + no) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define NO_SAVED_IDS 1 -EOF +_ACEOF ;; - *) echo "$as_me:2667: result: no" >&5 + *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "Ignoring unknown argument to --enable-saved-ids: $enableval" ;; esac else - echo "$as_me:2674: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; -echo "$as_me:2678: checking whether to disable shadow password support" >&5 +echo "$as_me:$LINENO: checking whether to disable shadow password support" >&5 echo $ECHO_N "checking whether to disable shadow password support... $ECHO_C" >&6 # Check whether --enable-shadow or --disable-shadow was given. if test "${enable_shadow+set}" = set; then enableval="$enable_shadow" case "$enableval" in - yes) echo "$as_me:2684: result: no" >&5 + yes) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - no) echo "$as_me:2687: result: yes" >&5 + no) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CHECKSHADOW="false" ;; - *) echo "$as_me:2691: result: no" >&5 + *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "Ignoring unknown argument to --enable-shadow: $enableval" ;; esac else - echo "$as_me:2698: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; -echo "$as_me:2702: checking whether root should be allowed to use sudo" >&5 +echo "$as_me:$LINENO: checking whether root should be allowed to use sudo" >&5 echo $ECHO_N "checking whether root should be allowed to use sudo... $ECHO_C" >&6 # Check whether --enable-root-sudo or --disable-root-sudo was given. if test "${enable_root_sudo+set}" = set; then enableval="$enable_root_sudo" case "$enableval" in - yes) echo "$as_me:2708: result: yes" >&5 + yes) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; no) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define NO_ROOT_SUDO 1 -EOF +_ACEOF - echo "$as_me:2716: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - *) { { echo "$as_me:2719: error: \"--enable-root-sudo does not take an argument.\"" >&5 + *) { { echo "$as_me:$LINENO: error: \"--enable-root-sudo does not take an argument.\"" >&5 echo "$as_me: error: \"--enable-root-sudo does not take an argument.\"" >&2;} { (exit 1); exit 1; }; } ;; esac else - echo "$as_me:2726: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 fi; -echo "$as_me:2730: checking whether to log the hostname in the log file" >&5 +echo "$as_me:$LINENO: checking whether to log the hostname in the log file" >&5 echo $ECHO_N "checking whether to log the hostname in the log file... $ECHO_C" >&6 # Check whether --enable-log-host or --disable-log-host was given. if test "${enable_log_host+set}" = set; then enableval="$enable_log_host" case "$enableval" in - yes) echo "$as_me:2736: result: yes" >&5 + yes) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HOST_IN_LOG 1 -EOF +_ACEOF ;; - no) echo "$as_me:2744: result: no" >&5 + no) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - *) echo "$as_me:2747: result: no" >&5 + *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "Ignoring unknown argument to --enable-log-host: $enableval" ;; esac else - echo "$as_me:2754: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; -echo "$as_me:2758: checking whether to invoke a shell if sudo is given no arguments" >&5 +echo "$as_me:$LINENO: checking whether to invoke a shell if sudo is given no arguments" >&5 echo $ECHO_N "checking whether to invoke a shell if sudo is given no arguments... $ECHO_C" >&6 # Check whether --enable-noargs-shell or --disable-noargs-shell was given. if test "${enable_noargs_shell+set}" = set; then enableval="$enable_noargs_shell" case "$enableval" in - yes) echo "$as_me:2764: result: yes" >&5 + yes) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define SHELL_IF_NO_ARGS 1 -EOF +_ACEOF ;; - no) echo "$as_me:2772: result: no" >&5 + no) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - *) echo "$as_me:2775: result: no" >&5 + *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "Ignoring unknown argument to --enable-noargs-shell: $enableval" ;; esac else - echo "$as_me:2782: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; -echo "$as_me:2786: checking whether to set \$HOME to target user in shell mode" >&5 +echo "$as_me:$LINENO: checking whether to set \$HOME to target user in shell mode" >&5 echo $ECHO_N "checking whether to set \$HOME to target user in shell mode... $ECHO_C" >&6 # Check whether --enable-shell-sets-home or --disable-shell-sets-home was given. if test "${enable_shell_sets_home+set}" = set; then enableval="$enable_shell_sets_home" case "$enableval" in - yes) echo "$as_me:2792: result: yes" >&5 + yes) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define SHELL_SETS_HOME 1 -EOF +_ACEOF ;; - no) echo "$as_me:2800: result: no" >&5 + no) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - *) echo "$as_me:2803: result: no" >&5 + *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "Ignoring unknown argument to --enable-shell-sets-home: $enableval" ;; esac else - echo "$as_me:2810: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; -echo "$as_me:2814: checking whether to disable 'command not found' messages" >&5 +echo "$as_me:$LINENO: checking whether to disable 'command not found' messages" >&5 echo $ECHO_N "checking whether to disable 'command not found' messages... $ECHO_C" >&6 # Check whether --enable-path_info or --disable-path_info was given. if test "${enable_path_info+set}" = set; then enableval="$enable_path_info" case "$enableval" in - yes) echo "$as_me:2820: result: no" >&5 + yes) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - no) echo "$as_me:2823: result: yes" >&5 + no) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define DONT_LEAK_PATH_INFO 1 -EOF +_ACEOF ;; - *) echo "$as_me:2831: result: no" >&5 + *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "Ignoring unknown argument to --enable-path-info: $enableval" ;; esac else - echo "$as_me:2838: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 -echo "$as_me:2844: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_EGREPPROG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2849,25 +3262,28 @@ else if test -n "$EGREPPROG"; then ac_cv_prog_EGREPPROG="$EGREPPROG" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_EGREPPROG="egrep" -echo "$as_me:2859: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_EGREPPROG="egrep" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi EGREPPROG=$ac_cv_prog_EGREPPROG if test -n "$EGREPPROG"; then - echo "$as_me:2867: result: $EGREPPROG" >&5 + echo "$as_me:$LINENO: result: $EGREPPROG" >&5 echo "${ECHO_T}$EGREPPROG" >&6 else - echo "$as_me:2870: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2888,7 +3304,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:2891: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2896,25 +3312,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:2906: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:2914: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:2917: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2923,7 +3342,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:2926: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2931,25 +3350,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:2941: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:2949: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:2952: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2962,7 +3384,7 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:2965: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2970,25 +3392,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:2980: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:2988: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:2991: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2997,7 +3422,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:3000: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3005,25 +3430,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:3015: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:3023: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:3026: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3036,7 +3464,7 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:3039: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3045,19 +3473,22 @@ else ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue -fi -ac_cv_prog_CC="cc" -echo "$as_me:3059: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done if test $ac_prog_rejected = yes; then @@ -3069,19 +3500,17 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" ${1+"$@"} - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:3081: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:3084: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3092,7 +3521,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:3095: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3100,25 +3529,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:3110: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:3118: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:3121: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3131,7 +3563,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:3134: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3139,25 +3571,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:3149: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:3157: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:3160: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -3169,33 +3604,40 @@ fi fi -test -z "$CC" && { { echo "$as_me:3172: error: no acceptable cc found in \$PATH" >&5 -echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:3177:" \ +echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:3180: \"$ac_compiler --version </dev/null >&5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 (eval $ac_compiler --version </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:3183: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:3185: \"$ac_compiler -v </dev/null >&5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 (eval $ac_compiler -v </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:3188: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:3190: \"$ac_compiler -V </dev/null >&5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 (eval $ac_compiler -V </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:3193: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 3197 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -3206,100 +3648,120 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:3213: checking for C compiler default output" >&5 +echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:3216: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:3219: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. -for ac_file in `ls a.exe conftest.exe 2>/dev/null; - ls a.out conftest 2>/dev/null; - ls a.* conftest.* 2>/dev/null`; do + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; - a.out ) # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool --akim. - export ac_cv_exeext - break;; - * ) break;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; esac done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:3242: error: C compiler cannot create executables" >&5 -echo "$as_me: error: C compiler cannot create executables" >&2;} +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:3248: result: $ac_file" >&5 +echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:3253: checking whether the C compiler works" >&5 +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:3259: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3262: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:3269: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&5 + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&2;} +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi -echo "$as_me:3277: result: yes" >&5 +echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -rm -f a.out a.exe conftest$ac_cv_exeext +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:3284: checking whether we are cross compiling" >&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:3286: result: $cross_compiling" >&5 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:3289: checking for executable suffix" >&5 -echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:3291: \"$ac_link\"") >&5 +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3294: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. -for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; @@ -3307,26 +3769,32 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:3310: error: cannot compute EXEEXT: cannot compile and link" >&5 -echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:3316: result: $ac_cv_exeext" >&5 +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:3322: checking for object suffix" >&5 -echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3328 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -3337,40 +3805,47 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:3340: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3343: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:3355: error: cannot compute OBJEXT: cannot compile" >&5 -echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:3362: result: $ac_cv_objext" >&5 +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:3366: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3372 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -3384,41 +3859,46 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3387: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3390: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3393: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3396: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:3408: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:3414: checking whether $CC accepts -g" >&5 +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3420 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -3429,26 +3909,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3432: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3435: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3438: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3441: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3451: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -3465,6 +3946,102 @@ else CFLAGS= fi fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide @@ -3475,16 +4052,16 @@ cat >conftest.$ac_ext <<_ACEOF #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3478: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3481: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3484: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3487: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -3496,8 +4073,12 @@ if { (eval echo "$as_me:3478: \"$ac_compile\"") >&5 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 3499 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> $ac_declaration int @@ -3509,27 +4090,32 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3512: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3515: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3518: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3521: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 3531 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_declaration int main () @@ -3540,21 +4126,22 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3543: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3546: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3549: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3552: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi rm -f conftest.$ac_objext conftest.$ac_ext done @@ -3567,7 +4154,8 @@ fi else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c @@ -3576,123 +4164,115 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:3579: checking for POSIXized ISC" >&5 -echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6 -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 -then - echo "$as_me:3584: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - ISC=yes # If later tests want to check for ISC. - -cat >>confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi -else - echo "$as_me:3598: result: no" >&5 -echo "${ECHO_T}no" >&6 - ISC= -fi - -ac_cv_prog_cc_cross="no" -cross_compiling="no" -echo "$as_me:3606: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +echo "$as_me:$LINENO: checking for library containing strerror" >&5 +echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 +if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC + ac_func_search_save_LIBS=$LIBS +ac_cv_search_strerror=no cat >conftest.$ac_ext <<_ACEOF -#line 3614 "configure" -#include "confdefs.h" -#include <stdarg.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +int +main () { - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; +strerror (); + ; + return 0; } -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_strerror="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_strerror" = no; then + for ac_lib in cposix; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); int main () { -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; +strerror (); ; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:3663: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3666: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3669: \"$ac_try\"") >&5 + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3672: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg + ac_cv_search_strerror="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 +echo "${ECHO_T}$ac_cv_search_strerror" >&6 +if test "$ac_cv_search_strerror" != no; then + test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" fi -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:3689: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:3692: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac +ac_cv_prog_cc_cross="no" +cross_compiling="no" ac_cv_prog_cc_cross="no" cross_compiling="no" @@ -3701,7 +4281,7 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:3704: checking how to run the C preprocessor" >&5 +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then @@ -3719,21 +4299,31 @@ for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line 3725 "configure" -#include "confdefs.h" -#include <assert.h> +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif Syntax error _ACEOF -if { (eval echo "$as_me:3730: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:3736: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -3747,7 +4337,8 @@ if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi @@ -3756,17 +4347,21 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 3759 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:3763: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:3769: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -3781,7 +4376,8 @@ if test -z "$ac_cpp_err"; then continue else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -3803,28 +4399,38 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:3806: result: $CPP" >&5 +echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line 3816 "configure" -#include "confdefs.h" -#include <assert.h> +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif Syntax error _ACEOF -if { (eval echo "$as_me:3821: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:3827: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -3838,7 +4444,8 @@ if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi @@ -3847,17 +4454,21 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 3850 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:3854: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:3860: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -3872,7 +4483,8 @@ if test -z "$ac_cpp_err"; then continue else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -3885,8 +4497,10 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:3888: error: C preprocessor \"$CPP\" fails sanity check" >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -3896,13 +4510,14 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test "$with_devel" = "yes" -a -n "$GCC"; then CFLAGS="${CFLAGS} -Wall" fi # Extract the first word of "uname", so it can be a program name with args. set dummy uname; ac_word=$2 -echo "$as_me:3905: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_UNAMEPROG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3910,31 +4525,34 @@ else if test -n "$UNAMEPROG"; then ac_cv_prog_UNAMEPROG="$UNAMEPROG" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_UNAMEPROG="uname" -echo "$as_me:3920: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_UNAMEPROG="uname" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi UNAMEPROG=$ac_cv_prog_UNAMEPROG if test -n "$UNAMEPROG"; then - echo "$as_me:3928: result: $UNAMEPROG" >&5 + echo "$as_me:$LINENO: result: $UNAMEPROG" >&5 echo "${ECHO_T}$UNAMEPROG" >&6 else - echo "$as_me:3931: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "tr", so it can be a program name with args. set dummy tr; ac_word=$2 -echo "$as_me:3937: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_TRPROG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3942,31 +4560,34 @@ else if test -n "$TRPROG"; then ac_cv_prog_TRPROG="$TRPROG" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_TRPROG="tr" -echo "$as_me:3952: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_TRPROG="tr" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi TRPROG=$ac_cv_prog_TRPROG if test -n "$TRPROG"; then - echo "$as_me:3960: result: $TRPROG" >&5 + echo "$as_me:$LINENO: result: $TRPROG" >&5 echo "${ECHO_T}$TRPROG" >&6 else - echo "$as_me:3963: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 -echo "$as_me:3969: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_SEDPROG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3974,31 +4595,34 @@ else if test -n "$SEDPROG"; then ac_cv_prog_SEDPROG="$SEDPROG" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_SEDPROG="sed" -echo "$as_me:3984: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_SEDPROG="sed" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi SEDPROG=$ac_cv_prog_SEDPROG if test -n "$SEDPROG"; then - echo "$as_me:3992: result: $SEDPROG" >&5 + echo "$as_me:$LINENO: result: $SEDPROG" >&5 echo "${ECHO_T}$SEDPROG" >&6 else - echo "$as_me:3995: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "nroff", so it can be a program name with args. set dummy nroff; ac_word=$2 -echo "$as_me:4001: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_NROFFPROG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4006,25 +4630,28 @@ else if test -n "$NROFFPROG"; then ac_cv_prog_NROFFPROG="$NROFFPROG" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_NROFFPROG="nroff" -echo "$as_me:4016: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NROFFPROG="nroff" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi NROFFPROG=$ac_cv_prog_NROFFPROG if test -n "$NROFFPROG"; then - echo "$as_me:4024: result: $NROFFPROG" >&5 + echo "$as_me:$LINENO: result: $NROFFPROG" >&5 echo "${ECHO_T}$NROFFPROG" >&6 else - echo "$as_me:4027: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4050,7 +4677,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:4053: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi @@ -4060,11 +4687,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:4063: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:4067: checking build system type" >&5 +echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4073,23 +4700,24 @@ else test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:4076: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:4080: error: $ac_config_sub $ac_cv_build_alias failed." >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:4085: result: $ac_cv_build" >&5 +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:4092: checking host system type" >&5 + +echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4098,18 +4726,19 @@ else test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:4101: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:4106: result: $ac_cv_host" >&5 +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + if test -n "$sudo_cv_prev_host"; then if test "$sudo_cv_prev_host" != "$host"; then echo "" @@ -4118,7 +4747,7 @@ if test -n "$sudo_cv_prev_host"; then echo "" exit 1 else - echo "$as_me:4121: checking previous host type" >&5 + echo "$as_me:$LINENO: checking previous host type" >&5 echo $ECHO_N "checking previous host type... $ECHO_C" >&6 if test "${sudo_cv_prev_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4159,77 +4788,96 @@ case "$host" in # check for password adjunct functions (shadow passwords) if test "$CHECKSHADOW" = "true"; then + for ac_func in getpwanam issecure do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:4165: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4171 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4202: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4205: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4208: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4211: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4221: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF else break fi done + + + + CHECKSHADOW="false" fi ;; @@ -4254,7 +4902,7 @@ EOF ;; *-*-hiuxmpp*) if test "$CHECKSHADOW" = "true"; then - echo "$as_me:4257: checking for getprpwnam in -lsec" >&5 + echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5 echo $ECHO_N "checking for getprpwnam in -lsec... $ECHO_C" >&6 if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4262,8 +4910,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4265 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -4281,35 +4933,36 @@ getprpwnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4284: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4287: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4290: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4293: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_sec_getprpwnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_sec_getprpwnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4304: result: $ac_cv_lib_sec_getprpwnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5 echo "${ECHO_T}$ac_cv_lib_sec_getprpwnam" >&6 if test $ac_cv_lib_sec_getprpwnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETPRPWNAM 1 -EOF +_ACEOF SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"; SECUREWARE=1 else - echo "$as_me:4312: checking for getprpwnam in -lsecurity" >&5 + echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4317,8 +4970,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsecurity $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4320 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -4336,32 +4993,33 @@ getprpwnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4339: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4342: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4345: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4348: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_security_getprpwnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_security_getprpwnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4359: result: $ac_cv_lib_security_getprpwnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6 if test $ac_cv_lib_security_getprpwnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETPRPWNAM 1 -EOF +_ACEOF SUDO_LIBS="${SUDO_LIBS} -lsecurity"; LIBS="${LIBS} -lsecurity"; SECUREWARE=1 fi @@ -4374,7 +5032,7 @@ fi ;; *-*-hpux1[0-9]*) if test "$CHECKSHADOW" = "true"; then - echo "$as_me:4377: checking for getprpwnam in -lsec" >&5 + echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5 echo $ECHO_N "checking for getprpwnam in -lsec... $ECHO_C" >&6 if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4382,8 +5040,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4385 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -4401,33 +5063,34 @@ getprpwnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4404: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4407: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4410: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4413: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_sec_getprpwnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_sec_getprpwnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4424: result: $ac_cv_lib_sec_getprpwnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5 echo "${ECHO_T}$ac_cv_lib_sec_getprpwnam" >&6 if test $ac_cv_lib_sec_getprpwnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETPRPWNAM 1 -EOF - echo "$as_me:4430: checking for iscomsec in -lsec" >&5 +_ACEOF + echo "$as_me:$LINENO: checking for iscomsec in -lsec" >&5 echo $ECHO_N "checking for iscomsec in -lsec... $ECHO_C" >&6 if test "${ac_cv_lib_sec_iscomsec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4435,8 +5098,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4438 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -4454,33 +5121,34 @@ iscomsec (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4457: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4460: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4463: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4466: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_sec_iscomsec=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_sec_iscomsec=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4477: result: $ac_cv_lib_sec_iscomsec" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_iscomsec" >&5 echo "${ECHO_T}$ac_cv_lib_sec_iscomsec" >&6 if test $ac_cv_lib_sec_iscomsec = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_ISCOMSEC 1 -EOF +_ACEOF fi SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"; SECUREWARE=1 @@ -4498,81 +5166,98 @@ fi ;; *-*-hpux9*) -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define BROKEN_SYSLOG 1 -EOF +_ACEOF + if test "$CHECKSHADOW" = "true"; then for ac_func in getspwuid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:4510: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4516 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4547: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4550: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4553: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4556: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4566: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF fi done + + CHECKSHADOW="false" fi @@ -4592,9 +5277,10 @@ done test -n "$mansectform" || mansectform=4 ;; *-*-hpux*) - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_SYSLOG 1 -EOF +_ACEOF + # Not sure if setuid binaries are safe in < 9.x if test -n "$GCC"; then @@ -4614,99 +5300,113 @@ EOF # ignore envariables wrt dynamic lib path SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-no_library_replacement" - echo "$as_me:4617: checking whether to disable sia support on Digital UNIX" >&5 + echo "$as_me:$LINENO: checking whether to disable sia support on Digital UNIX" >&5 echo $ECHO_N "checking whether to disable sia support on Digital UNIX... $ECHO_C" >&6 # Check whether --enable-sia or --disable-sia was given. if test "${enable_sia+set}" = set; then enableval="$enable_sia" case "$enableval" in - yes) echo "$as_me:4623: result: no" >&5 + yes) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - no) echo "$as_me:4626: result: yes" >&5 + no) echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CHECKSIA=false ;; - *) echo "$as_me:4630: result: no" >&5 + *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "Ignoring unknown argument to --enable-sia: $enableval" ;; esac else - echo "$as_me:4637: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; # use SIA by default, if we have it, else SecureWare # unless overridden on the command line if test "$CHECKSIA" = "true"; then - echo "$as_me:4644: checking for sia_ses_init" >&5 + echo "$as_me:$LINENO: checking for sia_ses_init" >&5 echo $ECHO_N "checking for sia_ses_init... $ECHO_C" >&6 if test "${ac_cv_func_sia_ses_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4650 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char sia_ses_init (); below. */ -#include <assert.h> + which can conflict with char sia_ses_init (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char sia_ses_init (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_sia_ses_init) || defined (__stub___sia_ses_init) choke me #else -f = sia_ses_init; +char (*f) () = sia_ses_init; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != sia_ses_init; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4681: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4684: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4687: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4690: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_sia_ses_init=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_sia_ses_init=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4700: result: $ac_cv_func_sia_ses_init" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_sia_ses_init" >&5 echo "${ECHO_T}$ac_cv_func_sia_ses_init" >&6 if test $ac_cv_func_sia_ses_init = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_SIA 1 -EOF +_ACEOF if test -n "$with_skey" -o -n "$with_opie" -o -n "$with_otp_only" -o -n "$with_long_otp_prompt" -o -n "$with_SecurID" -o -n "$with_fwtk" -o -n "$with_kerb4" -o -n "$with_kerb5" -o -n "$with_pam" -o -n "$with_AFS" -o -n "$with_DCE"; then - { { echo "$as_me:4709: error: \"you cannot mix SIA and other authentication schemes. You can turn off SIA support via the --disable-sia option\"" >&5 + { { echo "$as_me:$LINENO: error: \"you cannot mix SIA and other authentication schemes. You can turn off SIA support via the --disable-sia option\"" >&5 echo "$as_me: error: \"you cannot mix SIA and other authentication schemes. You can turn off SIA support via the --disable-sia option\"" >&2;} { (exit 1); exit 1; }; } fi; CHECKSHADOW=false @@ -4714,7 +5414,7 @@ fi fi if test "$CHECKSHADOW" = "true"; then - echo "$as_me:4717: checking for getprpwnam in -lsecurity" >&5 + echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4722,8 +5422,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsecurity $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4725 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -4741,27 +5445,28 @@ getprpwnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4744: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4747: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4750: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4753: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_security_getprpwnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_security_getprpwnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4764: result: $ac_cv_lib_security_getprpwnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6 if test $ac_cv_lib_security_getprpwnam = yes; then SECUREWARE=1 @@ -4772,148 +5477,177 @@ fi if test -n "$SECUREWARE"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_GETPRPWNAM 1 -EOF +_ACEOF # -ldb includes bogus versions of snprintf/vsnprintf for ac_func in snprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:4784: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4790 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4821: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4824: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4827: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4830: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4840: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF else NEED_SNPRINTF=1 fi done + for ac_func in vsnprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:4855: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4861 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4892: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4895: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4898: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4901: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4911: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF else NEED_SNPRINTF=1 @@ -4921,7 +5655,7 @@ fi done # 4.x and higher need -ldb too... - echo "$as_me:4924: checking for dbopen in -ldb" >&5 + echo "$as_me:$LINENO: checking for dbopen in -ldb" >&5 echo $ECHO_N "checking for dbopen in -ldb... $ECHO_C" >&6 if test "${ac_cv_lib_db_dbopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4929,8 +5663,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldb $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4932 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -4948,27 +5686,28 @@ dbopen (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4951: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4954: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4957: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4960: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_db_dbopen=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_db_dbopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4971: result: $ac_cv_lib_db_dbopen" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_db_dbopen" >&5 echo "${ECHO_T}$ac_cv_lib_db_dbopen" >&6 if test $ac_cv_lib_db_dbopen = yes; then SUDO_LIBS="${SUDO_LIBS} -lsecurity -ldb -laud -lm"; LIBS="${LIBS} -lsecurity -ldb -laud -lm" @@ -4976,80 +5715,99 @@ else SUDO_LIBS="${SUDO_LIBS} -lsecurity -ldb -laud -lm"; LIBS="${LIBS} -lsecurity -ldb -laud -lm" fi + for ac_func in dispcrypt do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:4982: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4988 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5019: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5022: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5025: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5028: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5038: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF fi done - echo "$as_me:5048: checking for broken /usr/include/prot.h" >&5 + echo "$as_me:$LINENO: checking for broken /usr/include/prot.h" >&5 echo $ECHO_N "checking for broken /usr/include/prot.h... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 5051 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/security.h> @@ -5064,23 +5822,24 @@ exit(0); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5067: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5070: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5073: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5076: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:5078: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -echo "$as_me:5083: result: yes, fixing locally" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: yes, fixing locally" >&5 echo "${ECHO_T}yes, fixing locally" >&6 sed 's:<acl.h>:<sys/acl.h>:g' < /usr/include/prot.h > prot.h @@ -5096,7 +5855,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext *-*-irix*) CPPFLAGS="${CPPFLAGS} -D_BSD_TYPES" if test -z "$NROFFPROG"; then - MAN_POSTINSTALL=' /bin/rm -f $(mandir8)/sudo.$(mansect8).z $(mandir8)/visudo.$(mansect8).z $(mandir5)/sudoers.$(mansect5).z ; /usr/bin/pack $(mandir8)/sudo.$(mansect8) $(mandir8)/visudo.$(mansect8) $(mandir5)/sudoers.$(mansect5)' + MAN_POSTINSTALL=' /bin/rm -f $(mandirsu)/sudo.$(mansectsu).z $(mandirsu)/visudo.$(mansectsu).z $(mandirform)/sudoers.$(mansectform).z ; /usr/bin/pack $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudoers.$(mansectform)' if test "$prefix" = "/usr/local" -a "$mandir" = '$(prefix)/man'; then if test -d /usr/share/catman/local; then mandir="/usr/share/catman/local" @@ -5115,7 +5874,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi # IRIX <= 4 needs -lsun if test "$OSREV" -le 4; then - echo "$as_me:5118: checking for getpwnam in -lsun" >&5 + echo "$as_me:$LINENO: checking for getpwnam in -lsun" >&5 echo $ECHO_N "checking for getpwnam in -lsun... $ECHO_C" >&6 if test "${ac_cv_lib_sun_getpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5123,8 +5882,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsun $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5126 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5142,27 +5905,28 @@ getpwnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5145: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5148: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5151: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5154: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_sun_getpwnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_sun_getpwnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5165: result: $ac_cv_lib_sun_getpwnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_sun_getpwnam" >&5 echo "${ECHO_T}$ac_cv_lib_sun_getpwnam" >&6 if test $ac_cv_lib_sun_getpwnam = yes; then LIBS="${LIBS} -lsun" @@ -5179,71 +5943,85 @@ fi for ac_func in getspnam do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5182: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5188 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5219: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5222: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5225: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5228: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5238: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF else - echo "$as_me:5246: checking for getspnam in -lshadow" >&5 + echo "$as_me:$LINENO: checking for getspnam in -lshadow" >&5 echo $ECHO_N "checking for getspnam in -lshadow... $ECHO_C" >&6 if test "${ac_cv_lib_shadow_getspnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5251,8 +6029,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lshadow $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5254 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5270,32 +6052,33 @@ getspnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5273: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5276: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5279: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5282: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_shadow_getspnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_shadow_getspnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5293: result: $ac_cv_lib_shadow_getspnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_shadow_getspnam" >&5 echo "${ECHO_T}$ac_cv_lib_shadow_getspnam" >&6 if test $ac_cv_lib_shadow_getspnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETSPNAM 1 -EOF +_ACEOF SUDO_LIBS="${SUDO_LIBS} -lshadow"; LIBS="${LIBS} -lshadow" fi @@ -5315,7 +6098,7 @@ EOF fi if test "$CHECKSHADOW" = "true"; then - echo "$as_me:5318: checking for getprpwnam in -lsec" >&5 + echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5 echo $ECHO_N "checking for getprpwnam in -lsec... $ECHO_C" >&6 if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5323,8 +6106,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5326 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5342,32 +6129,33 @@ getprpwnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5345: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5348: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5351: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5354: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_sec_getprpwnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_sec_getprpwnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5365: result: $ac_cv_lib_sec_getprpwnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5 echo "${ECHO_T}$ac_cv_lib_sec_getprpwnam" >&6 if test $ac_cv_lib_sec_getprpwnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETPRPWNAM 1 -EOF +_ACEOF SUDO_LIBS="${SUDO_LIBS} -lprot"; LIBS="${LIBS} -lprot"; OSDEFS="${OSDEFS} -D_AUDIT -D_ACL -DSecureWare"; SECUREWARE=1 fi @@ -5377,7 +6165,7 @@ fi *-*-ultrix*) OS="ultrix" if test "$CHECKSHADOW" = "true"; then - echo "$as_me:5380: checking for getauthuid in -lauth" >&5 + echo "$as_me:$LINENO: checking for getauthuid in -lauth" >&5 echo $ECHO_N "checking for getauthuid in -lauth... $ECHO_C" >&6 if test "${ac_cv_lib_auth_getauthuid+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5385,8 +6173,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lauth $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5388 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5404,33 +6196,34 @@ getauthuid (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5407: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5410: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5413: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5416: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_auth_getauthuid=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_auth_getauthuid=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5427: result: $ac_cv_lib_auth_getauthuid" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_auth_getauthuid" >&5 echo "${ECHO_T}$ac_cv_lib_auth_getauthuid" >&6 if test $ac_cv_lib_auth_getauthuid = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_GETAUTHUID 1 -EOF +_ACEOF SUDO_LIBS="${SUDO_LIBS} -lauth"; LIBS="${LIBS} -lauth" fi @@ -5451,7 +6244,7 @@ fi LIBS="${LIBS} -lcrypt" if test "$CHECKSHADOW" = "true"; then - echo "$as_me:5454: checking for getspnam in -lsec" >&5 + echo "$as_me:$LINENO: checking for getspnam in -lsec" >&5 echo $ECHO_N "checking for getspnam in -lsec... $ECHO_C" >&6 if test "${ac_cv_lib_sec_getspnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5459,8 +6252,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5462 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5478,32 +6275,33 @@ getspnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5481: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5484: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5487: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5490: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_sec_getspnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_sec_getspnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5501: result: $ac_cv_lib_sec_getspnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5 echo "${ECHO_T}$ac_cv_lib_sec_getspnam" >&6 if test $ac_cv_lib_sec_getspnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETSPNAM 1 -EOF +_ACEOF SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec" fi @@ -5514,7 +6312,7 @@ fi ;; *-*-sco*|*-sco-*) if test "$CHECKSHADOW" = "true"; then - echo "$as_me:5517: checking for getprpwnam in -lprot" >&5 + echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6 if test "${ac_cv_lib_prot_getprpwnam_lx+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5522,8 +6320,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lprot -lx $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5525 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5541,36 +6343,37 @@ getprpwnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5544: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5547: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5550: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5553: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_prot_getprpwnam_lx=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_prot_getprpwnam_lx=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5564: result: $ac_cv_lib_prot_getprpwnam_lx" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam_lx" >&5 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam_lx" >&6 if test $ac_cv_lib_prot_getprpwnam_lx = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETPRPWNAM 1 -EOF +_ACEOF SUDO_LIBS="${SUDO_LIBS} -lprot -lx"; LIBS="${LIBS} -lprot -lx"; SECUREWARE=1 fi - echo "$as_me:5573: checking for getspnam in -lgen" >&5 + echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6 if test "${ac_cv_lib_gen_getspnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5578,8 +6381,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgen $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5581 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5597,32 +6404,33 @@ getspnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5600: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5603: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5606: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5609: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_gen_getspnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_gen_getspnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5620: result: $ac_cv_lib_gen_getspnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6 if test $ac_cv_lib_gen_getspnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETSPNAM 1 -EOF +_ACEOF SUDO_LIBS="${SUDO_LIBS} -lgen"; LIBS="${LIBS} -lgen" fi @@ -5639,7 +6447,7 @@ fi ;; *-sequent-sysv*) if test "$CHECKSHADOW" = "true"; then - echo "$as_me:5642: checking for getspnam in -lsec" >&5 + echo "$as_me:$LINENO: checking for getspnam in -lsec" >&5 echo $ECHO_N "checking for getspnam in -lsec... $ECHO_C" >&6 if test "${ac_cv_lib_sec_getspnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5647,8 +6455,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5650 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5666,32 +6478,33 @@ getspnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5669: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5672: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5675: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5678: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_sec_getspnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_sec_getspnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5689: result: $ac_cv_lib_sec_getspnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5 echo "${ECHO_T}$ac_cv_lib_sec_getspnam" >&6 if test $ac_cv_lib_sec_getspnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETSPNAM 1 -EOF +_ACEOF SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec" fi @@ -5701,7 +6514,7 @@ fi test -n "$mansectform" || mansectform=4 ;; *-ncr-sysv4*|*-ncr-sysvr4*) - echo "$as_me:5704: checking for strcasecmp in -lc89" >&5 + echo "$as_me:$LINENO: checking for strcasecmp in -lc89" >&5 echo $ECHO_N "checking for strcasecmp in -lc89... $ECHO_C" >&6 if test "${ac_cv_lib_c89_strcasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5709,8 +6522,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lc89 $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5712 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5728,32 +6545,33 @@ strcasecmp (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5731: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5734: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5737: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5740: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_c89_strcasecmp=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_c89_strcasecmp=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5751: result: $ac_cv_lib_c89_strcasecmp" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_c89_strcasecmp" >&5 echo "${ECHO_T}$ac_cv_lib_c89_strcasecmp" >&6 if test $ac_cv_lib_c89_strcasecmp = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STRCASECMP 1 -EOF +_ACEOF LIBS="${LIBS} -lc89"; ac_cv_func_strcasecmp=yes fi @@ -5767,7 +6585,7 @@ fi test -n "$mansectform" || mansectform=4 ;; *-*-bsdi*) - BROKEN_SETREUID=yes + SKIP_SETREUID=yes # Use shlicc for BSD/OS [23].x unless asked to do otherwise if test "${with_CC+set}" != set -a "$ac_cv_prog_CC" = gcc; then case "$OSREV" in @@ -5783,7 +6601,7 @@ fi # backported to 2.0.5. We just take 2.1 and above... case "`echo $host_os | sed 's/^freebsd\([0-9\.]*\).*$/\1/'`" in 0.*|1.*|2.0*) - BROKEN_SETREUID=yes + SKIP_SETREUID=yes ;; esac if test "$with_logincap" = "yes"; then @@ -5797,7 +6615,7 @@ fi fi ;; *-*-*openbsd*) - BROKEN_SETREUID=yes + SKIP_SETREUID=yes if test "$CHECKSHADOW" = "true"; then CHECKSHADOW="false" fi @@ -5806,7 +6624,7 @@ fi # NetBSD has a real setreuid(2) starting with 1.3.2 case "`echo $host_os | sed 's/^netbsd\([0-9\.]*\).*$/\1/'`" in 0.9*|1.012*|1.3|1.3.1) - BROKEN_SETREUID=yes + SKIP_SETREUID=yes ;; esac if test "$CHECKSHADOW" = "true"; then @@ -5837,71 +6655,85 @@ if test "$CHECKSHADOW" = "true"; then for ac_func in getspnam do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:5840: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5846 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5877: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5880: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5883: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5886: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5896: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF CHECKSHADOW="false" else - echo "$as_me:5904: checking for getspnam in -lgen" >&5 + echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6 if test "${ac_cv_lib_gen_getspnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5909,8 +6741,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lgen $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5912 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5928,33 +6764,34 @@ getspnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5931: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5934: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5937: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5940: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_gen_getspnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_gen_getspnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5951: result: $ac_cv_lib_gen_getspnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6 if test $ac_cv_lib_gen_getspnam = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_GETSPNAM 1 -EOF +_ACEOF SUDO_LIBS="${SUDO_LIBS} -lgen"; LIBS="${LIBS} -lgen" fi @@ -5963,69 +6800,83 @@ done fi if test "$CHECKSHADOW" = "true"; then - echo "$as_me:5966: checking for getprpwnam" >&5 + echo "$as_me:$LINENO: checking for getprpwnam" >&5 echo $ECHO_N "checking for getprpwnam... $ECHO_C" >&6 if test "${ac_cv_func_getprpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5972 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getprpwnam (); below. */ -#include <assert.h> + which can conflict with char getprpwnam (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getprpwnam (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getprpwnam) || defined (__stub___getprpwnam) choke me #else -f = getprpwnam; +char (*f) () = getprpwnam; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != getprpwnam; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6003: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6006: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6009: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6012: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_getprpwnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_getprpwnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:6022: result: $ac_cv_func_getprpwnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_getprpwnam" >&5 echo "${ECHO_T}$ac_cv_func_getprpwnam" >&6 if test $ac_cv_func_getprpwnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETPRPWNAM 1 -EOF - CHECKSHADOW="false"; SECUREWARE=1, echo "$as_me:6028: checking for getprpwnam in -lsec" >&5 +_ACEOF + CHECKSHADOW="false"; SECUREWARE=1, echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5 echo $ECHO_N "checking for getprpwnam in -lsec... $ECHO_C" >&6 if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6033,8 +6884,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 6036 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -6052,35 +6907,36 @@ getprpwnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6055: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6058: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6061: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6064: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_sec_getprpwnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_sec_getprpwnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:6075: result: $ac_cv_lib_sec_getprpwnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5 echo "${ECHO_T}$ac_cv_lib_sec_getprpwnam" >&6 if test $ac_cv_lib_sec_getprpwnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETPRPWNAM 1 -EOF +_ACEOF CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec" else - echo "$as_me:6083: checking for getprpwnam in -lsecurity" >&5 + echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6088,8 +6944,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsecurity $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 6091 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -6107,35 +6967,36 @@ getprpwnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6110: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6113: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6116: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6119: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_security_getprpwnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_security_getprpwnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:6130: result: $ac_cv_lib_security_getprpwnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6 if test $ac_cv_lib_security_getprpwnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETPRPWNAM 1 -EOF +_ACEOF CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsecurity"; LIBS="${LIBS} -lsecurity" else - echo "$as_me:6138: checking for getprpwnam in -lprot" >&5 + echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6143,8 +7004,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lprot $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 6146 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -6162,32 +7027,33 @@ getprpwnam (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6165: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6168: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6171: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6174: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_prot_getprpwnam=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_prot_getprpwnam=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:6185: result: $ac_cv_lib_prot_getprpwnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6 if test $ac_cv_lib_prot_getprpwnam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GETPRPWNAM 1 -EOF +_ACEOF CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lprot"; LIBS="${LIBS} -lprot" fi @@ -6199,57 +7065,86 @@ fi fi + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + if test $ac_cv_c_compiler_gnu = yes; then - echo "$as_me:6203: checking whether $CC needs -traditional" >&5 + echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF -#line 6210 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sgtty.h> Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then + $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* + if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF -#line 6225 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <termio.h> Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then + $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi -echo "$as_me:6238: result: $ac_cv_prog_gcc_traditional" >&5 +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi -echo "$as_me:6245: checking for an ANSI C-conforming const" >&5 +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6251 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -6306,43 +7201,48 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6309: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6312: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6315: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6318: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6328: result: $ac_cv_c_const" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define const -EOF +_ACEOF fi -echo "$as_me:6338: checking for working volatile" >&5 +echo "$as_me:$LINENO: checking for working volatile" >&5 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6 if test "${ac_cv_c_volatile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6344 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -6355,32 +7255,33 @@ int * volatile y; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6358: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6361: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6364: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6367: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_volatile=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_c_volatile=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6377: result: $ac_cv_c_volatile" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 echo "${ECHO_T}$ac_cv_c_volatile" >&6 if test $ac_cv_c_volatile = no; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define volatile -EOF +_ACEOF fi @@ -6388,7 +7289,7 @@ for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:6391: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6396,25 +7297,28 @@ else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_YACC="$ac_prog" -echo "$as_me:6406: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then - echo "$as_me:6414: result: $YACC" >&5 + echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else - echo "$as_me:6417: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -6422,248 +7326,259 @@ fi done test -n "$YACC" || YACC="yacc" -echo "$as_me:6425: checking for mv" >&5 +echo "$as_me:$LINENO: checking for mv" >&5 echo $ECHO_N "checking for mv... $ECHO_C" >&6 if test -f "/usr/bin/mv"; then - echo "$as_me:6428: result: /usr/bin/mv" >&5 + echo "$as_me:$LINENO: result: /usr/bin/mv" >&5 echo "${ECHO_T}/usr/bin/mv" >&6 cat >>confdefs.h <<\EOF #define _PATH_MV "/usr/bin/mv" EOF elif test -f "/bin/mv"; then - echo "$as_me:6435: result: /bin/mv" >&5 + echo "$as_me:$LINENO: result: /bin/mv" >&5 echo "${ECHO_T}/bin/mv" >&6 cat >>confdefs.h <<\EOF #define _PATH_MV "/bin/mv" EOF elif test -f "/usr/ucb/mv"; then - echo "$as_me:6442: result: /usr/ucb/mv" >&5 + echo "$as_me:$LINENO: result: /usr/ucb/mv" >&5 echo "${ECHO_T}/usr/ucb/mv" >&6 cat >>confdefs.h <<\EOF #define _PATH_MV "/usr/ucb/mv" EOF elif test -f "/usr/sbin/mv"; then - echo "$as_me:6449: result: /usr/sbin/mv" >&5 + echo "$as_me:$LINENO: result: /usr/sbin/mv" >&5 echo "${ECHO_T}/usr/sbin/mv" >&6 cat >>confdefs.h <<\EOF #define _PATH_MV "/usr/sbin/mv" EOF else - echo "$as_me:6456: result: not found" >&5 + echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 fi -echo "$as_me:6460: checking for bourne shell" >&5 +echo "$as_me:$LINENO: checking for bourne shell" >&5 echo $ECHO_N "checking for bourne shell... $ECHO_C" >&6 if test -f "/bin/sh"; then - echo "$as_me:6463: result: /bin/sh" >&5 + echo "$as_me:$LINENO: result: /bin/sh" >&5 echo "${ECHO_T}/bin/sh" >&6 cat >>confdefs.h <<\EOF #define _PATH_BSHELL "/bin/sh" EOF elif test -f "/usr/bin/sh"; then - echo "$as_me:6470: result: /usr/bin/sh" >&5 + echo "$as_me:$LINENO: result: /usr/bin/sh" >&5 echo "${ECHO_T}/usr/bin/sh" >&6 cat >>confdefs.h <<\EOF #define _PATH_BSHELL "/usr/bin/sh" EOF elif test -f "/sbin/sh"; then - echo "$as_me:6477: result: /sbin/sh" >&5 + echo "$as_me:$LINENO: result: /sbin/sh" >&5 echo "${ECHO_T}/sbin/sh" >&6 cat >>confdefs.h <<\EOF #define _PATH_BSHELL "/sbin/sh" EOF elif test -f "/usr/sbin/sh"; then - echo "$as_me:6484: result: /usr/sbin/sh" >&5 + echo "$as_me:$LINENO: result: /usr/sbin/sh" >&5 echo "${ECHO_T}/usr/sbin/sh" >&6 cat >>confdefs.h <<\EOF #define _PATH_BSHELL "/usr/sbin/sh" EOF elif test -f "/bin/ksh"; then - echo "$as_me:6491: result: /bin/ksh" >&5 + echo "$as_me:$LINENO: result: /bin/ksh" >&5 echo "${ECHO_T}/bin/ksh" >&6 cat >>confdefs.h <<\EOF #define _PATH_BSHELL "/bin/ksh" EOF elif test -f "/usr/bin/ksh"; then - echo "$as_me:6498: result: /usr/bin/ksh" >&5 + echo "$as_me:$LINENO: result: /usr/bin/ksh" >&5 echo "${ECHO_T}/usr/bin/ksh" >&6 cat >>confdefs.h <<\EOF #define _PATH_BSHELL "/usr/bin/ksh" EOF elif test -f "/bin/bash"; then - echo "$as_me:6505: result: /bin/bash" >&5 + echo "$as_me:$LINENO: result: /bin/bash" >&5 echo "${ECHO_T}/bin/bash" >&6 cat >>confdefs.h <<\EOF #define _PATH_BSHELL "/bin/bash" EOF elif test -f "/usr/bin/bash"; then - echo "$as_me:6512: result: /usr/bin/bash" >&5 + echo "$as_me:$LINENO: result: /usr/bin/bash" >&5 echo "${ECHO_T}/usr/bin/bash" >&6 cat >>confdefs.h <<\EOF #define _PATH_BSHELL "/usr/bin/bash" EOF else - echo "$as_me:6519: result: not found" >&5 + echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 fi if test -z "$with_sendmail"; then - echo "$as_me:6524: checking for sendmail" >&5 + echo "$as_me:$LINENO: checking for sendmail" >&5 echo $ECHO_N "checking for sendmail... $ECHO_C" >&6 if test -f "/usr/sbin/sendmail"; then - echo "$as_me:6527: result: /usr/sbin/sendmail" >&5 + echo "$as_me:$LINENO: result: /usr/sbin/sendmail" >&5 echo "${ECHO_T}/usr/sbin/sendmail" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_SENDMAIL "/usr/sbin/sendmail" EOF elif test -f "/usr/lib/sendmail"; then - echo "$as_me:6534: result: /usr/lib/sendmail" >&5 + echo "$as_me:$LINENO: result: /usr/lib/sendmail" >&5 echo "${ECHO_T}/usr/lib/sendmail" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_SENDMAIL "/usr/lib/sendmail" EOF elif test -f "/usr/etc/sendmail"; then - echo "$as_me:6541: result: /usr/etc/sendmail" >&5 + echo "$as_me:$LINENO: result: /usr/etc/sendmail" >&5 echo "${ECHO_T}/usr/etc/sendmail" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_SENDMAIL "/usr/etc/sendmail" EOF elif test -f "/usr/ucblib/sendmail"; then - echo "$as_me:6548: result: /usr/ucblib/sendmail" >&5 + echo "$as_me:$LINENO: result: /usr/ucblib/sendmail" >&5 echo "${ECHO_T}/usr/ucblib/sendmail" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_SENDMAIL "/usr/ucblib/sendmail" EOF elif test -f "/usr/local/lib/sendmail"; then - echo "$as_me:6555: result: /usr/local/lib/sendmail" >&5 + echo "$as_me:$LINENO: result: /usr/local/lib/sendmail" >&5 echo "${ECHO_T}/usr/local/lib/sendmail" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_SENDMAIL "/usr/local/lib/sendmail" EOF elif test -f "/usr/local/bin/sendmail"; then - echo "$as_me:6562: result: /usr/local/bin/sendmail" >&5 + echo "$as_me:$LINENO: result: /usr/local/bin/sendmail" >&5 echo "${ECHO_T}/usr/local/bin/sendmail" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_SENDMAIL "/usr/local/bin/sendmail" EOF else - echo "$as_me:6569: result: not found" >&5 + echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 fi fi if test -z "$with_editor"; then - echo "$as_me:6575: checking for vi" >&5 + echo "$as_me:$LINENO: checking for vi" >&5 echo $ECHO_N "checking for vi... $ECHO_C" >&6 if test -f "/usr/bin/vi"; then - echo "$as_me:6578: result: /usr/bin/vi" >&5 + echo "$as_me:$LINENO: result: /usr/bin/vi" >&5 echo "${ECHO_T}/usr/bin/vi" >&6 cat >>confdefs.h <<\EOF #define _PATH_VI "/usr/bin/vi" EOF elif test -f "/usr/ucb/vi"; then - echo "$as_me:6585: result: /usr/ucb/vi" >&5 + echo "$as_me:$LINENO: result: /usr/ucb/vi" >&5 echo "${ECHO_T}/usr/ucb/vi" >&6 cat >>confdefs.h <<\EOF #define _PATH_VI "/usr/ucb/vi" EOF elif test -f "/usr/bsd/vi"; then - echo "$as_me:6592: result: /usr/bsd/vi" >&5 + echo "$as_me:$LINENO: result: /usr/bsd/vi" >&5 echo "${ECHO_T}/usr/bsd/vi" >&6 cat >>confdefs.h <<\EOF #define _PATH_VI "/usr/bsd/vi" EOF elif test -f "/bin/vi"; then - echo "$as_me:6599: result: /bin/vi" >&5 + echo "$as_me:$LINENO: result: /bin/vi" >&5 echo "${ECHO_T}/bin/vi" >&6 cat >>confdefs.h <<\EOF #define _PATH_VI "/bin/vi" EOF elif test -f "/usr/local/bin/vi"; then - echo "$as_me:6606: result: /usr/local/bin/vi" >&5 + echo "$as_me:$LINENO: result: /usr/local/bin/vi" >&5 echo "${ECHO_T}/usr/local/bin/vi" >&6 cat >>confdefs.h <<\EOF #define _PATH_VI "/usr/local/bin/vi" EOF else - echo "$as_me:6613: result: not found" >&5 + echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 fi fi -echo "$as_me:6618: checking for ANSI C header files" >&5 +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6624 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <float.h> +int +main () +{ + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:6632: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:6638: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_header_stdc=no +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line 6660 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <string.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then + $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no @@ -6675,13 +7590,17 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line 6678 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then + $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no @@ -6696,14 +7615,19 @@ if test $ac_cv_header_stdc = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line 6699 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <ctype.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) @@ -6722,48 +7646,59 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:6725: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6728: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:6730: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6733: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -echo "$as_me:6746: result: $ac_cv_header_stdc" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 -EOF +_ACEOF fi + + + + + ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -echo "$as_me:6759: checking for $ac_hdr that defines DIR" >&5 +echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6765 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <$ac_hdr> @@ -6777,31 +7712,32 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:6780: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:6783: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:6786: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6789: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:6799: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -EOF +_ACEOF ac_header_dirent=$ac_hdr; break fi @@ -6809,16 +7745,20 @@ fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then - echo "$as_me:6812: checking for opendir in -ldir" >&5 -echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 -if test "${ac_cv_lib_dir_opendir+set}" = set; then + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldir $LIBS" + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF -#line 6820 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -6836,43 +7776,96 @@ opendir (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6839: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6842: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6845: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6848: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_dir_opendir=yes + ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_dir_opendir=no +sed 's/^/| /' conftest.$ac_ext >&5 + fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +if test "$ac_cv_search_opendir" = no; then + for ac_lib in dir; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:6859: result: $ac_cv_lib_dir_opendir" >&5 -echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6 -if test $ac_cv_lib_dir_opendir = yes; then - LIBS="$LIBS -ldir" +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" + fi else - echo "$as_me:6866: checking for opendir in -lx" >&5 -echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6 -if test "${ac_cv_lib_x_opendir+set}" = set; then + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lx $LIBS" + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF -#line 6874 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -6890,54 +7883,220 @@ opendir (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6893: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6896: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6899: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:6902: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_x_opendir=yes + ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_x_opendir=no +sed 's/^/| /' conftest.$ac_ext >&5 + fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +if test "$ac_cv_search_opendir" = no; then + for ac_lib in x; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -echo "$as_me:6913: result: $ac_cv_lib_x_opendir" >&5 -echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6 -if test $ac_cv_lib_x_opendir = yes; then - LIBS="$LIBS -lx" +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi -for ac_header in malloc.h paths.h utime.h netgroup.h sys/sockio.h sys/bsdtypes.h sys/select.h +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:6924: checking for $ac_header" >&5 +echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6930 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + +for ac_header in malloc.h paths.h utime.h netgroup.h sys/sockio.h sys/bsdtypes.h sys/select.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:6934: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:6940: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -6948,36 +8107,87 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -echo "$as_me:6959: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -EOF +_ACEOF fi + done if test "$OS" != "ultrix"; then - echo "$as_me:6970: checking POSIX termios" >&5 + echo "$as_me:$LINENO: checking POSIX termios" >&5 echo $ECHO_N "checking POSIX termios... $ECHO_C" >&6 if test "${ac_cv_sys_posix_termios+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 6976 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <unistd.h> #include <termios.h> + int main () { @@ -6988,56 +8198,104 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:6991: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:6994: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6997: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7000: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_posix_termios=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_sys_posix_termios=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:7010: result: $ac_cv_sys_posix_termios" >&5 +echo "$as_me:$LINENO: result: $ac_cv_sys_posix_termios" >&5 echo "${ECHO_T}$ac_cv_sys_posix_termios" >&6 if test "$ac_cv_sys_posix_termios" = "yes"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_TERMIOS_H 1 -EOF +_ACEOF else for ac_header in termio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:7024: checking for $ac_header" >&5 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 7030 "configure" -#include "confdefs.h" + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:7034: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:7040: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -7048,22 +8306,68 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -echo "$as_me:7059: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -EOF +_ACEOF fi + done fi @@ -7073,23 +8377,70 @@ if test "$with_logincap" = "yes"; then for ac_header in login_cap.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:7076: checking for $ac_header" >&5 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 7082 "configure" -#include "confdefs.h" + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:7086: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:7092: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -7100,43 +8451,136 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -echo "$as_me:7111: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -EOF +_ACEOF fi + done fi if test "$with_bsdauth" = "yes"; then - echo "$as_me:7123: checking for bsd_auth.h" >&5 + if test "${ac_cv_header_bsd_auth_h+set}" = set; then + echo "$as_me:$LINENO: checking for bsd_auth.h" >&5 echo $ECHO_N "checking for bsd_auth.h... $ECHO_C" >&6 if test "${ac_cv_header_bsd_auth_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_bsd_auth_h" >&5 +echo "${ECHO_T}$ac_cv_header_bsd_auth_h" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 7129 "configure" -#include "confdefs.h" + # Is the header compilable? +echo "$as_me:$LINENO: checking bsd_auth.h usability" >&5 +echo $ECHO_N "checking bsd_auth.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default #include <bsd_auth.h> _ACEOF -if { (eval echo "$as_me:7133: \"$ac_cpp conftest.$ac_ext\"") >&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking bsd_auth.h presence" >&5 +echo $ECHO_N "checking bsd_auth.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <bsd_auth.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:7139: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -7147,80 +8591,85 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_cv_header_bsd_auth_h=yes + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_header_bsd_auth_h=no +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: bsd_auth.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: bsd_auth.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: bsd_auth.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: bsd_auth.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: bsd_auth.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: bsd_auth.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: bsd_auth.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: bsd_auth.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: bsd_auth.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: bsd_auth.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for bsd_auth.h" >&5 +echo $ECHO_N "checking for bsd_auth.h... $ECHO_C" >&6 +if test "${ac_cv_header_bsd_auth_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_bsd_auth_h=$ac_header_preproc fi -echo "$as_me:7158: result: $ac_cv_header_bsd_auth_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_bsd_auth_h" >&5 echo "${ECHO_T}$ac_cv_header_bsd_auth_h" >&6 -if test $ac_cv_header_bsd_auth_h = yes; then - -cat >>confdefs.h <<\EOF -#define HAVE_BSD_AUTH_H 1 -EOF - with_passwd=no; AUTH_OBJS=bsdauth.o -fi fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. +if test $ac_cv_header_bsd_auth_h = yes; then -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:7175: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 7181 "configure" -#include "confdefs.h" -$ac_includes_default -#include <$ac_header> +cat >>confdefs.h <<\_ACEOF +#define HAVE_BSD_AUTH_H 1 _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:7187: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:7190: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7193: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:7196: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + with_passwd=no; AUTH_OBJS=bsdauth.o else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -eval "$as_ac_Header=no" -fi -rm -f conftest.$ac_objext conftest.$ac_ext + - fi -echo "$as_me:7206: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<EOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -EOF -fi -done -echo "$as_me:7216: checking for mode_t" >&5 +fi +echo "$as_me:$LINENO: checking for mode_t" >&5 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7222 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default int main () @@ -7234,50 +8683,55 @@ if (sizeof (mode_t)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7237: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7240: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7243: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7246: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_mode_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7256: result: $ac_cv_type_mode_t" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : else -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define mode_t int -EOF +_ACEOF fi -echo "$as_me:7268: checking for uid_t in sys/types.h" >&5 +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7274 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then + $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no @@ -7285,28 +8739,33 @@ fi rm -f conftest* fi -echo "$as_me:7288: result: $ac_cv_type_uid_t" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define uid_t int -EOF +_ACEOF + -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define gid_t int -EOF +_ACEOF fi -echo "$as_me:7302: checking for sig_atomic_t" >&5 +echo "$as_me:$LINENO: checking for sig_atomic_t" >&5 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6 if test "${ac_cv_type_sig_atomic_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7308 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> @@ -7322,49 +8781,55 @@ if (sizeof (sig_atomic_t)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7325: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7328: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7331: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7334: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_sig_atomic_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_sig_atomic_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7344: result: $ac_cv_type_sig_atomic_t" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6 if test $ac_cv_type_sig_atomic_t = yes; then -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define HAVE_SIG_ATOMIC_T 1 -EOF +_ACEOF + else -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define sig_atomic_t int -EOF +_ACEOF fi -echo "$as_me:7360: checking for sigaction_t" >&5 +echo "$as_me:$LINENO: checking for sigaction_t" >&5 echo $ECHO_N "checking for sigaction_t... $ECHO_C" >&6 if test "${ac_cv_type_sigaction_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7366 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> @@ -7380,47 +8845,53 @@ if (sizeof (sigaction_t)) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7383: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7386: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7389: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7392: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_sigaction_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_sigaction_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7402: result: $ac_cv_type_sigaction_t" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_sigaction_t" >&5 echo "${ECHO_T}$ac_cv_type_sigaction_t" >&6 if test $ac_cv_type_sigaction_t = yes; then -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define HAVE_SIGACTION_T 1 -EOF +_ACEOF -cat >>confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_SIGACTION_T 1 -EOF +_ACEOF fi -echo "$as_me:7416: checking for size_t" >&5 +echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${sudo_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7422 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <stdio.h> #if STDC_HEADERS @@ -7431,7 +8902,7 @@ else #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t" >/dev/null 2>&1; then + $EGREP "size_t" >/dev/null 2>&1; then sudo_cv_type_size_t=yes else sudo_cv_type_size_t=no @@ -7439,24 +8910,28 @@ fi rm -f conftest* fi -echo "$as_me:7442: result: $sudo_cv_type_size_t" >&5 +echo "$as_me:$LINENO: result: $sudo_cv_type_size_t" >&5 echo "${ECHO_T}$sudo_cv_type_size_t" >&6 if test $sudo_cv_type_size_t = no; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define size_t int -EOF +_ACEOF fi -echo "$as_me:7452: checking for ssize_t" >&5 +echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 if test "${sudo_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7458 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <stdio.h> #if STDC_HEADERS @@ -7467,7 +8942,7 @@ else #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "ssize_t" >/dev/null 2>&1; then + $EGREP "ssize_t" >/dev/null 2>&1; then sudo_cv_type_ssize_t=yes else sudo_cv_type_ssize_t=no @@ -7475,24 +8950,28 @@ fi rm -f conftest* fi -echo "$as_me:7478: result: $sudo_cv_type_ssize_t" >&5 +echo "$as_me:$LINENO: result: $sudo_cv_type_ssize_t" >&5 echo "${ECHO_T}$sudo_cv_type_ssize_t" >&6 if test $sudo_cv_type_ssize_t = no; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define ssize_t int -EOF +_ACEOF fi -echo "$as_me:7488: checking for dev_t" >&5 +echo "$as_me:$LINENO: checking for dev_t" >&5 echo $ECHO_N "checking for dev_t... $ECHO_C" >&6 if test "${sudo_cv_type_dev_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7494 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <stdio.h> #if STDC_HEADERS @@ -7503,7 +8982,7 @@ else #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "dev_t" >/dev/null 2>&1; then + $EGREP "dev_t" >/dev/null 2>&1; then sudo_cv_type_dev_t=yes else sudo_cv_type_dev_t=no @@ -7511,24 +8990,28 @@ fi rm -f conftest* fi -echo "$as_me:7514: result: $sudo_cv_type_dev_t" >&5 +echo "$as_me:$LINENO: result: $sudo_cv_type_dev_t" >&5 echo "${ECHO_T}$sudo_cv_type_dev_t" >&6 if test $sudo_cv_type_dev_t = no; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define dev_t int -EOF +_ACEOF fi -echo "$as_me:7524: checking for ino_t" >&5 +echo "$as_me:$LINENO: checking for ino_t" >&5 echo $ECHO_N "checking for ino_t... $ECHO_C" >&6 if test "${sudo_cv_type_ino_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7530 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <stdio.h> #if STDC_HEADERS @@ -7539,7 +9022,7 @@ else #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "ino_t" >/dev/null 2>&1; then + $EGREP "ino_t" >/dev/null 2>&1; then sudo_cv_type_ino_t=yes else sudo_cv_type_ino_t=no @@ -7547,21 +9030,25 @@ fi rm -f conftest* fi -echo "$as_me:7550: result: $sudo_cv_type_ino_t" >&5 +echo "$as_me:$LINENO: result: $sudo_cv_type_ino_t" >&5 echo "${ECHO_T}$sudo_cv_type_ino_t" >&6 if test $sudo_cv_type_ino_t = no; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define ino_t unsigned int -EOF +_ACEOF fi -echo "$as_me:7560: checking for full void implementation" >&5 +echo "$as_me:$LINENO: checking for full void implementation" >&5 echo $ECHO_N "checking for full void implementation... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 7563 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -7573,50 +9060,57 @@ foo = (void *)0; (void *)"test"; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7576: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7579: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7582: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7585: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define VOID void -EOF +_ACEOF -echo "$as_me:7592: result: yes" >&5 +echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -cat >>confdefs.h <<\EOF +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >>confdefs.h <<\_ACEOF #define VOID char -EOF +_ACEOF -echo "$as_me:7601: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:7606: checking max length of uid_t" >&5 +echo "$as_me:$LINENO: checking max length of uid_t" >&5 echo $ECHO_N "checking max length of uid_t... $ECHO_C" >&6 if test "${sudo_cv_uid_t_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftestdata if test "$cross_compiling" = yes; then - { { echo "$as_me:7613: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 7618 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> #include <pwd.h> #include <limits.h> @@ -7630,48 +9124,55 @@ main() { if ((f = fopen("conftestdata", "w")) == NULL) exit(1); - (void) sprintf(b, "%u", u); + (void) sprintf(b, "%lu", (unsigned long) u); (void) fprintf(f, "%d\n", strlen(b)); (void) fclose(f); exit(0); } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:7640: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7643: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:7645: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7648: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then sudo_cv_uid_t_len=`cat conftestdata` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) sudo_cv_uid_t_len=10 fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftestdata -echo "$as_me:7663: result: $sudo_cv_uid_t_len" >&5 +echo "$as_me:$LINENO: result: $sudo_cv_uid_t_len" >&5 echo "${ECHO_T}$sudo_cv_uid_t_len" >&6 -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define MAX_UID_T_LEN $sudo_cv_uid_t_len -EOF +_ACEOF -echo "$as_me:7670: checking for long long support" >&5 + +echo "$as_me:$LINENO: checking for long long support" >&5 echo $ECHO_N "checking for long long support... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 7673 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -7682,65 +9183,73 @@ long long foo = 1000; foo /= 10; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7685: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7688: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7691: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7694: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG 1 -EOF +_ACEOF if test "$cross_compiling" = yes; then - { { echo "$as_me:7702: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 7707 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);} _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:7712: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7715: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:7717: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7720: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define LONG_IS_QUAD 1 -EOF +_ACEOF else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7734: result: yes" >&5 +echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -echo "$as_me:7739: result: no" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -echo "$as_me:7743: checking for sa_len field in struct sockaddr" >&5 +echo "$as_me:$LINENO: checking for sa_len field in struct sockaddr" >&5 echo $ECHO_N "checking for sa_len field in struct sockaddr... $ECHO_C" >&6 if test "${sudo_cv_sock_sa_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7749,8 +9258,12 @@ else sudo_cv_sock_sa_len=no else cat >conftest.$ac_ext <<_ACEOF -#line 7752 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/socket.h> main() { @@ -7760,47 +9273,53 @@ exit(0); } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:7763: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7766: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:7768: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7771: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then sudo_cv_sock_sa_len=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) sudo_cv_sock_sa_len=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f core core.* *.core fi -echo "$as_me:7784: result: $sudo_cv_sock_sa_len" >&5 +echo "$as_me:$LINENO: result: $sudo_cv_sock_sa_len" >&5 echo "${ECHO_T}$sudo_cv_sock_sa_len" >&6 if test $sudo_cv_sock_sa_len = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_SA_LEN 1 -EOF +_ACEOF fi case "$DEFS" in *"RETSIGTYPE"*) ;; - *) echo "$as_me:7796: checking return type of signal handlers" >&5 + *) echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7802 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> #ifdef signal @@ -7821,172 +9340,297 @@ int i; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:7824: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:7827: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:7830: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7833: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_signal=int fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:7843: result: $ac_cv_type_signal" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal -EOF +_ACEOF ;; esac + + + + + + + + + + for ac_func in strchr strrchr memchr memcpy memset sysconf tzset \ - seteuid setegid strftime setrlimit initgroups fstat + strftime setrlimit initgroups fstat do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:7857: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7863 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7894: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7897: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7900: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7903: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:7913: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF fi done -if test -z "$BROKEN_SETREUID"; then +if test -z "$SKIP_SETRESUID"; then -for ac_func in setreuid +for ac_func in setresuid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:7928: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7934 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif int main () { +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + SKIP_SETREUID=yes +fi +done + +fi +if test -z "$SKIP_SETREUID"; then + +for ac_func in setreuid +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7965: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7968: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7971: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7974: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:7984: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF fi done @@ -7997,135 +9641,162 @@ if test X"$with_interfaces" != X"no"; then for ac_func in getifaddrs do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8000: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8006 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8037: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8040: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8043: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8046: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8056: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF for ac_func in freeifaddrs do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8066: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8072 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes -else - which can conflict with char $ac_func (); below. */ -#include <assert.h> +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8104: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8107: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8110: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8113: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8123: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF fi done @@ -8136,71 +9807,87 @@ done fi if test -n "$SECUREWARE"; then + + for ac_func in bigcrypt set_auth_parameters initprivs do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8142: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8148 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8179: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8182: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8185: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8188: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8198: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF fi done @@ -8211,346 +9898,421 @@ if test -z "$BROKEN_GETCWD"; then for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8214: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8220 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8251: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8254: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8257: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8260: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8270: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF else LIBOBJS="$LIBOBJS $ac_func.$ac_objext" fi done + fi + for ac_func in lockf flock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8287: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8293 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8324: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8327: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8330: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8333: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8343: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF break fi done + + for ac_func in waitpid wait3 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8356: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8362 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8393: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8396: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8399: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8402: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8412: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF break fi done + + for ac_func in innetgr _innetgr do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8425: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8431 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8462: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8465: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8468: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8471: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8481: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF for ac_func in getdomainname do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8491: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8497 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes -else - which can conflict with char $ac_func (); below. */ -#include <assert.h> +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8529: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8532: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8535: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8538: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8548: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF fi done @@ -8558,74 +10320,89 @@ done fi done + for ac_func in lsearch do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8564: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8570 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8601: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8604: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8607: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8610: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8620: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF else - echo "$as_me:8628: checking for lsearch in -lcompat" >&5 + echo "$as_me:$LINENO: checking for lsearch in -lcompat" >&5 echo $ECHO_N "checking for lsearch in -lcompat... $ECHO_C" >&6 if test "${ac_cv_lib_compat_lsearch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8633,8 +10410,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lcompat $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 8636 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -8652,46 +10433,51 @@ lsearch (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8655: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8658: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8661: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8664: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_compat_lsearch=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_compat_lsearch=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:8675: result: $ac_cv_lib_compat_lsearch" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_compat_lsearch" >&5 echo "${ECHO_T}$ac_cv_lib_compat_lsearch" >&6 if test $ac_cv_lib_compat_lsearch = yes; then - echo "$as_me:8678: checking for search.h" >&5 + echo "$as_me:$LINENO: checking for search.h" >&5 echo $ECHO_N "checking for search.h... $ECHO_C" >&6 if test "${ac_cv_header_search_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8684 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <search.h> _ACEOF -if { (eval echo "$as_me:8688: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:8694: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -8705,22 +10491,24 @@ if test -z "$ac_cpp_err"; then ac_cv_header_search_h=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_search_h=no fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:8713: result: $ac_cv_header_search_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_search_h" >&5 echo "${ECHO_T}$ac_cv_header_search_h" >&6 if test $ac_cv_header_search_h = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LSEARCH 1 -EOF +_ACEOF LIBS="${LIBS} -lcompat" else LIBOBJS="$LIBOBJS lsearch.$ac_objext" fi + else LIBOBJS="$LIBOBJS lsearch.$ac_objext" fi @@ -8728,72 +10516,87 @@ fi fi done + for ac_func in utime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8734: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8740 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8771: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8774: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8777: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8780: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8790: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF - echo "$as_me:8796: checking for POSIX utime" >&5 +_ACEOF + echo "$as_me:$LINENO: checking for POSIX utime" >&5 echo $ECHO_N "checking for POSIX utime... $ECHO_C" >&6 if test "${sudo_cv_func_utime_posix+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8803,8 +10606,12 @@ if test "$cross_compiling" = yes; then sudo_cv_func_utime_posix=no else cat >conftest.$ac_ext <<_ACEOF -#line 8806 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/time.h> #include <utime.h> @@ -8816,34 +10623,36 @@ exit(0); } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:8819: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8822: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:8824: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8827: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then sudo_cv_func_utime_posix=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) sudo_cv_func_utime_posix=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f core core.* *.core fi -echo "$as_me:8840: result: $sudo_cv_func_utime_posix" >&5 +echo "$as_me:$LINENO: result: $sudo_cv_func_utime_posix" >&5 echo "${ECHO_T}$sudo_cv_func_utime_posix" >&6 if test $sudo_cv_func_utime_posix = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_UTIME_POSIX 1 -EOF +_ACEOF fi @@ -8852,7 +10661,7 @@ else fi done -echo "$as_me:8855: checking for working fnmatch with FNM_CASEFOLD" >&5 +echo "$as_me:$LINENO: checking for working fnmatch with FNM_CASEFOLD" >&5 echo $ECHO_N "checking for working fnmatch with FNM_CASEFOLD... $ECHO_C" >&6 if test "${sudo_cv_func_fnmatch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8862,54 +10671,64 @@ if test "$cross_compiling" = yes; then sudo_cv_func_fnmatch=no else cat >conftest.$ac_ext <<_ACEOF -#line 8865 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <fnmatch.h> main() { exit(fnmatch("/*/bin/echo *", "/usr/bin/echo just a test", FNM_CASEFOLD)); } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:8872: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8875: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:8877: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8880: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then sudo_cv_func_fnmatch=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) sudo_cv_func_fnmatch=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f core core.* *.core fi -echo "$as_me:8893: result: $sudo_cv_func_fnmatch" >&5 +echo "$as_me:$LINENO: result: $sudo_cv_func_fnmatch" >&5 echo "${ECHO_T}$sudo_cv_func_fnmatch" >&6 if test $sudo_cv_func_fnmatch = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_FNMATCH 1 -EOF +_ACEOF else LIBOBJS="$LIBOBJS fnmatch.$ac_objext" fi -echo "$as_me:8905: checking for isblank" >&5 +echo "$as_me:$LINENO: checking for isblank" >&5 echo $ECHO_N "checking for isblank... $ECHO_C" >&6 if test "${sudo_cv_func_isblank+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8911 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <ctype.h> int main () @@ -8920,172 +10739,211 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8923: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8926: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8929: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:8932: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then sudo_cv_func_isblank=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + sudo_cv_func_isblank=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:8942: result: $sudo_cv_func_isblank" >&5 +echo "$as_me:$LINENO: result: $sudo_cv_func_isblank" >&5 echo "${ECHO_T}$sudo_cv_func_isblank" >&6 if test "$sudo_cv_func_isblank" = "yes"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_ISBLANK 1 -EOF +_ACEOF fi -for ac_func in strerror strcasecmp sigaction + + + + + +for ac_func in strerror strcasecmp sigaction strlcpy strlcat do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:8956: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 8962 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:8993: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:8996: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:8999: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9002: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:9012: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF else LIBOBJS="$LIBOBJS $ac_func.$ac_objext" fi done + + + + + for ac_func in snprintf vsnprintf asprintf vasprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:9027: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 9033 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9064: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9067: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9070: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9073: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:9083: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF else NEED_SNPRINTF=1 @@ -9096,68 +10954,82 @@ if test -n "$NEED_SNPRINTF"; then LIBOBJS="$LIBOBJS snprintf.$ac_objext" fi if test -z "$LIB_CRYPT"; then - echo "$as_me:9099: checking for crypt" >&5 + echo "$as_me:$LINENO: checking for crypt" >&5 echo $ECHO_N "checking for crypt... $ECHO_C" >&6 if test "${ac_cv_func_crypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 9105 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char crypt (); below. */ -#include <assert.h> + which can conflict with char crypt (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crypt (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_crypt) || defined (__stub___crypt) choke me #else -f = crypt; +char (*f) () = crypt; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != crypt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9136: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9139: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9142: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9145: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_crypt=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_crypt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:9155: result: $ac_cv_func_crypt" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5 echo "${ECHO_T}$ac_cv_func_crypt" >&6 if test $ac_cv_func_crypt = yes; then : else - echo "$as_me:9160: checking for crypt in -lcrypt" >&5 + echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 if test "${ac_cv_lib_crypt_crypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9165,8 +11037,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9168 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9184,32 +11060,33 @@ crypt (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9187: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9190: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9193: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9196: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_crypt_crypt=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_crypt_crypt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9207: result: $ac_cv_lib_crypt_crypt" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 if test $ac_cv_lib_crypt_crypt = yes; then SUDO_LIBS="${SUDO_LIBS} -lcrypt"; LIBS="${LIBS} -lcrypt" else - echo "$as_me:9212: checking for crypt in -lcrypt_d" >&5 + echo "$as_me:$LINENO: checking for crypt in -lcrypt_d" >&5 echo $ECHO_N "checking for crypt in -lcrypt_d... $ECHO_C" >&6 if test "${ac_cv_lib_crypt_d_crypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9217,8 +11094,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt_d $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9220 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9236,32 +11117,33 @@ crypt (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9239: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9242: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9245: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9248: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_crypt_d_crypt=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_crypt_d_crypt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9259: result: $ac_cv_lib_crypt_d_crypt" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_d_crypt" >&5 echo "${ECHO_T}$ac_cv_lib_crypt_d_crypt" >&6 if test $ac_cv_lib_crypt_d_crypt = yes; then SUDO_LIBS="${SUDO_LIBS} -lcrypt_d"; LIBS="${LIBS} -lcrypt_d" else - echo "$as_me:9264: checking for crypt in -lufc" >&5 + echo "$as_me:$LINENO: checking for crypt in -lufc" >&5 echo $ECHO_N "checking for crypt in -lufc... $ECHO_C" >&6 if test "${ac_cv_lib_ufc_crypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9269,8 +11151,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lufc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9272 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9288,27 +11174,28 @@ crypt (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9291: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9294: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9297: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9300: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ufc_crypt=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_ufc_crypt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9311: result: $ac_cv_lib_ufc_crypt" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_ufc_crypt" >&5 echo "${ECHO_T}$ac_cv_lib_ufc_crypt" >&6 if test $ac_cv_lib_ufc_crypt = yes; then SUDO_LIBS="${SUDO_LIBS} -lufc"; LIBS="${LIBS} -lufc" @@ -9321,68 +11208,82 @@ fi fi fi -echo "$as_me:9324: checking for socket" >&5 +echo "$as_me:$LINENO: checking for socket" >&5 echo $ECHO_N "checking for socket... $ECHO_C" >&6 if test "${ac_cv_func_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 9330 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char socket (); below. */ -#include <assert.h> + which can conflict with char socket (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_socket) || defined (__stub___socket) choke me #else -f = socket; +char (*f) () = socket; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != socket; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9361: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9364: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9367: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9370: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_socket=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_socket=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:9380: result: $ac_cv_func_socket" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5 echo "${ECHO_T}$ac_cv_func_socket" >&6 if test $ac_cv_func_socket = yes; then : else - echo "$as_me:9385: checking for socket in -lsocket" >&5 + echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9390,8 +11291,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9393 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9409,32 +11314,33 @@ socket (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9412: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9415: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9418: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9421: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_socket_socket=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9432: result: $ac_cv_lib_socket_socket" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 if test $ac_cv_lib_socket_socket = yes; then NET_LIBS="${NET_LIBS} -lsocket"; LIBS="${LIBS} -lsocket" else - echo "$as_me:9437: checking for socket in -linet" >&5 + echo "$as_me:$LINENO: checking for socket in -linet" >&5 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9442,8 +11348,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9445 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9461,34 +11371,35 @@ socket (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9464: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9467: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9470: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9473: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet_socket=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_inet_socket=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9484: result: $ac_cv_lib_inet_socket" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6 if test $ac_cv_lib_inet_socket = yes; then NET_LIBS="${NET_LIBS} -linet"; LIBS="${LIBS} -linet" else - { echo "$as_me:9489: WARNING: unable to find socket() trying -lsocket -lnsl" >&5 + { echo "$as_me:$LINENO: WARNING: unable to find socket() trying -lsocket -lnsl" >&5 echo "$as_me: WARNING: unable to find socket() trying -lsocket -lnsl" >&2;} -echo "$as_me:9491: checking for socket in -lsocket" >&5 +echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_socket_lnsl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9496,8 +11407,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9499 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9515,27 +11430,28 @@ socket (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9518: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9521: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9524: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9527: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_socket_lnsl=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_socket_socket_lnsl=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9538: result: $ac_cv_lib_socket_socket_lnsl" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket_lnsl" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket_lnsl" >&6 if test $ac_cv_lib_socket_socket_lnsl = yes; then NET_LIBS="${NET_LIBS} -lsocket -lnsl"; LIBS="${LIBS} -lsocket -lnsl" @@ -9547,129 +11463,157 @@ fi fi -echo "$as_me:9550: checking for inet_addr" >&5 +echo "$as_me:$LINENO: checking for inet_addr" >&5 echo $ECHO_N "checking for inet_addr... $ECHO_C" >&6 if test "${ac_cv_func_inet_addr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 9556 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char inet_addr (); below. */ -#include <assert.h> + which can conflict with char inet_addr (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_addr (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_inet_addr) || defined (__stub___inet_addr) choke me #else -f = inet_addr; +char (*f) () = inet_addr; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != inet_addr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9587: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9590: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9593: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9596: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_inet_addr=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_inet_addr=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:9606: result: $ac_cv_func_inet_addr" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_inet_addr" >&5 echo "${ECHO_T}$ac_cv_func_inet_addr" >&6 if test $ac_cv_func_inet_addr = yes; then : else - echo "$as_me:9611: checking for __inet_addr" >&5 + echo "$as_me:$LINENO: checking for __inet_addr" >&5 echo $ECHO_N "checking for __inet_addr... $ECHO_C" >&6 if test "${ac_cv_func___inet_addr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 9617 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char __inet_addr (); below. */ -#include <assert.h> + which can conflict with char __inet_addr (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char __inet_addr (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub___inet_addr) || defined (__stub_____inet_addr) choke me #else -f = __inet_addr; +char (*f) () = __inet_addr; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != __inet_addr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9648: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9651: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9654: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9657: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func___inet_addr=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func___inet_addr=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:9667: result: $ac_cv_func___inet_addr" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func___inet_addr" >&5 echo "${ECHO_T}$ac_cv_func___inet_addr" >&6 if test $ac_cv_func___inet_addr = yes; then : else - echo "$as_me:9672: checking for inet_addr in -lnsl" >&5 + echo "$as_me:$LINENO: checking for inet_addr in -lnsl" >&5 echo $ECHO_N "checking for inet_addr in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_inet_addr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9677,8 +11621,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9680 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9696,32 +11644,33 @@ inet_addr (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9699: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9702: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9705: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9708: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_inet_addr=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_nsl_inet_addr=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9719: result: $ac_cv_lib_nsl_inet_addr" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_addr" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_inet_addr" >&6 if test $ac_cv_lib_nsl_inet_addr = yes; then NET_LIBS="${NET_LIBS} -lnsl"; LIBS="${LIBS} -lnsl" else - echo "$as_me:9724: checking for inet_addr in -linet" >&5 + echo "$as_me:$LINENO: checking for inet_addr in -linet" >&5 echo $ECHO_N "checking for inet_addr in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_inet_addr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9729,8 +11678,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9732 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9748,34 +11701,35 @@ inet_addr (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9751: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9754: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9757: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9760: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet_inet_addr=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_inet_inet_addr=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9771: result: $ac_cv_lib_inet_inet_addr" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_inet_addr" >&5 echo "${ECHO_T}$ac_cv_lib_inet_inet_addr" >&6 if test $ac_cv_lib_inet_inet_addr = yes; then NET_LIBS="${NET_LIBS} -linet"; LIBS="${LIBS} -linet" else - { echo "$as_me:9776: WARNING: unable to find inet_addr() trying -lsocket -lnsl" >&5 + { echo "$as_me:$LINENO: WARNING: unable to find inet_addr() trying -lsocket -lnsl" >&5 echo "$as_me: WARNING: unable to find inet_addr() trying -lsocket -lnsl" >&2;} -echo "$as_me:9778: checking for inet_addr in -lsocket" >&5 +echo "$as_me:$LINENO: checking for inet_addr in -lsocket" >&5 echo $ECHO_N "checking for inet_addr in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_inet_addr_lnsl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9783,8 +11737,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9786 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9802,27 +11760,28 @@ inet_addr (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9805: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9808: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9811: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9814: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_inet_addr_lnsl=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_socket_inet_addr_lnsl=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9825: result: $ac_cv_lib_socket_inet_addr_lnsl" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_inet_addr_lnsl" >&5 echo "${ECHO_T}$ac_cv_lib_socket_inet_addr_lnsl" >&6 if test $ac_cv_lib_socket_inet_addr_lnsl = yes; then NET_LIBS="${NET_LIBS} -lsocket -lnsl"; LIBS="${LIBS} -lsocket -lnsl" @@ -9836,68 +11795,82 @@ fi fi -echo "$as_me:9839: checking for syslog" >&5 +echo "$as_me:$LINENO: checking for syslog" >&5 echo $ECHO_N "checking for syslog... $ECHO_C" >&6 if test "${ac_cv_func_syslog+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 9845 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char syslog (); below. */ -#include <assert.h> + which can conflict with char syslog (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char syslog (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_syslog) || defined (__stub___syslog) choke me #else -f = syslog; +char (*f) () = syslog; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != syslog; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9876: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9879: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9882: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9885: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_syslog=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_syslog=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:9895: result: $ac_cv_func_syslog" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5 echo "${ECHO_T}$ac_cv_func_syslog" >&6 if test $ac_cv_func_syslog = yes; then : else - echo "$as_me:9900: checking for syslog in -lsocket" >&5 + echo "$as_me:$LINENO: checking for syslog in -lsocket" >&5 echo $ECHO_N "checking for syslog in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_syslog+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9905,8 +11878,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9908 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9924,32 +11901,33 @@ syslog (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9927: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9930: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9933: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9936: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_syslog=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_socket_syslog=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9947: result: $ac_cv_lib_socket_syslog" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_syslog" >&5 echo "${ECHO_T}$ac_cv_lib_socket_syslog" >&6 if test $ac_cv_lib_socket_syslog = yes; then NET_LIBS="${NET_LIBS} -lsocket"; LIBS="${LIBS} -lsocket" else - echo "$as_me:9952: checking for syslog in -lnsl" >&5 + echo "$as_me:$LINENO: checking for syslog in -lnsl" >&5 echo $ECHO_N "checking for syslog in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_syslog+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9957,8 +11935,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 9960 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9976,32 +11958,33 @@ syslog (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:9979: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:9982: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:9985: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:9988: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_syslog=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_nsl_syslog=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:9999: result: $ac_cv_lib_nsl_syslog" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_syslog" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_syslog" >&6 if test $ac_cv_lib_nsl_syslog = yes; then NET_LIBS="${NET_LIBS} -lnsl"; LIBS="${LIBS} -lnsl" else - echo "$as_me:10004: checking for syslog in -linet" >&5 + echo "$as_me:$LINENO: checking for syslog in -linet" >&5 echo $ECHO_N "checking for syslog in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_syslog+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10009,8 +11992,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10012 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -10028,27 +12015,28 @@ syslog (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10031: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10034: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10037: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10040: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet_syslog=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_inet_syslog=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10051: result: $ac_cv_lib_inet_syslog" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_syslog" >&5 echo "${ECHO_T}$ac_cv_lib_inet_syslog" >&6 if test $ac_cv_lib_inet_syslog = yes; then NET_LIBS="${NET_LIBS} -linet"; LIBS="${LIBS} -linet" @@ -10063,14 +12051,18 @@ fi if test "$with_DCE" = "yes" -o "$ac_cv_prog_YACC" = "bison -y"; then # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -echo "$as_me:10066: checking for working alloca.h" >&5 +echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 10072 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <alloca.h> int main () @@ -10081,43 +12073,48 @@ char *p = (char *) alloca (2 * sizeof (int)); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10084: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10087: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10090: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10093: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_working_alloca_h=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:10103: result: $ac_cv_working_alloca_h" >&5 +echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 if test $ac_cv_working_alloca_h = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 -EOF +_ACEOF fi -echo "$as_me:10113: checking for alloca" >&5 +echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6 if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 10119 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else @@ -10148,33 +12145,34 @@ char *p = (char *) alloca (1); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10151: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10154: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10157: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10160: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_alloca_works=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:10170: result: $ac_cv_func_alloca_works" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 if test $ac_cv_func_alloca_works = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 -EOF +_ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -10184,18 +12182,23 @@ else ALLOCA=alloca.$ac_objext -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 -EOF +_ACEOF -echo "$as_me:10191: checking whether \`alloca.c' needs Cray hooks" >&5 + +echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 10197 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if defined(CRAY) && ! defined(CRAY2) webecray #else @@ -10204,7 +12207,7 @@ wenotbecray _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "webecray" >/dev/null 2>&1; then + $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no @@ -10212,74 +12215,88 @@ fi rm -f conftest* fi -echo "$as_me:10215: result: $ac_cv_os_cray" >&5 +echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:10220: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 10226 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10257: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10260: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10263: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10266: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:10276: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func -EOF +_ACEOF break fi @@ -10287,7 +12304,7 @@ fi done fi -echo "$as_me:10290: checking stack direction for C alloca" >&5 +echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10296,8 +12313,12 @@ else ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF -#line 10299 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int find_stack_direction () { @@ -10319,32 +12340,35 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:10322: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10325: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:10327: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10330: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) ac_cv_c_stack_direction=-1 fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:10342: result: $ac_cv_c_stack_direction" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction -EOF +_ACEOF + fi @@ -10352,9 +12376,9 @@ fi if test "$with_kerb5" = "yes"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_KERB5 1 -EOF +_ACEOF if test -f "/usr/local/include/krb5.h"; then CPPFLAGS="$CPPFLAGS -I/usr/local/include" @@ -10385,7 +12409,7 @@ EOF fi if test "$with_pam" = "yes"; then - echo "$as_me:10388: checking for main in -ldl" >&5 + echo "$as_me:$LINENO: checking for main in -ldl" >&5 echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10393,8 +12417,13 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10396 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + int main () @@ -10405,30 +12434,31 @@ main (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10408: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10411: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10414: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10417: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_main=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_dl_main=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10428: result: $ac_cv_lib_dl_main" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5 echo "${ECHO_T}$ac_cv_lib_dl_main" >&6 if test $ac_cv_lib_dl_main = yes; then - SUDO_LIBS="${SUDO_LIBS} -ldl -lpam" + SUDO_LIBS="${SUDO_LIBS} -lpam -ldl" else SUDO_LIBS="${SUDO_LIBS} -lpam" fi @@ -10438,9 +12468,9 @@ fi if test "$with_kerb4" = "yes"; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_KERB4 1 -EOF +_ACEOF if test -f "/usr/include/kerberosIV/krb.h"; then CPPFLAGS="${CPPFLAGS} -I/usr/include/kerberosIV" @@ -10464,7 +12494,7 @@ EOF echo 'Unable to locate kerberos 4 libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS' fi - echo "$as_me:10467: checking for main in -ldes" >&5 + echo "$as_me:$LINENO: checking for main in -ldes" >&5 echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6 if test "${ac_cv_lib_des_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10472,8 +12502,13 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldes $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10475 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + int main () @@ -10484,27 +12519,28 @@ main (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10487: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10490: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10493: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10496: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_des_main=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_des_main=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10507: result: $ac_cv_lib_des_main" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_des_main" >&5 echo "${ECHO_T}$ac_cv_lib_des_main" >&6 if test $ac_cv_lib_des_main = yes; then SUDO_LIBS="${SUDO_LIBS} -lkrb -ldes" @@ -10576,7 +12612,7 @@ if test "$with_skey" = "yes"; then else echo 'Unable to locate libskey.a and/or skey.h, you will have to edit the Makefile and add -L/path/to/skey/lib to SUDO_LDFLAGS and/or -I/path/to/skey.h to CPPFLAGS' fi - echo "$as_me:10579: checking for skeyaccess in -lskey" >&5 + echo "$as_me:$LINENO: checking for skeyaccess in -lskey" >&5 echo $ECHO_N "checking for skeyaccess in -lskey... $ECHO_C" >&6 if test "${ac_cv_lib_skey_skeyaccess+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10584,8 +12620,12 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lskey $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 10587 "configure" -#include "confdefs.h" +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -10603,33 +12643,34 @@ skeyaccess (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:10606: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:10609: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:10612: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:10615: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_skey_skeyaccess=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_skey_skeyaccess=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:10626: result: $ac_cv_lib_skey_skeyaccess" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_skey_skeyaccess" >&5 echo "${ECHO_T}$ac_cv_lib_skey_skeyaccess" >&6 if test $ac_cv_lib_skey_skeyaccess = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_SKEYACCESS 1 -EOF +_ACEOF fi @@ -10649,15 +12690,79 @@ fi if test -n "$with_SecurID" -a "$with_SecurID" != "no"; then if test "$with_SecurID" != "yes"; then - SUDO_LIBS="${SUDO_LIBS} ${with_SecurID}/sdiclient.a" - CPPFLAGS="${CPPFLAGS} -I${with_SecurID}" - elif test -f /usr/ace/examples/sdiclient.a; then - SUDO_LIBS="${SUDO_LIBS} /usr/ace/examples/sdiclient.a" - CPPFLAGS="${CPPFLAGS} -I/usr/ace/examples" + : + elif test -d /usr/ace/examples; then + with_SecurID=/usr/ace/examples else - SUDO_LIBS="${SUDO_LIBS} /usr/ace/sdiclient.a" - CPPFLAGS="${CPPFLAGS} -I/usr/ace" + with_SecurID=/usr/ace fi + CPPFLAGS="${CPPFLAGS} -I${with_SecurID}" + _LDFLAGS="${LDFLAGS}" + LDFLAGS="${LDFLAGS} -L${with_SecurID}" + # + # Determine whether to use the new or old SecurID API + # + echo "$as_me:$LINENO: checking for SD_Init in -laceclnt" >&5 +echo $ECHO_N "checking for SD_Init in -laceclnt... $ECHO_C" >&6 +if test "${ac_cv_lib_aceclnt_SD_Init_lpthread+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-laceclnt -lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char SD_Init (); +int +main () +{ +SD_Init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_aceclnt_SD_Init_lpthread=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_aceclnt_SD_Init_lpthread=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_aceclnt_SD_Init_lpthread" >&5 +echo "${ECHO_T}$ac_cv_lib_aceclnt_SD_Init_lpthread" >&6 +if test $ac_cv_lib_aceclnt_SD_Init_lpthread = yes; then + AUTH_OBJS="securid5.o"; SUDO_LIBS="${SUDO_LIBS} -laceclnt -lpthread"; SUDO_LDFLAGS="${SUDO_LDFLAGS} -L${with_SecurID}" +else + AUTH_OBJS="securid.o"; SUDO_LIBS="${SUDO_LIBS} ${with_SecurID}/sdiclient.a" +fi + + LDFLAGS="${_LDFLAGS}" fi if test "$with_fwtk" = "yes"; then @@ -10668,45 +12773,45 @@ if test "$with_authenticate" = "yes"; then SUDO_LIBS="${SUDO_LIBS} -ls" fi -echo "$as_me:10671: checking for log file location" >&5 +echo "$as_me:$LINENO: checking for log file location" >&5 echo $ECHO_N "checking for log file location... $ECHO_C" >&6 if test -n "$with_logpath"; then - echo "$as_me:10674: result: $with_logpath" >&5 + echo "$as_me:$LINENO: result: $with_logpath" >&5 echo "${ECHO_T}$with_logpath" >&6 cat >>confdefs.h <<EOF #define _PATH_SUDO_LOGFILE "$with_logpath" EOF elif test -d "/var/log"; then - echo "$as_me:10681: result: /var/log/sudo.log" >&5 + echo "$as_me:$LINENO: result: /var/log/sudo.log" >&5 echo "${ECHO_T}/var/log/sudo.log" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_LOGFILE "/var/log/sudo.log" EOF elif test -d "/var/adm"; then - echo "$as_me:10688: result: /var/adm/sudo.log" >&5 + echo "$as_me:$LINENO: result: /var/adm/sudo.log" >&5 echo "${ECHO_T}/var/adm/sudo.log" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_LOGFILE "/var/adm/sudo.log" EOF elif test -d "/usr/adm"; then - echo "$as_me:10695: result: /usr/adm/sudo.log" >&5 + echo "$as_me:$LINENO: result: /usr/adm/sudo.log" >&5 echo "${ECHO_T}/usr/adm/sudo.log" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_LOGFILE "/usr/adm/sudo.log" EOF else - echo "$as_me:10702: result: unknown" >&5 + echo "$as_me:$LINENO: result: unknown" >&5 echo "${ECHO_T}unknown" >&6 fi -echo "$as_me:10706: checking for timestamp file location" >&5 +echo "$as_me:$LINENO: checking for timestamp file location" >&5 echo $ECHO_N "checking for timestamp file location... $ECHO_C" >&6 if test -n "$with_timedir"; then - echo "$as_me:10709: result: $with_timedir" >&5 + echo "$as_me:$LINENO: result: $with_timedir" >&5 echo "${ECHO_T}$with_timedir" >&6 cat >>confdefs.h <<EOF #define _PATH_SUDO_TIMEDIR "$with_timedir" @@ -10714,7 +12819,7 @@ EOF timedir="$with_timedir" elif test -d "/var/run"; then - echo "$as_me:10717: result: /var/run/sudo" >&5 + echo "$as_me:$LINENO: result: /var/run/sudo" >&5 echo "${ECHO_T}/var/run/sudo" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_TIMEDIR "/var/run/sudo" @@ -10722,7 +12827,7 @@ EOF timedir="/var/run/sudo" else - echo "$as_me:10725: result: /tmp/.odus" >&5 + echo "$as_me:$LINENO: result: /tmp/.odus" >&5 echo "${ECHO_T}/tmp/.odus" >&6 cat >>confdefs.h <<\EOF #define _PATH_SUDO_TIMEDIR "/tmp/.odus" @@ -10731,13 +12836,14 @@ EOF timedir="/tmp/.odus" fi + if test "$with_passwd" = "no"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITHOUT_PASSWD 1. Define to avoid using the passwd/shadow file for authentication. -EOF +_ACEOF if test -z "$AUTH_OBJS"; then - { { echo "$as_me:10740: error: no authentication methods defined." >&5 + { { echo "$as_me:$LINENO: error: no authentication methods defined." >&5 echo "$as_me: error: no authentication methods defined." >&2;} { (exit 1); exit 1; }; } fi @@ -10763,7 +12869,7 @@ fi test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)' -ac_config_files="$ac_config_files Makefile sudo.man visudo.man sudoers.man" + ac_config_files="$ac_config_files Makefile sudo.man visudo.man sudoers.man" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -10774,7 +12880,7 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overriden when +# `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. @@ -10809,7 +12915,7 @@ _ACEOF t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache -if cmp -s $cache_file confcache; then :; else +if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file @@ -10840,35 +12946,227 @@ fi DEFS=-DHAVE_CONFIG_H +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:10846: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL -# Generated automatically by configure. +# Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false +ac_cs_recheck=false +ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} -ac_cs_invocation="\$0 \$@" - _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + # Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -10894,24 +13192,20 @@ else fi rm -f conf$$ conf$$.exe conf$$.file -as_executable_p="test -f" - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: else - as_unset=false + as_mkdir_p=false fi -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + # IFS # We need space, tab and new line, in precisely that order. @@ -10920,10 +13214,34 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH exec 6>&1 +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by sudo $as_me 1.6.7, which was +generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF # Files that config.status was made for. @@ -10943,7 +13261,7 @@ if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the @@ -10953,6 +13271,7 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] @@ -10967,12 +13286,12 @@ Configuration headers: $config_headers Report bugs to <bug-autoconf@gnu.org>." -EOF +_ACEOF -cat >>$CONFIG_STATUS <<EOF +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -sudo config.status 1.6.6 -configured by $0, generated by GNU Autoconf 2.52, +sudo config.status 1.6.7 +configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -10980,9 +13299,9 @@ Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: @@ -10992,30 +13311,30 @@ do --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - shift - set dummy "$ac_option" "$ac_optarg" ${1+"$@"} - shift + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift ;; - -*);; *) # This is not an option, so the user has probably given explicit # arguments. + ac_option=$1 ac_need_defaults=false;; esac - case $1 in + case $ac_option in # Handling of the options. -EOF -cat >>$CONFIG_STATUS <<EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" - exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; -EOF -cat >>$CONFIG_STATUS <<\EOF + ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:11018: error: ambiguous option: $1 + { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -11025,16 +13344,19 @@ Try \`$0 --help' for more information." >&2;} --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) - shift - CONFIG_FILES="$CONFIG_FILES $1" + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) - shift - CONFIG_HEADERS="$CONFIG_HEADERS $1" + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:11037: error: unrecognized option: $1 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -11046,25 +13368,27 @@ Try \`$0 --help' for more information." >&2;} shift done -exec 5>>config.log -cat >&5 << _ACEOF +ac_configure_extra_args= -## ----------------------- ## -## Running config.status. ## -## ----------------------- ## +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi -This file was extended by $as_me (sudo 1.6.6) 2.52, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - > $ac_cs_invocation -on `(hostname || uname -n) 2>/dev/null | sed 1q` +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi _ACEOF -EOF -cat >>$CONFIG_STATUS <<\EOF + + + + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in @@ -11075,7 +13399,7 @@ do "sudoers.man" ) CONFIG_FILES="$CONFIG_FILES sudoers.man" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "pathnames.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pathnames.h" ;; - *) { { echo "$as_me:11078: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -11090,6 +13414,9 @@ if $ac_need_defaults; then test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { @@ -11098,23 +13425,23 @@ $debug || } # Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} + { - tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=$TMPDIR/cs$$-$RANDOM + tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { - echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -EOF +_ACEOF -cat >>$CONFIG_STATUS <<EOF +cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. @@ -11127,6 +13454,12 @@ if test -n "\$CONFIG_FILES"; then sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t @@ -11142,19 +13475,13 @@ s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t s,@CFLAGS@,$CFLAGS,;t t s,@PROGS@,$PROGS,;t t @@ -11166,7 +13493,6 @@ s,@NET_LIBS@,$NET_LIBS,;t t s,@AFS_LIBS@,$AFS_LIBS,;t t s,@OSDEFS@,$OSDEFS,;t t s,@AUTH_OBJS@,$AUTH_OBJS,;t t -s,@LIBOBJS@,$LIBOBJS,;t t s,@MANTYPE@,$MANTYPE,;t t s,@MAN_POSTINSTALL@,$MAN_POSTINSTALL,;t t s,@SUDOERS_MODE@,$SUDOERS_MODE,;t t @@ -11218,13 +13544,16 @@ s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t +s,@EGREP@,$EGREP,;t t s,@YACC@,$YACC,;t t +s,@LIBOBJS@,$LIBOBJS,;t t s,@ALLOCA@,$ALLOCA,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF -EOF +_ACEOF - cat >>$CONFIG_STATUS <<\EOF + cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 @@ -11263,8 +13592,8 @@ EOF fi fi # test -n "$CONFIG_FILES" -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in @@ -11278,7 +13607,8 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ @@ -11289,55 +13619,80 @@ echo X"$ac_file" | /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in - [\\/]* | ?:[\\/]* ) as_incr_dir=;; - *) as_incr_dir=.;; -esac -as_dummy="$ac_dir" -for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do - case $as_mkdir_dir in - # Skip DOS drivespec - ?:) as_incr_dir=$as_mkdir_dir ;; - *) - as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" - ;; - esac -done; } - - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" else - ac_dir_suffix= ac_dots= - fi + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } - case $srcdir in - .) ac_srcdir=. - if test -z "$ac_dots"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - ac_srcdir=$ac_dots$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_dots$srcdir ;; - esac + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + if test x"$ac_file" != x-; then - { echo "$as_me:11332: creating $ac_file" >&5 + { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: - # /* config.h. Generated automatically by config.status. */ - configure_input="Generated automatically from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -11347,7 +13702,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:11350: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -11360,23 +13715,29 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:11363: error: cannot find input file: $f" >&5 + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } -EOF -cat >>$CONFIG_STATUS <<EOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then @@ -11387,8 +13748,8 @@ s,@top_srcdir@,$ac_top_srcdir,;t t fi done -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. @@ -11420,7 +13781,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:11423: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -11431,7 +13792,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:11434: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -11444,7 +13805,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:11447: error: cannot find input file: $f" >&5 + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -11453,7 +13814,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in -EOF +_ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into @@ -11469,16 +13830,16 @@ rm -f conftest.defines conftest.undefs # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\EOF +cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear -s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end -EOF +_ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. @@ -11489,14 +13850,14 @@ rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\EOF +cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -EOF +_ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail @@ -11520,7 +13881,7 @@ do mv conftest.tail conftest.defines done rm -f conftest.defines -echo ' fi # egrep' >>$CONFIG_STATUS +echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size @@ -11548,23 +13909,24 @@ do done rm -f conftest.undefs -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: - # /* config.h. Generated automatically by config.status. */ + # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then - echo "/* Generated automatically by configure. */" >$tmp/config.h + echo "/* Generated by configure. */" >$tmp/config.h else - echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then - if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:11564: $ac_file is unchanged" >&5 + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ @@ -11575,24 +13937,31 @@ echo X"$ac_file" | /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in - [\\/]* | ?:[\\/]* ) as_incr_dir=;; - *) as_incr_dir=.;; -esac -as_dummy="$ac_dir" -for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do - case $as_mkdir_dir in - # Skip DOS drivespec - ?:) as_incr_dir=$as_mkdir_dir ;; - *) - as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" - ;; - esac -done; } + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } - fi rm -f $ac_file mv $tmp/config.h $ac_file fi @@ -11601,15 +13970,16 @@ done; } rm -f $tmp/config.h fi done -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } -EOF +_ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open @@ -11620,14 +13990,18 @@ ac_clean_files=$ac_clean_files_save # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null - $SHELL $CONFIG_STATUS || ac_cs_success=false + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi + if test "$with_pam" = "yes"; then echo "" case $host in @@ -11638,3 +14012,17 @@ if test "$with_pam" = "yes"; then echo "" fi + + + + + + + + + + + + + + diff --git a/usr.bin/sudo/configure.in b/usr.bin/sudo/configure.in index 13d3a33253c..e8bc7c6eec9 100644 --- a/usr.bin/sudo/configure.in +++ b/usr.bin/sudo/configure.in @@ -1,15 +1,15 @@ dnl dnl Process this file with GNU autoconf to produce a configure script. -dnl $Sudo: configure.in,v 1.349 2002/04/18 15:41:30 millert Exp $ +dnl $Sudo: configure.in,v 1.367 2003/03/15 20:31:01 millert Exp $ dnl -dnl Copyright (c) 1994-1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com> +dnl Copyright (c) 1994-1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> dnl -AC_INIT(sudo, 1.6.6) +AC_INIT(sudo, 1.6.7) AC_CONFIG_HEADER(config.h pathnames.h) dnl dnl This won't work before AC_INIT() dnl -echo "Configuring Sudo version 1.6.6" +echo "Configuring Sudo version 1.6.7" dnl dnl Variables that get substituted in the Makefile and man pages dnl @@ -24,7 +24,6 @@ AC_SUBST(NET_LIBS)dnl AC_SUBST(AFS_LIBS)dnl AC_SUBST(OSDEFS)dnl AC_SUBST(AUTH_OBJS)dnl -AC_SUBST(LIBOBJS)dnl AC_SUBST(MANTYPE)dnl AC_SUBST(MAN_POSTINSTALL)dnl AC_SUBST(SUDOERS_MODE)dnl @@ -111,7 +110,7 @@ dnl test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man' test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin' test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin' -test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' +test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc' dnl dnl Deprecated --with options (these all warn or generate an error) @@ -292,7 +291,6 @@ AC_ARG_WITH(SecurID, [ --with-SecurID enable SecurID support], AC_MSG_CHECKING(whether to use SecurID for authentication) AC_MSG_RESULT(yes) with_passwd=no - AUTH_OBJS="securid.o" ;; esac]) @@ -480,7 +478,7 @@ AC_ARG_WITH(badpri, [ --with-badpri syslog priority for failures (def ;; esac]) AC_DEFINE_UNQUOTED(PRI_FAILURE, "$badpri", [The syslog priority sudo will use for unsuccessful attempts/errors.]) -AC_MSG_RESULT(badpri) +AC_MSG_RESULT($badpri) AC_ARG_WITH(logpath, [ --with-logpath path to the sudo log file], [case $with_logpath in @@ -550,7 +548,7 @@ AC_ARG_WITH(mail-if-no-host, [ --with-mail-if-no-host send mail if user in sud ;; esac]) if test "$mail_no_host" = "on"; then - AC_DEFINE(SEND_MAIL_WHEN_NO_HOST, 1, [Define to send mail when the user is not not allowed to run sudo on this host.]) + AC_DEFINE(SEND_MAIL_WHEN_NO_HOST, 1, [Define to send mail when the user is not allowed to run sudo on this host.]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -567,7 +565,7 @@ AC_ARG_WITH(mail-if-noperms, [ --with-mail-if-noperms send mail if user not al ;; esac]) if test "$mail_noperms" = "on"; then - AC_DEFINE(SEND_MAIL_WHEN_NOT_OK, 1, [Define to send mail when the user is not not allowed to run a command.]) + AC_DEFINE(SEND_MAIL_WHEN_NOT_OK, 1, [Define to send mail when the user is not allowed to run a command.]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -669,7 +667,7 @@ AC_ARG_WITH(sudoers-mode, [ --with-sudoers-mode mode of sudoers file (defau ;; 0*) SUDOERS_MODE=$with_sudoers_mode ;; - *) AC_MSG_ERROR(["you must use a numeric uid, not a name."]) + *) AC_MSG_ERROR(["you must use an octal mode, not a name."]) ;; esac]) @@ -681,7 +679,7 @@ AC_ARG_WITH(sudoers-uid, [ --with-sudoers-uid uid that owns sudoers file ( ;; [[0-9]]*) SUDOERS_UID=$with_sudoers_uid ;; - *) AC_MSG_ERROR(["you must use a numeric uid, not a name."]) + *) AC_MSG_ERROR(["you must use an unsigned numeric uid, not a name."]) ;; esac]) @@ -693,7 +691,7 @@ AC_ARG_WITH(sudoers-gid, [ --with-sudoers-gid gid that owns sudoers file ( ;; [[0-9]]*) SUDOERS_GID=$with_sudoers_gid ;; - *) AC_MSG_ERROR(["you must use a numeric gid, not a name."]) + *) AC_MSG_ERROR(["you must use an unsigned numeric gid, not a name."]) ;; esac]) @@ -787,7 +785,7 @@ AC_MSG_RESULT($passwd_tries) AC_MSG_CHECKING(time in minutes after which sudo will ask for a password again) AC_ARG_WITH(timeout, [ --with-timeout minutes before sudo asks for passwd again (def is 5 minutes)], -[echo $with_timeout; case $with_timeout in +[case $with_timeout in yes) ;; no) timeout=0 ;; @@ -944,6 +942,18 @@ AC_ARG_WITH(interfaces, [ --without-interfaces don't try to read the ip addr ;; esac], AC_MSG_RESULT(yes)) +AC_MSG_CHECKING(whether stow should be used) +AC_ARG_WITH(stow, [ --with-stow properly handle GNU stow packaging], +[case $with_stow in + yes) AC_MSG_RESULT(yes) + AC_DEFINE(USE_STOW, 1, [Define if you use stow packaging.]) + ;; + no) AC_MSG_RESULT(no) + ;; + *) AC_MSG_ERROR(["--with-stow does not take an argument."]) + ;; +esac], AC_MSG_RESULT(no)) + dnl dnl Options for --enable dnl @@ -982,7 +992,16 @@ AC_ARG_ENABLE(root-mailer, AC_ARG_ENABLE(setreuid, [ --disable-setreuid Don't try to use the setreuid() function], [ case "$enableval" in - no) BROKEN_SETREUID=1 + no) SKIP_SETREUID=yes + ;; + *) ;; + esac +]) + +AC_ARG_ENABLE(setresuid, +[ --disable-setresuid Don't try to use the setresuid() function], +[ case "$enableval" in + no) SKIP_SETRESUID=yes ;; *) ;; esac @@ -1291,7 +1310,7 @@ case "$host" in # use SIA by default, if we have it, else SecureWare # unless overridden on the command line if test "$CHECKSIA" = "true"; then - AC_CHECK_FUNC(sia_ses_init, AC_DEFINE(HAVE_SIA, 1, [Define if you use SIA.]) [ + AC_CHECK_FUNC(sia_ses_init, [AC_DEFINE(HAVE_SIA, 1, [Define if you use SIA.])] [ if test -n "$with_skey" -o -n "$with_opie" -o -n "$with_otp_only" -o -n "$with_long_otp_prompt" -o -n "$with_SecurID" -o -n "$with_fwtk" -o -n "$with_kerb4" -o -n "$with_kerb5" -o -n "$with_pam" -o -n "$with_AFS" -o -n "$with_DCE"; then AC_MSG_ERROR(["you cannot mix SIA and other authentication schemes. You can turn off SIA support via the --disable-sia option"]) fi]; CHECKSHADOW=false) @@ -1328,7 +1347,7 @@ case "$host" in *-*-irix*) CPPFLAGS="${CPPFLAGS} -D_BSD_TYPES" if test -z "$NROFFPROG"; then - MAN_POSTINSTALL=' /bin/rm -f $(mandir8)/sudo.$(mansect8).z $(mandir8)/visudo.$(mansect8).z $(mandir5)/sudoers.$(mansect5).z ; /usr/bin/pack $(mandir8)/sudo.$(mansect8) $(mandir8)/visudo.$(mansect8) $(mandir5)/sudoers.$(mansect5)' + MAN_POSTINSTALL=' /bin/rm -f $(mandirsu)/sudo.$(mansectsu).z $(mandirsu)/visudo.$(mansectsu).z $(mandirform)/sudoers.$(mansectform).z ; /usr/bin/pack $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudoers.$(mansectform)' if test "$prefix" = "/usr/local" -a "$mandir" = '$(prefix)/man'; then if test -d /usr/share/catman/local; then mandir="/usr/share/catman/local" @@ -1432,7 +1451,7 @@ case "$host" in test -n "$mansectform" || mansectform=4 ;; *-*-bsdi*) - BROKEN_SETREUID=yes + SKIP_SETREUID=yes # Use shlicc for BSD/OS [23].x unless asked to do otherwise if test "${with_CC+set}" != set -a "$ac_cv_prog_CC" = gcc; then case "$OSREV" in @@ -1448,7 +1467,7 @@ case "$host" in # backported to 2.0.5. We just take 2.1 and above... case "`echo $host_os | sed 's/^freebsd\([[0-9\.]]*\).*$/\1/'`" in 0.*|1.*|2.0*) - BROKEN_SETREUID=yes + SKIP_SETREUID=yes ;; esac if test "$with_logincap" = "yes"; then @@ -1462,7 +1481,7 @@ case "$host" in fi ;; *-*-*openbsd*) - BROKEN_SETREUID=yes + SKIP_SETREUID=yes if test "$CHECKSHADOW" = "true"; then CHECKSHADOW="false" fi @@ -1471,7 +1490,7 @@ case "$host" in # NetBSD has a real setreuid(2) starting with 1.3.2 case "`echo $host_os | sed 's/^netbsd\([[0-9\.]]*\).*$/\1/'`" in 0.9*|1.[012]*|1.3|1.3.1) - BROKEN_SETREUID=yes + SKIP_SETREUID=yes ;; esac if test "$CHECKSHADOW" = "true"; then @@ -1548,7 +1567,7 @@ if test "$with_logincap" = "yes"; then AC_CHECK_HEADERS(login_cap.h) fi if test "$with_bsdauth" = "yes"; then - AC_CHECK_HEADER(bsd_auth.h, AC_DEFINE(HAVE_BSD_AUTH_H, 1, [Define if you use BSD authentication.]) [with_passwd=no; AUTH_OBJS=bsdauth.o]) + AC_CHECK_HEADER(bsd_auth.h, AC_DEFINE(HAVE_BSD_AUTH_H, 1, [Define if you use BSD authentication.]) [with_passwd=no; AUTH_OBJS=bsdauth.o], -) fi dnl dnl typedef checks @@ -1578,12 +1597,15 @@ dnl dnl Function checks dnl AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \ - seteuid setegid strftime setrlimit initgroups fstat) -if test -z "$BROKEN_SETREUID"; then + strftime setrlimit initgroups fstat) +if test -z "$SKIP_SETRESUID"; then + AC_CHECK_FUNCS(setresuid, [SKIP_SETREUID=yes]) +fi +if test -z "$SKIP_SETREUID"; then AC_CHECK_FUNCS(setreuid) fi if test X"$with_interfaces" != X"no"; then - AC_CHECK_FUNCS(getifaddrs, AC_CHECK_FUNCS(freeifaddrs)) + AC_CHECK_FUNCS(getifaddrs, [AC_CHECK_FUNCS(freeifaddrs)]) fi if test -n "$SECUREWARE"; then AC_CHECK_FUNCS(bigcrypt set_auth_parameters initprivs) @@ -1593,12 +1615,12 @@ if test -z "$BROKEN_GETCWD"; then fi AC_CHECK_FUNCS(lockf flock, [break]) AC_CHECK_FUNCS(waitpid wait3, [break]) -AC_CHECK_FUNCS(innetgr _innetgr, AC_CHECK_FUNCS(getdomainname) [break]) -AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, AC_CHECK_HEADER(search.h, AC_DEFINE(HAVE_LSEARCH) [LIBS="${LIBS} -lcompat"], AC_LIBOBJ(lsearch)), AC_LIBOBJ(lsearch))]) -AC_CHECK_FUNCS(utime, SUDO_FUNC_UTIME_POSIX, AC_LIBOBJ(utime)) +AC_CHECK_FUNCS(innetgr _innetgr, [AC_CHECK_FUNCS(getdomainname) [break]]) +AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, AC_CHECK_HEADER(search.h, AC_DEFINE(HAVE_LSEARCH) [LIBS="${LIBS} -lcompat"], AC_LIBOBJ(lsearch), -), AC_LIBOBJ(lsearch))]) +AC_CHECK_FUNCS(utime, [SUDO_FUNC_UTIME_POSIX], [AC_LIBOBJ(utime)]) SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH, 1, [Define if you have the `fnmatch' function.]), AC_LIBOBJ(fnmatch)) SUDO_FUNC_ISBLANK -AC_REPLACE_FUNCS(strerror strcasecmp sigaction) +AC_REPLACE_FUNCS(strerror strcasecmp sigaction strlcpy strlcat) AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf, , [NEED_SNPRINTF=1]) dnl dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS @@ -1675,7 +1697,7 @@ dnl dnl PAM libs dnl if test "$with_pam" = "yes"; then - AC_HAVE_LIBRARY(dl, SUDO_LIBS="${SUDO_LIBS} -ldl -lpam", SUDO_LIBS="${SUDO_LIBS} -lpam") + AC_HAVE_LIBRARY(dl, SUDO_LIBS="${SUDO_LIBS} -lpam -ldl", SUDO_LIBS="${SUDO_LIBS} -lpam") fi dnl @@ -1802,15 +1824,20 @@ dnl extra SecurID lib + includes dnl if test -n "$with_SecurID" -a "$with_SecurID" != "no"; then if test "$with_SecurID" != "yes"; then - SUDO_LIBS="${SUDO_LIBS} ${with_SecurID}/sdiclient.a" - CPPFLAGS="${CPPFLAGS} -I${with_SecurID}" - elif test -f /usr/ace/examples/sdiclient.a; then - SUDO_LIBS="${SUDO_LIBS} /usr/ace/examples/sdiclient.a" - CPPFLAGS="${CPPFLAGS} -I/usr/ace/examples" + : + elif test -d /usr/ace/examples; then + with_SecurID=/usr/ace/examples else - SUDO_LIBS="${SUDO_LIBS} /usr/ace/sdiclient.a" - CPPFLAGS="${CPPFLAGS} -I/usr/ace" + with_SecurID=/usr/ace fi + CPPFLAGS="${CPPFLAGS} -I${with_SecurID}" + _LDFLAGS="${LDFLAGS}" + LDFLAGS="${LDFLAGS} -L${with_SecurID}" + # + # Determine whether to use the new or old SecurID API + # + AC_CHECK_LIB(aceclnt, SD_Init, [AUTH_OBJS="securid5.o"; SUDO_LIBS="${SUDO_LIBS} -laceclnt -lpthread"; SUDO_LDFLAGS="${SUDO_LDFLAGS} -L${with_SecurID}"], [AUTH_OBJS="securid.o"; SUDO_LIBS="${SUDO_LIBS} ${with_SecurID}/sdiclient.a"], [-lpthread]) + LDFLAGS="${_LDFLAGS}" fi dnl @@ -1922,6 +1949,13 @@ AH_BOTTOM([/* # endif #endif +/* GNU stow needs /etc/sudoers to be a symlink. */ +#ifdef HAVE_STOW +# define stat_sudoers stat +#else +# define stat_sudoers lstat +#endif + /* Solaris doesn't use const qualifiers in PAM. */ #ifdef sun # define PAM_CONST diff --git a/usr.bin/sudo/def_data.in b/usr.bin/sudo/def_data.in index 3fac37342f7..b23e63b35de 100644 --- a/usr.bin/sudo/def_data.in +++ b/usr.bin/sudo/def_data.in @@ -147,6 +147,9 @@ badpass_message timestampdir T_STR|T_PATH "Path to authentication timestamp dir: %s" +timestampowner + T_STR + "Owner of the authentication timestamp dir: %s" exempt_group T_STR|T_BOOL "Users in this group are exempt from password and PATH requirements: %s" diff --git a/usr.bin/sudo/env.c b/usr.bin/sudo/env.c index f49e51e37d5..4078ecde422 100644 --- a/usr.bin/sudo/env.c +++ b/usr.bin/sudo/env.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 2000-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -62,11 +62,11 @@ #include "sudo.h" #ifndef lint -static const char rcsid[] = "$Sudo: env.c,v 1.16 2002/04/18 15:38:52 millert Exp $"; +static const char rcsid[] = "$Sudo: env.c,v 1.25 2003/03/15 20:31:01 millert Exp $"; #endif /* lint */ /* - * Flags used in env_reset() + * Flags used in rebuild_env() */ #undef DID_TERM #define DID_TERM 0x01 @@ -86,14 +86,14 @@ static const char rcsid[] = "$Sudo: env.c,v 1.16 2002/04/18 15:38:52 millert Exp */ char **rebuild_env __P((int, char **)); char **zero_env __P((char **)); -static void insert_env __P((char **, char *)); +static void insert_env __P((char *, int)); static char *format_env __P((char *, char *)); /* * Default table of "bad" variables to remove from the environment. * XXX - how to omit TERMCAP if it starts with '/'? */ -char *initial_badenv_table[] = { +static const char *initial_badenv_table[] = { "IFS", "LOCALDOMAIN", "RES_OPTIONS", @@ -108,6 +108,9 @@ char *initial_badenv_table[] = { #ifdef _AIX "LIBPATH", #endif /* _AIX */ +#ifdef __APPLE__ + "DYLD_*", +#endif #ifdef HAVE_KERB4 "KRB_CONF*", "KRBCONFDIR" @@ -133,13 +136,17 @@ char *initial_badenv_table[] = { /* * Default table of variables to check for '%' and '/' characters. */ -char *initial_checkenv_table[] = { +static const char *initial_checkenv_table[] = { "LC_*", "LANG", "LANGUAGE", NULL }; +static char **new_environ; /* Modified copy of the environment */ +static size_t env_size; /* size of new_environ in char **'s */ +static size_t env_len; /* number of slots used, not counting NULL */ + /* * Zero out environment and replace with a minimal set of * USER, LOGNAME, HOME, TZ, PATH (XXX - should just set path to default) @@ -206,44 +213,57 @@ format_env(var, val) char *var; char *val; { - char *estring, *p; - size_t varlen, vallen; - - varlen = strlen(var); - vallen = strlen(val); - p = estring = (char *) emalloc(varlen + vallen + 2); - strcpy(p, var); - p += varlen; - *p++ = '='; - strcpy(p, val); + char *estring; + size_t esize; + + esize = strlen(var) + 1 + strlen(val) + 1; + estring = (char *) emalloc(esize); + + /* We pre-allocate enough space, so this should never overflow. */ + if (strlcpy(estring, var, esize) >= esize || + strlcat(estring, "=", esize) >= esize || + strlcat(estring, val, esize) >= esize) { + (void) fprintf(stderr, "%s: internal error, format_env() overflow\n", + Argv[0]); + exit(1); + } return(estring); } /* - * Insert str into envp. - * Assumes str has an '=' in it and does not check for available space! + * Insert str into new_environ, assumes str has an '=' in it. + * NOTE: no other routines may modify new_environ, env_size, or env_len. */ static void -insert_env(envp, str) - char **envp; +insert_env(str, dupcheck) char *str; + int dupcheck; { - char **ep; + char **nep; size_t varlen; - varlen = (strchr(str, '=') - str) + 1; - - for (ep = envp; *ep; ep++) { - if (strncmp(str, *ep, varlen) == 0) { - *ep = str; - break; - } - } - if (*ep == NULL) { - *ep++ = str; - *ep = NULL; + /* Make sure there is room for the new entry. */ + if (env_len + 1 > env_size) { + env_size += 128; + new_environ = erealloc3(new_environ, env_size, sizeof(char *)); } + + if (dupcheck) { + varlen = (strchr(str, '=') - str) + 1; + + for (nep = new_environ; *nep; nep++) { + if (strncmp(str, *nep, varlen) == 0) { + *nep = str; + return; + } + } + } else + nep = &new_environ[env_len]; + + env_len++; + *nep++ = str; + *nep = NULL; } /* @@ -256,15 +276,11 @@ rebuild_env(sudo_mode, envp) int sudo_mode; char **envp; { - char **newenvp, **ep, **nep, *cp, *ps1; + char **ep, *cp, *ps1; int okvar, iswild, didvar; - size_t env_size, len; + size_t len; struct list_member *cur; - /* Count number of items in "env_keep" list (if any) */ - for (len = 0, cur = def_list(I_ENV_KEEP); cur; cur = cur->next) - len++; - /* * Either clean out the environment or reset to a safe default. */ @@ -273,10 +289,6 @@ rebuild_env(sudo_mode, envp) if (def_flag(I_ENV_RESET)) { int keepit; - /* Alloc space for new environment. */ - env_size = 32 + len; - nep = newenvp = (char **) emalloc(env_size * sizeof(char *)); - /* Pull in vars we want to keep from the old environment. */ for (ep = envp; *ep; ep++) { keepit = 0; @@ -307,28 +319,28 @@ rebuild_env(sudo_mode, envp) case 'H': if (strncmp(*ep, "HOME=", 5) == 0) didvar |= DID_HOME; - break; + break; case 'S': if (strncmp(*ep, "SHELL=", 6) == 0) didvar |= DID_SHELL; - break; + break; case 'L': if (strncmp(*ep, "LOGNAME=", 8) == 0) didvar |= DID_LOGNAME; - break; + break; case 'U': if (strncmp(*ep, "USER=", 5) == 0) didvar |= DID_USER; - break; + break; } - *nep++ = *ep; + insert_env(*ep, 0); } else { /* Preserve TERM and PATH, ignore anything else. */ if (!(didvar & DID_TERM) && !strncmp(*ep, "TERM=", 5)) { - *nep++ = *ep; + insert_env(*ep, 0); didvar |= DID_TERM; } else if (!(didvar & DID_PATH) && !strncmp(*ep, "PATH=", 5)) { - *nep++ = *ep; + insert_env(*ep, 0); didvar |= DID_PATH; } } @@ -339,19 +351,14 @@ rebuild_env(sudo_mode, envp) * user's environment. */ if (!(didvar & DID_HOME)) - *nep++ = format_env("HOME", user_dir); + insert_env(format_env("HOME", user_dir), 0); if (!(didvar & DID_SHELL)) - *nep++ = format_env("SHELL", sudo_user.pw->pw_shell); + insert_env(format_env("SHELL", sudo_user.pw->pw_shell), 0); if (!(didvar & DID_LOGNAME)) - *nep++ = format_env("LOGNAME", user_name); + insert_env(format_env("LOGNAME", user_name), 0); if (!(didvar & DID_USER)) - *nep++ = format_env("USER", user_name); + insert_env(format_env("USER", user_name), 0); } else { - /* Alloc space for new environment. */ - for (env_size = 16 + len, ep = envp; *ep; ep++, env_size++) - ; - nep = newenvp = (char **) emalloc(env_size * sizeof(char *)); - /* * Copy envp entries as long as they don't match env_delete or * env_check. @@ -397,77 +404,57 @@ rebuild_env(sudo_mode, envp) didvar |= DID_PATH; else if (strncmp(*ep, "TERM=", 5) == 0) didvar |= DID_TERM; - *nep++ = *ep; + insert_env(*ep, 0); } } } /* Provide default values for $TERM and $PATH if they are not set. */ if (!(didvar & DID_TERM)) - *nep++ = "TERM=unknown"; + insert_env("TERM=unknown", 0); if (!(didvar & DID_PATH)) - *nep++ = format_env("PATH", _PATH_DEFPATH); - *nep = NULL; - - /* - * At this point we must use insert_env() to modify newenvp. - * Access via 'nep' is not allowed (since we must check for dupes). - */ + insert_env(format_env("PATH", _PATH_DEFPATH), 0); #ifdef SECURE_PATH /* Replace the PATH envariable with a secure one. */ - insert_env(newenvp, format_env("PATH", SECURE_PATH)); + insert_env(format_env("PATH", SECURE_PATH), 1); #endif /* Set $USER and $LOGNAME to target if "set_logname" is true. */ if (def_flag(I_SET_LOGNAME) && runas_pw->pw_name) { - insert_env(newenvp, format_env("LOGNAME", runas_pw->pw_name)); - insert_env(newenvp, format_env("USER", runas_pw->pw_name)); + insert_env(format_env("LOGNAME", runas_pw->pw_name), 1); + insert_env(format_env("USER", runas_pw->pw_name), 1); } /* Set $HOME for `sudo -H'. Only valid at PERM_RUNAS. */ if ((sudo_mode & MODE_RESET_HOME) && runas_pw->pw_dir) - insert_env(newenvp, format_env("HOME", runas_pw->pw_dir)); + insert_env(format_env("HOME", runas_pw->pw_dir), 1); /* Set PS1 if SUDO_PS1 is set. */ if (ps1) - insert_env(newenvp, ps1); + insert_env(ps1, 1); /* Add the SUDO_COMMAND envariable (cmnd + args). */ if (user_args) { easprintf(&cp, "SUDO_COMMAND=%s %s", user_cmnd, user_args); - insert_env(newenvp, cp); + insert_env(cp, 1); } else - insert_env(newenvp, format_env("SUDO_COMMAND", user_cmnd)); + insert_env(format_env("SUDO_COMMAND", user_cmnd), 1); /* Add the SUDO_USER, SUDO_UID, SUDO_GID environment variables. */ - insert_env(newenvp, format_env("SUDO_USER", user_name)); - easprintf(&cp, "SUDO_UID=%ld", (long) user_uid); - insert_env(newenvp, cp); - easprintf(&cp, "SUDO_GID=%ld", (long) user_gid); - insert_env(newenvp, cp); - - return(newenvp); -} - -void -dump_badenv() -{ - struct list_member *cur; - - puts("Default table of environment variables to clear"); - for (cur = def_list(I_ENV_DELETE); cur; cur = cur->next) - printf("\t%s\n", cur->value); + insert_env(format_env("SUDO_USER", user_name), 1); + easprintf(&cp, "SUDO_UID=%lu", (unsigned long) user_uid); + insert_env(cp, 1); + easprintf(&cp, "SUDO_GID=%lu", (unsigned long) user_gid); + insert_env(cp, 1); - puts("Default table of environment variables to sanity check"); - for (cur = def_list(I_ENV_CHECK); cur; cur = cur->next) - printf("\t%s\n", cur->value); + return(new_environ); } void init_envtables() { struct list_member *cur; - char **p; + const char **p; /* Fill in "env_delete" variable. */ for (p = initial_badenv_table; *p; p++) { diff --git a/usr.bin/sudo/find_path.c b/usr.bin/sudo/find_path.c index b4282cfa80b..7288b6afa15 100644 --- a/usr.bin/sudo/find_path.c +++ b/usr.bin/sudo/find_path.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,7 +61,7 @@ #include "sudo.h" #ifndef lint -static const char rcsid[] = "$Sudo: find_path.c,v 1.98 2001/12/14 06:40:03 millert Exp $"; +static const char rcsid[] = "$Sudo: find_path.c,v 1.101 2003/03/15 20:31:02 millert Exp $"; #endif /* lint */ /* @@ -82,6 +82,7 @@ find_path(infile, outfile, path) char *origpath; /* so we can free path later */ char *result = NULL; /* result of path/file lookup */ int checkdot = 0; /* check current dir? */ + int len; /* length parameter */ if (strlen(infile) >= MAXPATHLEN) { (void) fprintf(stderr, "%s: path too long: %s\n", Argv[0], infile); @@ -93,7 +94,7 @@ find_path(infile, outfile, path) * there is no need to look at $PATH. */ if (strchr(infile, '/')) { - (void) strcpy(command, infile); + strlcpy(command, infile, sizeof(command)); /* paranoia */ if (sudo_goodpath(command)) { *outfile = command; return(FOUND); @@ -128,11 +129,11 @@ find_path(infile, outfile, path) /* * Resolve the path and exit the loop if found. */ - if (strlen(path) + strlen(infile) + 1 >= MAXPATHLEN) { + len = snprintf(command, sizeof(command), "%s/%s", path, infile); + if (len <= 0 || len >= sizeof(command)) { (void) fprintf(stderr, "%s: path too long: %s\n", Argv[0], infile); exit(1); } - (void) sprintf(command, "%s/%s", path, infile); if ((result = sudo_goodpath(command))) break; diff --git a/usr.bin/sudo/install-sh b/usr.bin/sudo/install-sh index 73f3d81bb33..24c80b9b6c1 100644 --- a/usr.bin/sudo/install-sh +++ b/usr.bin/sudo/install-sh @@ -1,7 +1,7 @@ #! /bin/sh ## (From INN-1.4, written by Rich Salz) -## $Revision: 1.5 $ +## $Revision: 1.6 $ ## A script to install files and directories. PROGNAME=`basename $0` diff --git a/usr.bin/sudo/interfaces.c b/usr.bin/sudo/interfaces.c index eda0d60d091..f50a0c509cc 100644 --- a/usr.bin/sudo/interfaces.c +++ b/usr.bin/sudo/interfaces.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,7 +99,7 @@ struct rtentry; #include "interfaces.h" #ifndef lint -static const char rcsid[] = "$Sudo: interfaces.c,v 1.63 2002/01/18 19:17:07 millert Exp $"; +static const char rcsid[] = "$Sudo: interfaces.c,v 1.68 2003/03/15 20:31:02 millert Exp $"; #endif /* lint */ @@ -121,7 +121,7 @@ load_interfaces() return; /* Allocate space for the interfaces list. */ - for (ifa = ifaddrs; ifa -> ifa_next; ifa = ifa -> ifa_next) { + for (ifa = ifaddrs; ifa != NULL; ifa = ifa -> ifa_next) { /* Skip interfaces marked "down" and "loopback". */ if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP) || (ifa->ifa_flags & IFF_LOOPBACK)) @@ -134,11 +134,13 @@ load_interfaces() break; } } + if (num_interfaces == 0) + return; interfaces = - (struct interface *) emalloc(sizeof(struct interface) * num_interfaces); + (struct interface *) emalloc2(num_interfaces, sizeof(struct interface)); /* Store the ip addr / netmask pairs. */ - for (ifa = ifaddrs, i = 0; ifa -> ifa_next; ifa = ifa -> ifa_next) { + for (ifa = ifaddrs, i = 0; ifa != NULL; ifa = ifa -> ifa_next) { /* Skip interfaces marked "down" and "loopback". */ if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP) || (ifa->ifa_flags & IFF_LOOPBACK)) @@ -191,7 +193,7 @@ load_interfaces() } /* - * Get interface configuration or return (leaving num_interfaces 0) + * Get interface configuration or return (leaving num_interfaces == 0) */ for (;;) { ifconf_buf = erealloc(ifconf_buf, len); @@ -218,8 +220,9 @@ load_interfaces() } /* Allocate space for the maximum number of interfaces that could exist. */ - n = ifconf->ifc_len / sizeof(struct ifreq); - interfaces = (struct interface *) emalloc(sizeof(struct interface) * n); + if ((n = ifconf->ifc_len / sizeof(struct ifreq)) == 0) + return; + interfaces = (struct interface *) emalloc2(n, sizeof(struct interface)); /* For each interface, store the ip address and netmask. */ for (i = 0; i < ifconf->ifc_len; ) { @@ -291,8 +294,8 @@ load_interfaces() /* If the expected size < real size, realloc the array. */ if (n != num_interfaces) { if (num_interfaces != 0) - interfaces = (struct interface *) erealloc(interfaces, - sizeof(struct interface) * num_interfaces); + interfaces = (struct interface *) erealloc3(interfaces, + num_interfaces, sizeof(struct interface)); else free(interfaces); } diff --git a/usr.bin/sudo/logging.c b/usr.bin/sudo/logging.c index 6e91107a902..3a09ac58a7f 100644 --- a/usr.bin/sudo/logging.c +++ b/usr.bin/sudo/logging.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994-1996,1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1994-1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -65,7 +65,7 @@ #include "sudo.h" #ifndef lint -static const char rcsid[] = "$Sudo: logging.c,v 1.153 2002/01/16 21:28:25 millert Exp $"; +static const char rcsid[] = "$Sudo: logging.c,v 1.157 2003/03/15 20:31:02 millert Exp $"; #endif /* lint */ static void do_syslog __P((int, char *)); @@ -137,7 +137,7 @@ do_syslog(pri, msg) int pri; char *msg; { - int count; + size_t count; char *p; char *tmp; char save; @@ -188,9 +188,10 @@ do_logfile(msg) char *beg, *oldend, *end; FILE *fp; mode_t oldmask; - int maxlen = def_ival(I_LOGLINELEN); + size_t maxlen; oldmask = umask(077); + maxlen = def_ival(I_LOGLINELEN) > 0 ? def_ival(I_LOGLINELEN) : 0; fp = fopen(def_str(I_LOGFILE), "a"); (void) umask(oldmask); if (fp == NULL) { @@ -365,7 +366,7 @@ log_error(va_alist) /* Become root if we are not already to avoid user control */ if (geteuid() != 0) - set_perms(PERM_ROOT, 0); + set_perms(PERM_ROOT); /* Expand printf-style format + args. */ evasprintf(&message, fmt, ap); @@ -508,10 +509,10 @@ send_mail(line) * (so user cannot kill it) or as the user (for the paranoid). */ #ifndef NO_ROOT_MAILER - set_perms(PERM_FULL_ROOT, 0); + set_perms(PERM_FULL_ROOT); execve(mpath, argv, root_envp); #else - set_perms(PERM_FULL_USER, 0); + set_perms(PERM_FULL_USER); execv(mpath, argv); #endif /* NO_ROOT_MAILER */ _exit(127); diff --git a/usr.bin/sudo/mkinstalldirs b/usr.bin/sudo/mkinstalldirs index fa2550e6ad7..e3fda0ce98b 100644 --- a/usr.bin/sudo/mkinstalldirs +++ b/usr.bin/sudo/mkinstalldirs @@ -4,7 +4,7 @@ # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 1.2 2002/01/03 03:49:16 millert Exp $ +# $Sudo: mkinstalldirs,v 1.4 2003/01/20 19:39:04 millert Exp $ umask 022 errstatus=0 @@ -15,61 +15,100 @@ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do - case "${1}" in - -h | --help | --h* ) # -h for help - echo "${usage}" 1>&2; exit 0 ;; - -m ) # -m PERM arg - shift - test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } - dirmode="${1}" - shift ;; - -- ) shift; break ;; # stop option processing - -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option - * ) break ;; # first non-opt arg - esac + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" 1>&2 + exit 0 + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac done for file do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - - lasterr="" - chmod $dirmode "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp="$pathcomp/" - done + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +case $dirmode in + '') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi + ;; + *) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi + ;; +esac + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done done exit $errstatus # Local Variables: -# mode:shell-script -# sh-indentation:3 +# mode: shell-script +# sh-indentation: 2 # End: +# mkinstalldirs ends here diff --git a/usr.bin/sudo/parse.c b/usr.bin/sudo/parse.c index 97c03069fc6..a30a70b1eea 100644 --- a/usr.bin/sudo/parse.c +++ b/usr.bin/sudo/parse.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2002 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * This code is derived from software contributed by Chris Jepeway. @@ -96,7 +96,7 @@ #endif /* HAVE_FNMATCH */ #ifndef lint -static const char rcsid[] = "$Sudo: parse.c,v 1.137 2002/03/16 00:44:47 millert Exp $"; +static const char rcsid[] = "$Sudo: parse.c,v 1.140 2003/03/15 20:31:02 millert Exp $"; #endif /* lint */ /* @@ -125,7 +125,7 @@ sudoers_lookup(pwflag) int nopass; /* Become sudoers file owner */ - set_perms(PERM_SUDOERS, 0); + set_perms(PERM_SUDOERS); /* We opened _PATH_SUDOERS in check_sudoers() so just rewind it. */ rewind(sudoers_fp); @@ -140,7 +140,7 @@ sudoers_lookup(pwflag) keepall = TRUE; /* Need to be root while stat'ing things in the parser. */ - set_perms(PERM_ROOT, 0); + set_perms(PERM_ROOT); error = yyparse(); /* Close the sudoers file now that we are done with it. */ @@ -343,10 +343,9 @@ command_matches(cmnd, cmnd_args, path, sudoers_args) while ((dent = readdir(dirp)) != NULL) { /* ignore paths > MAXPATHLEN (XXX - log) */ - if (plen + NAMLEN(dent) >= sizeof(buf)) + if (strlcpy(buf, path, sizeof(buf)) >= sizeof(buf) || + strlcat(buf, dent->d_name, sizeof(buf)) >= sizeof(buf)) continue; - strcpy(buf, path); - strcat(buf, dent->d_name); /* only stat if basenames are the same */ if (strcmp(cmnd_base, dent->d_name) != 0 || stat(buf, &pst) == -1) diff --git a/usr.bin/sudo/parse.lex b/usr.bin/sudo/parse.lex index 2c08c32de73..7fea9c403f1 100644 --- a/usr.bin/sudo/parse.lex +++ b/usr.bin/sudo/parse.lex @@ -1,6 +1,6 @@ %{ /* - * Copyright (c) 1996, 1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * This code is derived from software contributed by Chris Jepeway. @@ -68,7 +68,7 @@ #include <sudo.tab.h> #ifndef lint -static const char rcsid[] = "$Sudo: parse.lex,v 1.119 2002/03/16 00:44:47 millert Exp $"; +static const char rcsid[] = "$Sudo: parse.lex,v 1.126 2003/03/15 20:31:02 millert Exp $"; #endif /* lint */ #undef yywrap /* guard against a yywrap macro */ @@ -99,7 +99,7 @@ extern void yyerror __P((char *)); OCTET (1?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]) DOTTEDQUAD {OCTET}(\.{OCTET}){3} HOSTNAME [[:alnum:]_-]+ -WORD ([^#@!=:,\(\) \t\n\\]|\\[^\n])+ +WORD ([^#>@!=:,\(\) \t\n\\]|\\[^\n])+ ENVAR ([^#!=, \t\n\\]|\\[^\n])([^#=, \t\n\\]|\\[^\n])* DEFVAR [a-z_]+ @@ -175,12 +175,15 @@ DEFVAR [a-z_]+ } /* a command line arg */ } -<INITIAL>^Defaults[:@]? { +<INITIAL>^Defaults[:@>]? { BEGIN GOTDEFS; switch (yytext[8]) { case ':': LEXTRACE("DEFAULTS_USER "); return(DEFAULTS_USER); + case '>': + LEXTRACE("DEFAULTS_RUNAS "); + return(DEFAULTS_RUNAS); case '@': LEXTRACE("DEFAULTS_HOST "); return(DEFAULTS_HOST); @@ -362,8 +365,10 @@ fill(s, len) int i, j; yylval.string = (char *) malloc(len + 1); - if (yylval.string == NULL) + if (yylval.string == NULL) { yyerror("unable to allocate memory"); + return; + } /* Copy the string and collapse any escaped characters. */ for (i = 0, j = 0; i < len; i++, j++) { @@ -382,13 +387,14 @@ fill_cmnd(s, len) { arg_len = arg_size = 0; - yylval.command.cmnd = (char *) malloc(len + 1); - if (yylval.command.cmnd == NULL) + yylval.command.cmnd = (char *) malloc(++len); + if (yylval.command.cmnd == NULL) { yyerror("unable to allocate memory"); + return; + } /* copy the string and NULL-terminate it (escapes handled by fnmatch) */ - (void) strncpy(yylval.command.cmnd, s, len); - yylval.command.cmnd[len] = '\0'; + (void) strlcpy(yylval.command.cmnd, s, len); yylval.command.args = NULL; } @@ -402,41 +408,35 @@ fill_args(s, len, addspace) int new_len; char *p; - /* - * If first arg, malloc() some room, else if we don't - * have enough space realloc() some more. - */ if (yylval.command.args == NULL) { addspace = 0; new_len = len; + } else + new_len = arg_len + len + addspace; + if (new_len >= arg_size) { + /* Allocate more space than we need for subsequent args */ while (new_len >= (arg_size += COMMANDARGINC)) ; - yylval.command.args = (char *) malloc(arg_size); - if (yylval.command.args == NULL) - yyerror("unable to allocate memory"); - } else { - new_len = arg_len + len + addspace; - - if (new_len >= arg_size) { - /* Allocate more space than we need for subsequent args */ - while (new_len >= (arg_size += COMMANDARGINC)) - ; - - if ((p = (char *) realloc(yylval.command.args, arg_size)) == NULL) { + p = yylval.command.args ? + (char *) realloc(yylval.command.args, arg_size) : + (char *) malloc(arg_size); + if (p == NULL) { + if (yylval.command.args != NULL) free(yylval.command.args); - yyerror("unable to allocate memory"); - } else - yylval.command.args = p; - } + yyerror("unable to allocate memory"); + return; + } else + yylval.command.args = p; } /* Efficiently append the arg (with a leading space if needed). */ p = yylval.command.args + arg_len; if (addspace) *p++ = ' '; - (void) strcpy(p, s); + if (strlcpy(p, s, arg_size - (p - yylval.command.args)) != len) + yyerror("fill_args: buffer overflow"); /* paranoia */ arg_len = new_len; } diff --git a/usr.bin/sudo/parse.yacc b/usr.bin/sudo/parse.yacc index 7a6fb4ef57c..1bc4cd141cf 100644 --- a/usr.bin/sudo/parse.yacc +++ b/usr.bin/sudo/parse.yacc @@ -1,6 +1,6 @@ %{ /* - * Copyright (c) 1996, 1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * This code is derived from software contributed by Chris Jepeway. @@ -85,7 +85,7 @@ #endif /* HAVE_LSEARCH */ #ifndef lint -static const char rcsid[] = "$Sudo: parse.yacc,v 1.180 2002/03/16 00:44:47 millert Exp $"; +static const char rcsid[] = "$Sudo: parse.yacc,v 1.187 2003/03/15 20:31:02 millert Exp $"; #endif /* lint */ /* @@ -117,7 +117,7 @@ int top = 0, stacksize = 0; do { \ if (top >= stacksize) { \ while ((stacksize += STACKINCREMENT) < top); \ - match = (struct matchstack *) erealloc(match, sizeof(struct matchstack) * stacksize); \ + match = (struct matchstack *) erealloc3(match, stacksize, sizeof(struct matchstack)); \ } \ match[top].user = -1; \ match[top].cmnd = -1; \ @@ -131,7 +131,7 @@ int top = 0, stacksize = 0; do { \ if (top >= stacksize) { \ while ((stacksize += STACKINCREMENT) < top); \ - match = (struct matchstack *) erealloc(match, sizeof(struct matchstack) * stacksize); \ + match = (struct matchstack *) erealloc3(match, stacksize, sizeof(struct matchstack)); \ } \ match[top].user = match[top-1].user; \ match[top].cmnd = match[top-1].cmnd; \ @@ -229,6 +229,7 @@ yyerror(s) %token <tok> DEFAULTS /* Defaults entry */ %token <tok> DEFAULTS_HOST /* Host-specific defaults entry */ %token <tok> DEFAULTS_USER /* User-specific defaults entry */ +%token <tok> DEFAULTS_RUNAS /* Runas-specific defaults entry */ %token <tok> RUNAS /* ( runas_list ) */ %token <tok> NOPASSWD /* no passwd req for command */ %token <tok> PASSWD /* passwd req for command (default) */ @@ -281,6 +282,7 @@ entry : COMMENT ; defaults_line : defaults_type defaults_list + ; defaults_type : DEFAULTS { defaults_matches = TRUE; @@ -289,6 +291,10 @@ defaults_type : DEFAULTS { defaults_matches = user_matches; pop; } + | DEFAULTS_RUNAS { push; } runaslist { + defaults_matches = $3 == TRUE; + pop; + } | DEFAULTS_HOST { push; } hostlist { defaults_matches = host_matches; pop; @@ -297,6 +303,7 @@ defaults_type : DEFAULTS { defaults_list : defaults_entry | defaults_entry ',' defaults_list + ; defaults_entry : DEFVAR { if (defaults_matches == TRUE && @@ -341,6 +348,7 @@ defaults_entry : DEFVAR { free($1); free($3); } + ; privileges : privilege | privileges ':' privilege @@ -369,6 +377,7 @@ ophost : host { if ($2 != -1) host_matches = ! $2; } + ; host : ALL { $$ = TRUE; @@ -518,6 +527,7 @@ oprunasuser : runasuser { ; } /* Set $$ to the negation of runasuser */ $$ = ($3 == -1 ? -1 : ! $3); } + ; runasuser : WORD { if (printmatches == TRUE) { @@ -706,8 +716,10 @@ hostaliases : hostalias hostalias : ALIAS { push; } '=' hostlist { if ((host_matches != -1 || pedantic) && - !add_alias($1, HOST_ALIAS, host_matches)) + !add_alias($1, HOST_ALIAS, host_matches)) { + yyerror(NULL); YYERROR; + } pop; } ; @@ -731,8 +743,10 @@ cmndalias : ALIAS { } } '=' cmndlist { if ((cmnd_matches != -1 || pedantic) && - !add_alias($1, CMND_ALIAS, cmnd_matches)) + !add_alias($1, CMND_ALIAS, cmnd_matches)) { + yyerror(NULL); YYERROR; + } pop; free($1); @@ -759,8 +773,10 @@ runasalias : ALIAS { } } '=' runaslist { if (($4 != -1 || pedantic) && - !add_alias($1, RUNAS_ALIAS, $4)) + !add_alias($1, RUNAS_ALIAS, $4)) { + yyerror(NULL); YYERROR; + } free($1); if (printmatches == TRUE) @@ -774,8 +790,10 @@ useraliases : useralias useralias : ALIAS { push; } '=' userlist { if ((user_matches != -1 || pedantic) && - !add_alias($1, USER_ALIAS, user_matches)) + !add_alias($1, USER_ALIAS, user_matches)) { + yyerror(NULL); YYERROR; + } pop; free($1); } @@ -793,6 +811,7 @@ opuser : user { if ($2 != -1) user_matches = ! $2; } + ; user : WORD { if (strcmp($1, user_name) == 0) @@ -828,8 +847,10 @@ user : WORD { (void) fprintf(stderr, "%s: undeclared User_Alias `%s' referenced near line %d\n", (pedantic == 1) ? "Warning" : "Error", $1, sudolineno); - if (pedantic > 1) + if (pedantic > 1) { + yyerror(NULL); YYERROR; + } } $$ = -1; } @@ -1000,21 +1021,21 @@ dumpaliases() void list_matches() { - int i; + size_t count; char *p; struct generic_alias *ga, key; (void) printf("User %s may run the following commands on this host:\n", user_name); - for (i = 0; i < cm_list_len; i++) { + for (count = 0; count < cm_list_len; count++) { /* Print the runas list. */ (void) fputs(" ", stdout); - if (cm_list[i].runas) { + if (cm_list[count].runas) { (void) putchar('('); - p = strtok(cm_list[i].runas, ", "); + p = strtok(cm_list[count].runas, ", "); do { - if (p != cm_list[i].runas) + if (p != cm_list[count].runas) (void) fputs(", ", stdout); key.alias = p; @@ -1031,32 +1052,32 @@ list_matches() } /* Is a password required? */ - if (cm_list[i].nopasswd == TRUE && def_flag(I_AUTHENTICATE)) + if (cm_list[count].nopasswd == TRUE && def_flag(I_AUTHENTICATE)) (void) fputs("NOPASSWD: ", stdout); - else if (cm_list[i].nopasswd == FALSE && !def_flag(I_AUTHENTICATE)) + else if (cm_list[count].nopasswd == FALSE && !def_flag(I_AUTHENTICATE)) (void) fputs("PASSWD: ", stdout); /* Print the actual command or expanded Cmnd_Alias. */ - key.alias = cm_list[i].cmnd; + key.alias = cm_list[count].cmnd; key.type = CMND_ALIAS; if ((ga = (struct generic_alias *) lfind((VOID *) &key, (VOID *) &ga_list[0], &ga_list_len, sizeof(key), genaliascmp))) (void) puts(ga->entries); else - (void) puts(cm_list[i].cmnd); + (void) puts(cm_list[count].cmnd); } /* Be nice and free up space now that we are done. */ - for (i = 0; i < ga_list_len; i++) { - free(ga_list[i].alias); - free(ga_list[i].entries); + for (count = 0; count < ga_list_len; count++) { + free(ga_list[count].alias); + free(ga_list[count].entries); } free(ga_list); ga_list = NULL; - for (i = 0; i < cm_list_len; i++) { - free(cm_list[i].runas); - free(cm_list[i].cmnd); + for (count = 0; count < cm_list_len; count++) { + free(cm_list[count].runas); + free(cm_list[count].cmnd); } free(cm_list); cm_list = NULL; @@ -1088,6 +1109,7 @@ append(src, dstp, dst_len, dst_size, separator) /* Assumes dst will be NULL if not set. */ if (dst == NULL) { dst = (char *) emalloc(BUFSIZ); + *dst = '\0'; *dst_size = BUFSIZ; *dst_len = 0; *dstp = dst; @@ -1103,12 +1125,10 @@ append(src, dstp, dst_len, dst_size, separator) } /* Copy src -> dst adding a separator if appropriate and adjust len. */ - dst += *dst_len; - *dst_len += src_len; - *dst = '\0'; if (separator) - (void) strcat(dst, separator); - (void) strcat(dst, src); + (void) strlcat(dst, separator, *dst_size); + (void) strlcat(dst, src, *dst_size); + *dst_len += src_len; } /* @@ -1139,7 +1159,7 @@ expand_ga_list() while ((ga_list_size += STACKINCREMENT) < ga_list_len) ; ga_list = (struct generic_alias *) - erealloc(ga_list, sizeof(struct generic_alias) * ga_list_size); + erealloc3(ga_list, ga_list_size, sizeof(struct generic_alias)); } ga_list[ga_list_len - 1].entries = NULL; @@ -1158,7 +1178,7 @@ expand_match_list() if (cm_list == NULL) cm_list_len = 0; /* start at 0 since it is a subscript */ cm_list = (struct command_match *) - erealloc(cm_list, sizeof(struct command_match) * cm_list_size); + erealloc3(cm_list, cm_list_size, sizeof(struct command_match)); } cm_list[cm_list_len].runas = cm_list[cm_list_len].cmnd = NULL; @@ -1185,7 +1205,7 @@ init_parser() /* Allocate space for the matching stack. */ stacksize = STACKINCREMENT; - match = (struct matchstack *) emalloc(sizeof(struct matchstack) * stacksize); + match = (struct matchstack *) emalloc2(stacksize, sizeof(struct matchstack)); /* Allocate space for the match list (for `sudo -l'). */ if (printmatches == TRUE) diff --git a/usr.bin/sudo/set_perms.c b/usr.bin/sudo/set_perms.c index cd750699266..f84a62c3f11 100644 --- a/usr.bin/sudo/set_perms.c +++ b/usr.bin/sudo/set_perms.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994-1996,1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1994-1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,7 +66,7 @@ #include "sudo.h" #ifndef lint -static const char rcsid[] = "$Sudo: set_perms.c,v 1.12 2002/01/22 02:00:25 millert Exp $"; +static const char rcsid[] = "$Sudo: set_perms.c,v 1.20 2003/03/15 20:31:02 millert Exp $"; #endif /* lint */ /* @@ -75,16 +75,16 @@ static const char rcsid[] = "$Sudo: set_perms.c,v 1.12 2002/01/22 02:00:25 mille static void runas_setup __P((void)); static void fatal __P((char *, int)); -#if !defined(NO_SAVED_IDS) && defined(_SC_SAVED_IDS) && defined(_SC_VERSION) +#if !defined(HAVE_SETRESUID) && !defined(HAVE_SETREUID) && \ + !defined(NO_SAVED_IDS) && defined(_SC_SAVED_IDS) && defined(_SC_VERSION) /* * Set real and effective uids and gids based on perm. * Since we have POSIX saved IDs we can get away with just * toggling the effective uid/gid unless we are headed for an exec(). */ void -set_perms_posix(perm, sudo_mode) +set_perms_posix(perm) int perm; - int sudo_mode; { int error; @@ -145,32 +145,109 @@ set_perms_posix(perm, sudo_mode) fatal("seteuid(SUDOERS_UID)", 1); } break; + case PERM_TIMESTAMP: + if (seteuid(timestamp_uid)) + fatal("seteuid(timestamp_uid)", 1); + break; + } } #endif /* !NO_SAVED_IDS && _SC_SAVED_IDS && _SC_VERSION */ -#ifdef HAVE_SETREUID +#ifdef HAVE_SETRESUID +/* + * Set real and effective and saved uids and gids based on perm. + * We always retain a saved uid of 0 unless we are headed for an exec(). + * We only flip the effective gid since it only changes for PERM_SUDOERS. + * This version of set_perms() works fine with the "stay_setuid" option. + */ +void +set_perms_suid(perm) + int perm; +{ + int error; + + switch (perm) { + case PERM_FULL_ROOT: + case PERM_ROOT: + if (setresuid(0, 0, 0)) + fatal("setresuid(0, 0, 0) failed, your operating system may have a broken setresuid() function\nTry running configure with --disable-setresuid", 0); + break; + + case PERM_USER: + (void) setresgid(-1, user_gid, -1); + if (setresuid(user_uid, user_uid, 0)) + fatal("setresuid(user_uid, user_uid, 0)", 1); + break; + + case PERM_FULL_USER: + /* headed for exec() */ + (void) setgid(user_gid); + if (setresuid(user_uid, user_uid, user_uid)) + fatal("setresuid(user_uid, user_uid, user_uid)", 1); + break; + + case PERM_RUNAS: + /* headed for exec(), assume euid == 0 */ + runas_setup(); + error = setresuid(def_flag(I_STAY_SETUID) ? + user_uid : runas_pw->pw_uid, + runas_pw->pw_uid, runas_pw->pw_uid); + if (error) + fatal("unable to change to runas uid", 1); + break; + + case PERM_SUDOERS: + /* assume euid == 0, ruid == user */ + if (setresgid(-1, SUDOERS_GID, -1)) + fatal("unable to change to sudoers gid", 1); + + /* + * If SUDOERS_UID == 0 and SUDOERS_MODE + * is group readable we use a non-zero + * uid in order to avoid NFS lossage. + * Using uid 1 is a bit bogus but should + * work on all OS's. + */ + if (SUDOERS_UID == 0) { + if ((SUDOERS_MODE & 040) && setresuid(0, 1, 0)) + fatal("setresuid(0, 1, 0)", 1); + } else { + if (setresuid(0, SUDOERS_UID, 0)) + fatal("setresuid(0, SUDOERS_UID, 0)", 1); + } + break; + case PERM_TIMESTAMP: + if (setresuid(0, timestamp_uid, 0)) + fatal("setresuid(0, timestamp_uid, 0)", 1); + break; + } +} + +#else +# ifdef HAVE_SETREUID + /* * Set real and effective uids and gids based on perm. * We always retain a real or effective uid of 0 unless * we are headed for an exec(). + * This version of set_perms() works fine with the "stay_setuid" option. */ void -set_perms_fallback(perm, sudo_mode) +set_perms_suid(perm) int perm; - int sudo_mode; { int error; switch (perm) { case PERM_FULL_ROOT: case PERM_ROOT: - if (setuid(0)) - fatal("setuid(0) failed, your operating system may have broken POSIX saved ID support\nTry running configure with --disable-setreuid", 0); + if (setreuid(0, 0)) + fatal("setreuid(0, 0) failed, your operating system may have a broken setreuid() function\nTry running configure with --disable-setreuid", 0); break; case PERM_USER: - (void) setegid(user_gid); + (void) setregid(-1, user_gid); if (setreuid(0, user_uid)) fatal("setreuid(0, user_uid)", 1); break; @@ -178,24 +255,23 @@ set_perms_fallback(perm, sudo_mode) case PERM_FULL_USER: /* headed for exec() */ (void) setgid(user_gid); - if (setuid(user_uid)) - fatal("setuid(user_uid)", 1); + if (setreuid(user_uid, user_uid)) + fatal("setreuid(user_uid, user_uid)", 1); break; case PERM_RUNAS: /* headed for exec(), assume euid == 0 */ runas_setup(); - if (def_flag(I_STAY_SETUID)) - error = setreuid(user_uid, runas_pw->pw_uid); - else - error = setuid(runas_pw->pw_uid); + error = setreuid(def_flag(I_STAY_SETUID) ? + user_uid : runas_pw->pw_uid, + runas_pw->pw_uid); if (error) fatal("unable to change to runas uid", 1); break; case PERM_SUDOERS: /* assume euid == 0, ruid == user */ - if (setegid(SUDOERS_GID)) + if (setregid(-1, SUDOERS_GID)) fatal("unable to change to sudoers gid", 1); /* @@ -213,24 +289,27 @@ set_perms_fallback(perm, sudo_mode) fatal("setreuid(0, SUDOERS_UID)", 1); } break; + case PERM_TIMESTAMP: + if (setreuid(0, timestamp_uid)) + fatal("setreuid(0, timestamp_uid)", 1); + break; } } -#else +# else /* * Set real and effective uids and gids based on perm. * NOTE: does not support the "stay_setuid" option. */ void -set_perms_fallback(perm, sudo_mode) +set_perms_nosuid(perm) int perm; - int sudo_mode; { /* * Since we only have setuid() and seteuid() we have to set - * real and effective uidss to 0 initially. + * real and effective uids to 0 initially. */ if (setuid(0)) fatal("setuid(0)", 1); @@ -276,9 +355,14 @@ set_perms_fallback(perm, sudo_mode) fatal("seteuid(SUDOERS_UID)", 1); } break; + case PERM_TIMESTAMP: + if (seteuid(timestamp_uid)) + fatal("seteuid(timestamp_uid)", 1); + break; } } -#endif /* HAVE_SETREUID */ +# endif /* HAVE_SETREUID */ +#endif /* HAVE_SETRESUID */ static void runas_setup() @@ -308,17 +392,17 @@ runas_setup() perror("cannot set gid to runas gid"); error = setusercontext(lc, runas_pw, runas_pw->pw_uid, flags); - if (error) - perror("unable to set user context"); - } else -#endif /* HAVE_LOGIN_CAP_H */ - { - if (setgid(runas_pw->pw_gid)) { - if (runas_pw->pw_gid != 0) + if (error) { + if (runas_pw->pw_uid != 0) fatal("unable to set user context", 1); else - perror("cannot set gid to runas gid"); + perror("unable to set user context"); } + } else +#endif /* HAVE_LOGIN_CAP_H */ + { + if (setgid(runas_pw->pw_gid)) + perror("cannot set gid to runas gid"); #ifdef HAVE_INITGROUPS /* * Initialize group vector unless asked not to. diff --git a/usr.bin/sudo/sudo.8 b/usr.bin/sudo/sudo.8 index fbdbfc31974..0040a8e9658 100644 --- a/usr.bin/sudo/sudo.8 +++ b/usr.bin/sudo/sudo.8 @@ -1,28 +1,25 @@ -.\" Automatically generated by Pod::Man version 1.15 -.\" Thu Apr 25 09:34:52 2002 -.\" -.\" Copyright (c) 1994-1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com> +.\" Copyright (c) 1994-1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> .\" All rights reserved. -.\" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: -.\" +.\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. -.\" +.\" .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" +.\" .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission .\" from the author. -.\" +.\" .\" 4. Products derived from this software may not be called "Sudo" nor .\" may "Sudo" appear in their names without specific prior written .\" permission from the author. -.\" +.\" .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY .\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL @@ -33,9 +30,12 @@ .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $Sudo: sudo.man.in,v 1.16 2003/03/15 20:33:31 millert Exp $ +.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: -.\" ====================================================================== +.\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp @@ -48,12 +48,6 @@ .if t .sp .5v .if n .sp .. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. .de Vb \" Begin verbatim text .ft CW .nf @@ -61,15 +55,14 @@ .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used -.\" to do unbreakable dashes and therefore won't be available. \*(C` and -.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ @@ -89,10 +82,10 @@ . ds R" '' 'br\} .\" -.\" If the F register is turned on, we'll generate index entries on stderr -.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and -.\" index entries marked with X<> in POD. Of course, you'll have to process -.\" the output yourself in some meaningful fashion. +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" @@ -101,14 +94,13 @@ . rr F .\} .\" -.\" For nroff, turn off justification. Always turn off hyphenation; it -.\" makes way too many mistakes in technical documents. +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. -.bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 @@ -168,18 +160,17 @@ . ds Ae AE .\} .rm #[ #] #H #V #F C -.\" ====================================================================== +.\" ======================================================================== .\" -.IX Title "sudo 8" -.TH sudo 8 "1.6.6" "April 25, 2002" "MAINTENANCE COMMANDS" -.UC +.IX Title "SUDO 8" +.TH SUDO 8 "March 13, 2003" "1.6.7" "MAINTENANCE COMMANDS" .SH "NAME" sudo \- execute a command as another user .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBsudo\fR \fB\-V\fR | \fB\-h\fR | \fB\-l\fR | \fB\-L\fR | \fB\-v\fR | \fB\-k\fR | \fB\-K\fR | \fB\-s\fR | [ \fB\-H\fR ] [\fB\-P\fR ] [\fB\-S\fR ] [ \fB\-b\fR ] | [ \fB\-p\fR \fIprompt\fR ] -[ \fB\-c\fR \fIclass\fR|\fI-\fR ] [ \fB\-a\fR \fIauth_type\fR ] +[ \fB\-c\fR \fIclass\fR|\fI\-\fR ] [ \fB\-a\fR \fIauth_type\fR ] [ \fB\-u\fR \fIusername\fR|\fI#uid\fR ] \fIcommand\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" @@ -216,55 +207,80 @@ or via the \fIsudoers\fR file. .SH "OPTIONS" .IX Header "OPTIONS" \&\fBsudo\fR accepts the following command line options: -.Ip "\-V" 4 +.IP "\-V" 4 .IX Item "-V" The \fB\-V\fR (\fIversion\fR) option causes \fBsudo\fR to print the version number and exit. If the invoking user is already root the \fB\-V\fR option will print out a list of the defaults \fBsudo\fR was compiled with as well as the machine's local network addresses. -.Ip "\-l" 4 +.IP "\-l" 4 .IX Item "-l" The \fB\-l\fR (\fIlist\fR) option will list out the allowed (and forbidden) commands for the user on the current host. -.Ip "\-L" 4 +.IP "\-L" 4 .IX Item "-L" The \fB\-L\fR (\fIlist\fR defaults) option will list out the parameters that may be set in a \fIDefaults\fR line along with a short description for each. This option is useful in conjunction with \fIgrep\fR\|(1). -.Ip "\-h" 4 +.IP "\-h" 4 .IX Item "-h" The \fB\-h\fR (\fIhelp\fR) option causes \fBsudo\fR to print a usage message and exit. -.Ip "\-v" 4 +.IP "\-v" 4 .IX Item "-v" If given the \fB\-v\fR (\fIvalidate\fR) option, \fBsudo\fR will update the user's timestamp, prompting for the user's password if necessary. This extends the \fBsudo\fR timeout for another \f(CW\*(C`5\*(C'\fR minutes (or whatever the timeout is set to in \fIsudoers\fR) but does not run a command. -.Ip "\-k" 4 +.IP "\-k" 4 .IX Item "-k" The \fB\-k\fR (\fIkill\fR) option to \fBsudo\fR invalidates the user's timestamp by setting the time on it to the epoch. The next time \fBsudo\fR is run a password will be required. This option does not require a password and was added to allow a user to revoke \fBsudo\fR permissions from a .logout file. -.Ip "\-K" 4 +.IP "\-K" 4 .IX Item "-K" The \fB\-K\fR (sure \fIkill\fR) option to \fBsudo\fR removes the user's timestamp entirely. Likewise, this option does not require a password. -.Ip "\-b" 4 +.IP "\-b" 4 .IX Item "-b" The \fB\-b\fR (\fIbackground\fR) option tells \fBsudo\fR to run the given command in the background. Note that if you use the \fB\-b\fR option you cannot use shell job control to manipulate the process. -.Ip "\-p" 4 +.IP "\-p" 4 .IX Item "-p" The \fB\-p\fR (\fIprompt\fR) option allows you to override the default -password prompt and use a custom one. If the password prompt -contains the \f(CW\*(C`%u\*(C'\fR escape, \f(CW\*(C`%u\*(C'\fR will be replaced with the user's -login name. Similarly, \f(CW\*(C`%h\*(C'\fR will be replaced with the local -hostname. -.Ip "\-c" 4 +password prompt and use a custom one. The following percent (`\f(CW\*(C`%\*(C'\fR') +escapes are supported: +.RS 4 +.ie n .IP "%u" 8 +.el .IP "\f(CW%u\fR" 8 +.IX Item "%u" +expanded to the invoking user's login name +.ie n .IP "%U" 8 +.el .IP "\f(CW%U\fR" 8 +.IX Item "%U" +expanded to the login name of the user the command will +be run as (defaults to root) +.ie n .IP "%h" 8 +.el .IP "\f(CW%h\fR" 8 +.IX Item "%h" +expanded to the local hostname without the domain name +.ie n .IP "%H" 8 +.el .IP "\f(CW%H\fR" 8 +.IX Item "%H" +expanded to the local hostname including the domain name +(on if the machine's hostname is fully qualified or the \fIfqdn\fR +sudoers option is set) +.ie n .IP "\*(C`%%\*(C'" 8 +.el .IP "\f(CW\*(C`%%\*(C'\fR" 8 +.IX Item "%%" +two consecutive \f(CW\*(C`%\*(C'\fR characters are collaped into a single \f(CW\*(C`%\*(C'\fR character +.RE +.RS 4 +.RE +.IP "\-c" 4 .IX Item "-c" The \fB\-c\fR (\fIclass\fR) option causes \fBsudo\fR to run the specified command with resources limited by the specified login class. The \fIclass\fR @@ -275,44 +291,44 @@ capabilities for the user the command is run as. If the \fIclass\fR argument specifies an existing user class, the command must be run as root, or the \fBsudo\fR command must be run from a shell that is already root. This option is only available on systems with \s-1BSD\s0 login classes -where \fBsudo\fR has been configured with the \-\-with-logincap option. -.Ip "\-a" 4 +where \fBsudo\fR has been configured with the \-\-with\-logincap option. +.IP "\-a" 4 .IX Item "-a" The \fB\-a\fR (\fIauthentication type\fR) option causes \fBsudo\fR to use the specified authentication type when validating the user, as allowed by /etc/login.conf. The system administrator may specify a list -of sudo-specific authentication methods by adding an \*(L"auth-sudo\*(R" +of sudo-specific authentication methods by adding an \*(L"auth\-sudo\*(R" entry in /etc/login.conf. This option is only available on systems that support \s-1BSD\s0 authentication where \fBsudo\fR has been configured -with the \-\-with-bsdauth option. -.Ip "\-u" 4 +with the \-\-with\-bsdauth option. +.IP "\-u" 4 .IX Item "-u" The \fB\-u\fR (\fIuser\fR) option causes \fBsudo\fR to run the specified command as a user other than \fIroot\fR. To specify a \fIuid\fR instead of a \&\fIusername\fR, use \fI#uid\fR. -.Ip "\-s" 4 +.IP "\-s" 4 .IX Item "-s" The \fB\-s\fR (\fIshell\fR) option runs the shell specified by the \fI\s-1SHELL\s0\fR environment variable if it is set or the shell as specified in \fIpasswd\fR\|(5). -.Ip "\-H" 4 +.IP "\-H" 4 .IX Item "-H" The \fB\-H\fR (\fI\s-1HOME\s0\fR) option sets the \f(CW\*(C`HOME\*(C'\fR environment variable to the homedir of the target user (root by default) as specified in \fIpasswd\fR\|(5). By default, \fBsudo\fR does not modify \f(CW\*(C`HOME\*(C'\fR. -.Ip "\-P" 4 +.IP "\-P" 4 .IX Item "-P" The \fB\-P\fR (\fIpreserve group vector\fR) option causes \fBsudo\fR to preserve the user's group vector unaltered. By default, \fBsudo\fR will initialize the group vector to the list of groups the target user is in. The real and effective group IDs, however, are still set to match the target user. -.Ip "\-S" 4 +.IP "\-S" 4 .IX Item "-S" The \fB\-S\fR (\fIstdin\fR) option causes \fBsudo\fR to read the password from standard input instead of the terminal device. -.Ip "\-\-" 4 -The \fB\--\fR flag indicates that \fBsudo\fR should stop processing command +.IP "\-\-" 4 +The \fB\-\-\fR flag indicates that \fBsudo\fR should stop processing command line arguments. It is most useful in conjunction with the \fB\-s\fR flag. .SH "RETURN VALUES" .IX Header "RETURN VALUES" @@ -335,7 +351,7 @@ unreachable. \&\fBsudo\fR tries to be safe when executing external commands. Variables that control how dynamic loading and binding is done can be used to subvert the program that \fBsudo\fR runs. To combat this the -\&\f(CW\*(C`LD_*\*(C'\fR, \f(CW\*(C`_RLD_*\*(C'\fR, \f(CW\*(C`SHLIB_PATH\*(C'\fR (\s-1HP-UX\s0 only), and \f(CW\*(C`LIBPATH\*(C'\fR (\s-1AIX\s0 +\&\f(CW\*(C`LD_*\*(C'\fR, \f(CW\*(C`_RLD_*\*(C'\fR, \f(CW\*(C`SHLIB_PATH\*(C'\fR (\s-1HP\-UX\s0 only), and \f(CW\*(C`LIBPATH\*(C'\fR (\s-1AIX\s0 only) environment variables are removed from the environment passed on to all commands executed. \fBsudo\fR will also remove the \f(CW\*(C`IFS\*(C'\fR, \&\f(CW\*(C`ENV\*(C'\fR, \f(CW\*(C`BASH_ENV\*(C'\fR, \f(CW\*(C`KRB_CONF\*(C'\fR, \f(CW\*(C`KRBCONFDIR\*(C'\fR, \f(CW\*(C`KRBTKFILE\*(C'\fR, @@ -401,22 +417,26 @@ To get a file listing of an unreadable directory: .Vb 1 \& % sudo ls /usr/local/protected .Ve +.PP To list the home directory of user yazza on a machine where the filesystem holding ~yazza is not exported as root: .PP .Vb 1 \& % sudo -u yazza ls ~yazza .Ve +.PP To edit the \fIindex.html\fR file as user www: .PP .Vb 1 \& % sudo -u www vi ~www/htdocs/index.html .Ve +.PP To shutdown a machine: .PP .Vb 1 \& % sudo shutdown -r +15 "quick reboot" .Ve +.PP To make a usage listing of the directories in the /home partition. Note that this runs the commands in a sub-shell to make the \f(CW\*(C`cd\*(C'\fR and file redirection work. @@ -458,6 +478,7 @@ version consists of code written primarily by: \& Todd Miller \& Chris Jepeway .Ve +.PP See the \s-1HISTORY\s0 file in the \fBsudo\fR distribution or visit http://www.sudo.ws/sudo/history.html for a short history of \fBsudo\fR. @@ -486,4 +507,4 @@ that make setuid shell scripts unsafe on some operating systems are generally safe). .SH "SEE ALSO" .IX Header "SEE ALSO" -\&\fIstat\fR\|(2), \fIlogin_cap\fR\|(3), \fIsudoers\fR\|(5), \fIpasswd\fR\|(5), \fIvisudo\fR\|(8), \fIgrep\fR\|(1), \fIsu\fR\|(1). +\&\fIgrep\fR\|(1), \fIsu\fR\|(1), \fIstat\fR\|(2), \fIlogin_cap\fR\|(3), \fIsudoers\fR\|(5), \fIpasswd\fR\|(5), \fIvisudo\fR\|(8) diff --git a/usr.bin/sudo/sudo.c b/usr.bin/sudo/sudo.c index 7c6f532e88c..eb0b8a83c5c 100644 --- a/usr.bin/sudo/sudo.c +++ b/usr.bin/sudo/sudo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1993-1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1993-1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -98,7 +98,7 @@ #include "version.h" #ifndef lint -static const char rcsid[] = "$Sudo: sudo.c,v 1.318 2002/01/15 23:43:59 millert Exp $"; +static const char rcsid[] = "$Sudo: sudo.c,v 1.333 2003/03/15 20:31:01 millert Exp $"; #endif /* lint */ /* @@ -131,6 +131,7 @@ FILE *sudoers_fp = NULL; struct interface *interfaces; int num_interfaces; int tgetpass_flags; +uid_t timestamp_uid; extern int errorlineno; #if defined(RLIMIT_CORE) && !defined(SUDO_DEVEL) static struct rlimit corelimit; @@ -141,7 +142,7 @@ login_cap_t *lc; #ifdef HAVE_BSD_AUTH_H char *login_style; #endif /* HAVE_BSD_AUTH_H */ -void (*set_perms) __P((int, int)); +void (*set_perms) __P((int)); int @@ -156,7 +157,7 @@ main(argc, argv, envp) int sudo_mode; int pwflag; char **new_environ; - sigaction_t sa; + sigaction_t sa, saved_sa_int, saved_sa_quit, saved_sa_tstp, saved_sa_chld; extern int printmatches; extern char **environ; @@ -180,18 +181,22 @@ main(argc, argv, envp) } /* - * Ignore keyboard-generated signals so the user cannot interrupt - * us at some point and avoid the logging. + * Signal setup: + * Ignore keyboard-generated signals so the user cannot interrupt + * us at some point and avoid the logging. + * Install handler to wait for children when they exit. */ sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART; sa.sa_handler = SIG_IGN; - (void) sigaction(SIGINT, &sa, NULL); - (void) sigaction(SIGQUIT, &sa, NULL); - (void) sigaction(SIGTSTP, &sa, NULL); + (void) sigaction(SIGINT, &sa, &saved_sa_int); + (void) sigaction(SIGQUIT, &sa, &saved_sa_quit); + (void) sigaction(SIGTSTP, &sa, &saved_sa_tstp); + sa.sa_handler = reapchild; + (void) sigaction(SIGCHLD, &sa, &saved_sa_chld); /* - * Setup signal handlers, turn off core dumps, and close open files. + * Turn off core dumps, close open files and setup set_perms(). */ initial_setup(); setpwent(); @@ -217,7 +222,6 @@ main(argc, argv, envp) dump_auth_methods(); dump_defaults(); dump_interfaces(); - dump_badenv(); } exit(0); break; @@ -256,17 +260,18 @@ main(argc, argv, envp) validated = sudoers_lookup(pwflag); /* - * If we have POSIX saved uids and the stay_setuid flag was not set, - * set the real, effective and saved uids to 0 and use set_perms_fallback() + * If we are using set_perms_posix() and the stay_setuid flag was not set, + * set the real, effective and saved uids to 0 and use set_perms_nosuid() * instead of set_perms_posix(). */ -#if !defined(NO_SAVED_IDS) && defined(_SC_SAVED_IDS) && defined(_SC_VERSION) +#if !defined(HAVE_SETRESUID) && !defined(HAVE_SETREUID) && \ + !defined(NO_SAVED_IDS) && defined(_SC_SAVED_IDS) && defined(_SC_VERSION) if (!def_flag(I_STAY_SETUID) && set_perms == set_perms_posix) { if (setuid(0)) { perror("setuid(0)"); exit(1); } - set_perms = set_perms_fallback; + set_perms = set_perms_nosuid; } #endif @@ -287,6 +292,22 @@ main(argc, argv, envp) log_error(NO_MAIL|MSG_ONLY, "no passwd entry for %s!", *user_runas); } + /* + * Look up the timestamp dir owner if one is specified. + */ + if (def_str(I_TIMESTAMPOWNER)) { + struct passwd *pw; + + if (*def_str(I_TIMESTAMPOWNER) == '#') + pw = getpwuid(atoi(def_str(I_TIMESTAMPOWNER) + 1)); + else + pw = getpwnam(def_str(I_TIMESTAMPOWNER)); + if (!pw) + log_error(0, "timestamp owner (%s): No such user", + def_str(I_TIMESTAMPOWNER)); + timestamp_uid = pw->pw_uid; + } + /* This goes after the sudoers parse since we honor sudoers options. */ if (sudo_mode == MODE_KILL || sudo_mode == MODE_INVALIDATE) { remove_timestamp((sudo_mode == MODE_KILL)); @@ -299,8 +320,9 @@ main(argc, argv, envp) /* Is root even allowed to run sudo? */ if (user_uid == 0 && !def_flag(I_ROOT_SUDO)) { - (void) fputs("You are already root, you don't need to use sudo.\n", - stderr); + (void) fprintf(stderr, + "Sorry, %s has been configured to not allow root to run it.\n", + Argv[0]); exit(1); } @@ -362,14 +384,6 @@ main(argc, argv, envp) "please report this error at http://courtesan.com/sudo/bugs/"); } - /* Reset signal handlers before we exec. */ - sigemptyset(&sa.sa_mask); - sa.sa_flags = SA_RESTART; - sa.sa_handler = SIG_DFL; - (void) sigaction(SIGINT, &sa, NULL); - (void) sigaction(SIGQUIT, &sa, NULL); - (void) sigaction(SIGTSTP, &sa, NULL); - /* Override user's umask if configured to do so. */ if (def_ival(I_UMASK) != 0777) (void) umask(def_mode(I_UMASK)); @@ -380,7 +394,7 @@ main(argc, argv, envp) #endif /* RLIMIT_CORE */ /* Become specified user or root. */ - set_perms(PERM_RUNAS, sudo_mode); + set_perms(PERM_RUNAS); /* Close the password and group files */ endpwent(); @@ -389,6 +403,12 @@ main(argc, argv, envp) /* Install the new environment. */ environ = new_environ; + /* Restore signal handlers before we exec. */ + (void) sigaction(SIGINT, &saved_sa_int, NULL); + (void) sigaction(SIGQUIT, &saved_sa_quit, NULL); + (void) sigaction(SIGTSTP, &saved_sa_tstp, NULL); + (void) sigaction(SIGCHLD, &saved_sa_chld, NULL); + #ifndef PROFILING if ((sudo_mode & MODE_BACKGROUND) && fork() > 0) exit(0); @@ -460,7 +480,7 @@ init_vars(sudo_mode) /* Default value for cmnd and cwd, overridden later. */ if (user_cmnd == NULL) user_cmnd = NewArgv[0]; - (void) strcpy(user_cwd, "unknown"); + (void) strlcpy(user_cwd, "unknown", sizeof(user_cwd)); /* * We avoid gethostbyname() if possible since we don't want @@ -505,12 +525,13 @@ init_vars(sudo_mode) char pw_name[MAX_UID_T_LEN + 1]; pw.pw_uid = getuid(); - (void) sprintf(pw_name, "%ld", (long) pw.pw_uid); + (void) snprintf(pw_name, sizeof(pw_name), "%lu", + (unsigned long) pw.pw_uid); pw.pw_name = pw_name; sudo_user.pw = &pw; - log_error(0, "uid %ld does not exist in the passwd file!", - (long) pw.pw_uid); + log_error(0, "uid %lu does not exist in the passwd file!", + (unsigned long) pw.pw_uid); } if (user_shell == NULL || *user_shell == '\0') user_shell = sudo_user.pw->pw_shell; @@ -529,16 +550,16 @@ init_vars(sudo_mode) /* * Get current working directory. Try as user, fall back to root. */ - set_perms(PERM_USER, sudo_mode); + set_perms(PERM_USER); if (!getcwd(user_cwd, sizeof(user_cwd))) { - set_perms(PERM_ROOT, sudo_mode); + set_perms(PERM_ROOT); if (!getcwd(user_cwd, sizeof(user_cwd))) { (void) fprintf(stderr, "%s: Can't get working directory!\n", Argv[0]); - (void) strcpy(user_cwd, "unknown"); + (void) strlcpy(user_cwd, "unknown", sizeof(user_cwd)); } } else - set_perms(PERM_ROOT, sudo_mode); + set_perms(PERM_ROOT); /* * If we were given the '-s' option (run shell) we need to redo @@ -547,7 +568,7 @@ init_vars(sudo_mode) if ((sudo_mode & MODE_SHELL)) { char **dst, **src = NewArgv; - NewArgv = (char **) emalloc (sizeof(char *) * (++NewArgc + 1)); + NewArgv = (char **) emalloc2((++NewArgc + 1), sizeof(char *)); if (user_shell && *user_shell) { NewArgv[0] = user_shell; } else { @@ -569,15 +590,15 @@ init_vars(sudo_mode) rval = find_path(NewArgv[0], &user_cmnd, user_path); if (rval != FOUND) { /* Failed as root, try as invoking user. */ - set_perms(PERM_USER, sudo_mode); + set_perms(PERM_USER); rval = find_path(NewArgv[0], &user_cmnd, user_path); - set_perms(PERM_ROOT, sudo_mode); + set_perms(PERM_ROOT); } /* set user_args */ if (NewArgc > 1) { char *to, **from; - size_t size; + size_t size, n; /* If MODE_SHELL not set then NewArgv is contiguous so just count */ if (!(sudo_mode & MODE_SHELL)) { @@ -589,10 +610,15 @@ init_vars(sudo_mode) } /* alloc and copy. */ - to = user_args = (char *) emalloc(size); - for (from = NewArgv + 1; *from; from++) { - (void) strcpy(to, *from); - to += strlen(*from); + user_args = (char *) emalloc(size); + for (to = user_args, from = NewArgv + 1; *from; from++) { + n = strlcpy(to, *from, size - (to - user_args)); + if (n >= size) { + (void) fprintf(stderr, + "%s: internal error, init_vars() overflow\n", Argv[0]); + exit(1); + } + to += n; *to++ = ' '; } *--to = '\0'; @@ -609,7 +635,7 @@ init_vars(sudo_mode) static int parse_args() { - int rval = MODE_RUN; /* what mode is suod to be run in? */ + int rval = MODE_RUN; /* what mode is sudo to be run in? */ int excl = 0; /* exclusive arg, no others allowed */ NewArgv = Argv + 1; @@ -777,7 +803,7 @@ check_sudoers() * Fix the mode and group on sudoers file from old default. * Only works if filesystem is readable/writable by root. */ - if ((rootstat = lstat(_PATH_SUDOERS, &statbuf)) == 0 && + if ((rootstat = stat_sudoers(_PATH_SUDOERS, &statbuf)) == 0 && SUDOERS_UID == statbuf.st_uid && SUDOERS_MODE != 0400 && (statbuf.st_mode & 0007777) == 0400) { @@ -806,9 +832,9 @@ check_sudoers() * file owner. We already did a stat as root, so use that * data if we can't stat as sudoers file owner. */ - set_perms(PERM_SUDOERS, 0); + set_perms(PERM_SUDOERS); - if (rootstat != 0 && lstat(_PATH_SUDOERS, &statbuf) != 0) + if (rootstat != 0 && stat_sudoers(_PATH_SUDOERS, &statbuf) != 0) log_error(USE_ERRNO, "can't stat %s", _PATH_SUDOERS); else if (!S_ISREG(statbuf.st_mode)) log_error(0, "%s is not a regular file", _PATH_SUDOERS); @@ -818,11 +844,11 @@ check_sudoers() log_error(0, "%s is mode 0%o, should be 0%o", _PATH_SUDOERS, (statbuf.st_mode & 07777), SUDOERS_MODE); else if (statbuf.st_uid != SUDOERS_UID) - log_error(0, "%s is owned by uid %ld, should be %d", _PATH_SUDOERS, - (long) statbuf.st_uid, SUDOERS_UID); + log_error(0, "%s is owned by uid %lu, should be %lu", _PATH_SUDOERS, + (unsigned long) statbuf.st_uid, SUDOERS_UID); else if (statbuf.st_gid != SUDOERS_GID) - log_error(0, "%s is owned by gid %ld, should be %d", _PATH_SUDOERS, - (long) statbuf.st_gid, SUDOERS_GID); + log_error(0, "%s is owned by gid %lu, should be %lu", _PATH_SUDOERS, + (unsigned long) statbuf.st_gid, SUDOERS_GID); else { /* Solaris sometimes returns EAGAIN so try 10 times */ for (i = 0; i < 10 ; i++) { @@ -840,7 +866,7 @@ check_sudoers() log_error(USE_ERRNO, "can't open %s", _PATH_SUDOERS); } - set_perms(PERM_ROOT, 0); /* change back to root */ + set_perms(PERM_ROOT); /* change back to root */ } /* @@ -854,7 +880,6 @@ initial_setup() #ifdef HAVE_SETRLIMIT struct rlimit rl; #endif - sigaction_t sa; #if defined(RLIMIT_CORE) && !defined(SUDO_DEVEL) /* @@ -883,19 +908,23 @@ initial_setup() for (fd = maxfd; fd > STDERR_FILENO; fd--) (void) close(fd); - /* Catch children as they die... */ - sigemptyset(&sa.sa_mask); - sa.sa_flags = SA_RESTART; - sa.sa_handler = reapchild; - (void) sigaction(SIGCHLD, &sa, NULL); - - /* Set set_perms pointer to the correct function */ -#if !defined(NO_SAVED_IDS) && defined(_SC_SAVED_IDS) && defined(_SC_VERSION) + /* + * Make set_perms point to the correct function. + * If we are using setresuid() or setreuid() we only need to set this + * once. If we are using POSIX saved uids we will switch to + * set_perms_nosuid after sudoers has been parsed if the "stay_suid" + * option is not set. + */ +#if defined(HAVE_SETRESUID) || defined(HAVE_SETREUID) + set_perms = set_perms_suid; +#else +# if !defined(NO_SAVED_IDS) && defined(_SC_SAVED_IDS) && defined(_SC_VERSION) if (sysconf(_SC_SAVED_IDS) == 1 && sysconf(_SC_VERSION) >= 199009) set_perms = set_perms_posix; else -#endif - set_perms = set_perms_fallback; +# endif + set_perms = set_perms_nosuid; +#endif /* HAVE_SETRESUID || HAVE_SETREUID */ } #ifdef HAVE_LOGIN_CAP_H diff --git a/usr.bin/sudo/sudo.h b/usr.bin/sudo/sudo.h index 44a1eded3c3..406d22a9e94 100644 --- a/usr.bin/sudo/sudo.h +++ b/usr.bin/sudo/sudo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1993-1996,1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1993-1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Sudo: sudo.h,v 1.184 2002/01/16 21:27:09 millert Exp $ + * $Sudo: sudo.h,v 1.192 2003/03/15 20:31:02 millert Exp $ */ #ifndef _SUDO_SUDO_H @@ -116,6 +116,7 @@ struct sudo_user { #define PERM_FULL_USER 0x03 #define PERM_SUDOERS 0x04 #define PERM_RUNAS 0x05 +#define PERM_TIMESTAMP 0x06 /* * Shortcuts for sudo_user contents. @@ -195,14 +196,21 @@ int vasprintf __P((char **, const char *, va_list)); #ifndef HAVE_STRCASECMP int strcasecmp __P((const char *, const char *)); #endif +#ifndef HAVE_STRLCAT +size_t strlcat __P((char *, const char *, size_t)); +#endif +#ifndef HAVE_STRLCPY +size_t strlcpy __P((char *, const char *, size_t)); +#endif char *sudo_goodpath __P((const char *)); char *tgetpass __P((const char *, int, int)); int find_path __P((char *, char **, char *)); void check_user __P((void)); void verify_user __P((struct passwd *, char *)); int sudoers_lookup __P((int)); -void set_perms_posix __P((int, int)); -void set_perms_fallback __P((int, int)); +void set_perms_nosuid __P((int)); +void set_perms_posix __P((int)); +void set_perms_suid __P((int)); void remove_timestamp __P((int)); int check_secureware __P((char *)); void sia_attempt_auth __P((void)); @@ -210,11 +218,12 @@ void pam_attempt_auth __P((void)); int yyparse __P((void)); void pass_warn __P((FILE *)); VOID *emalloc __P((size_t)); +VOID *emalloc2 __P((size_t, size_t)); VOID *erealloc __P((VOID *, size_t)); +VOID *erealloc3 __P((VOID *, size_t, size_t)); char *estrdup __P((const char *)); int easprintf __P((char **, const char *, ...)); int evasprintf __P((char **, const char *, va_list)); -void dump_badenv __P((void)); void dump_defaults __P((void)); void dump_auth_methods __P((void)); void init_envtables __P((void)); @@ -235,8 +244,9 @@ extern int Argc; extern char **Argv; extern FILE *sudoers_fp; extern int tgetpass_flags; +extern uid_t timestamp_uid; -extern void (*set_perms) __P((int, int)); +extern void (*set_perms) __P((int)); #endif extern int errno; diff --git a/usr.bin/sudo/sudoers.5 b/usr.bin/sudo/sudoers.5 index 154b408ec0c..20671efe2dc 100644 --- a/usr.bin/sudo/sudoers.5 +++ b/usr.bin/sudo/sudoers.5 @@ -1,7 +1,4 @@ -.\" Automatically generated by Pod::Man version 1.15 -.\" Thu Apr 25 09:34:54 2002 -.\" -.\" Copyright (c) 1994-1996,1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> +.\" Copyright (c) 1994-1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -33,9 +30,12 @@ .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $Sudo: sudoers.man.in,v 1.24 2003/03/15 20:33:31 millert Exp $ +.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: -.\" ====================================================================== +.\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp @@ -48,12 +48,6 @@ .if t .sp .5v .if n .sp .. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. .de Vb \" Begin verbatim text .ft CW .nf @@ -61,15 +55,14 @@ .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used -.\" to do unbreakable dashes and therefore won't be available. \*(C` and -.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ @@ -89,10 +82,10 @@ . ds R" '' 'br\} .\" -.\" If the F register is turned on, we'll generate index entries on stderr -.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and -.\" index entries marked with X<> in POD. Of course, you'll have to process -.\" the output yourself in some meaningful fashion. +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" @@ -101,14 +94,13 @@ . rr F .\} .\" -.\" For nroff, turn off justification. Always turn off hyphenation; it -.\" makes way too many mistakes in technical documents. +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. -.bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 @@ -168,11 +160,10 @@ . ds Ae AE .\} .rm #[ #] #H #V #F C -.\" ====================================================================== +.\" ======================================================================== .\" -.IX Title "sudoers 5" -.TH sudoers 5 "1.6.6" "April 25, 2002" "MAINTENANCE COMMANDS" -.UC +.IX Title "SUDOERS 5" +.TH SUDOERS 5 "March 13, 2003" "1.6.7" "MAINTENANCE COMMANDS" .SH "NAME" sudoers \- list of which users may execute what .SH "DESCRIPTION" @@ -191,20 +182,24 @@ Each \s-1EBNF\s0 definition is made up of \fIproduction rules\fR. E.g., .Vb 1 \& symbol ::= definition | alternate1 | alternate2 ... .Ve +.PP Each \fIproduction rule\fR references others and thus makes up a grammar for the language. \s-1EBNF\s0 also contains the following operators, which many readers will recognize from regular expressions. Do not, however, confuse them with \*(L"wildcard\*(R" characters, which have different meanings. -.Ip "\f(CW\*(C`?\*(C'\fR" 8 +.ie n .IP "\*(C`?\*(C'" 8 +.el .IP "\f(CW\*(C`?\*(C'\fR" 8 .IX Item "?" Means that the preceding symbol (or group of symbols) is optional. That is, it may appear once or not at all. -.Ip "\f(CW\*(C`*\*(C'\fR" 8 +.ie n .IP "\*(C`*\*(C'" 8 +.el .IP "\f(CW\*(C`*\*(C'\fR" 8 .IX Item "*" Means that the preceding symbol (or group of symbols) may appear zero or more times. -.Ip "\f(CW\*(C`+\*(C'\fR" 8 +.ie n .IP "\*(C`+\*(C'" 8 +.el .IP "\f(CW\*(C`+\*(C'\fR" 8 .IX Item "+" Means that the preceding symbol (or group of symbols) may appear one or more times. @@ -223,26 +218,33 @@ There are four kinds of aliases: \f(CW\*(C`User_Alias\*(C'\fR, \f(CW\*(C`Runas_A \& 'Host_Alias' Host_Alias (':' Host_Alias)* | \& 'Cmnd_Alias' Cmnd_Alias (':' Cmnd_Alias)* .Ve +.PP .Vb 1 \& User_Alias ::= NAME '=' User_List .Ve +.PP .Vb 1 \& Runas_Alias ::= NAME '=' Runas_List .Ve +.PP .Vb 1 \& Host_Alias ::= NAME '=' Host_List .Ve +.PP .Vb 1 \& Cmnd_Alias ::= NAME '=' Cmnd_List .Ve +.PP .Vb 1 \& NAME ::= [A-Z]([A-Z][0-9]_)* .Ve +.PP Each \fIalias\fR definition is of the form .PP .Vb 1 \& Alias_Type NAME = item1, item2, ... .Ve +.PP where \fIAlias_Type\fR is one of \f(CW\*(C`User_Alias\*(C'\fR, \f(CW\*(C`Runas_Alias\*(C'\fR, \f(CW\*(C`Host_Alias\*(C'\fR, or \f(CW\*(C`Cmnd_Alias\*(C'\fR. A \f(CW\*(C`NAME\*(C'\fR is a string of uppercase letters, numbers, and underscore characters ('_'). A \f(CW\*(C`NAME\*(C'\fR \fBmust\fR start with an @@ -252,18 +254,21 @@ of the same type on a single line, joined by a colon (':'). E.g., .Vb 1 \& Alias_Type NAME = item1, item2, item3 : NAME = item4, item5 .Ve +.PP The definitions of what constitutes a valid \fIalias\fR member follow. .PP .Vb 2 \& User_List ::= User | \& User ',' User_List .Ve +.PP .Vb 4 \& User ::= '!'* username | \& '!'* '%'group | \& '!'* '+'netgroup | \& '!'* User_Alias .Ve +.PP A \f(CW\*(C`User_List\*(C'\fR is made up of one or more usernames, uids (prefixed with '#'), System groups (prefixed with '%'), netgroups (prefixed with '+') and other aliases. Each list @@ -275,6 +280,7 @@ just cancel each other out. \& Runas_List ::= Runas_User | \& Runas_User ',' Runas_List .Ve +.PP .Vb 5 \& Runas_User ::= '!'* username | \& '!'* '#'uid | @@ -282,6 +288,7 @@ just cancel each other out. \& '!'* +netgroup | \& '!'* Runas_Alias .Ve +.PP A \f(CW\*(C`Runas_List\*(C'\fR is similar to a \f(CW\*(C`User_List\*(C'\fR except that it can also contain uids (prefixed with '#') and instead of \f(CW\*(C`User_Alias\*(C'\fRes it can contain \f(CW\*(C`Runas_Alias\*(C'\fRes. @@ -290,6 +297,7 @@ it can contain \f(CW\*(C`Runas_Alias\*(C'\fRes. \& Host_List ::= Host | \& Host ',' Host_List .Ve +.PP .Vb 5 \& Host ::= '!'* hostname | \& '!'* ip_addr | @@ -297,11 +305,12 @@ it can contain \f(CW\*(C`Runas_Alias\*(C'\fRes. \& '!'* '+'netgroup | \& '!'* Host_Alias .Ve +.PP A \f(CW\*(C`Host_List\*(C'\fR is made up of one or more hostnames, \s-1IP\s0 addresses, network numbers, netgroups (prefixed with '+') and other aliases. Again, the value of an item may be negated with the '!' operator. If you do not specify a netmask with a network number, the netmask -of the host's ethernet \fIinterface\fR\|(s) will be used when matching. +of the host's ethernet interface(s) will be used when matching. The netmask may be specified either in dotted quad notation (e.g. 255.255.255.0) or \s-1CIDR\s0 notation (number of bits, e.g. 24). A hostname may include shell-style wildcards (see `Wildcards' section below), @@ -313,22 +322,25 @@ to be useful. \& Cmnd_List ::= Cmnd | \& Cmnd ',' Cmnd_List .Ve +.PP .Vb 3 \& commandname ::= filename | \& filename args | \& filename '""' .Ve +.PP .Vb 3 \& Cmnd ::= '!'* commandname | \& '!'* directory | \& '!'* Cmnd_Alias .Ve +.PP A \f(CW\*(C`Cmnd_List\*(C'\fR is a list of one or more commandnames, directories, and other aliases. A commandname is a fully qualified filename which may include shell-style wildcards (see `Wildcards' section below). A simple filename allows the user to run the command with any arguments he/she wishes. However, you may also specify command line arguments (including -wildcards). Alternately, you can specify \f(CW\*(C`""\*(C'\fR to indicate that the command +wildcards). Alternately, you can specify \f(CW""\fR to indicate that the command may only be run \fBwithout\fR command line arguments. A directory is a fully qualified pathname ending in a '/'. When you specify a directory in a \f(CW\*(C`Cmnd_List\*(C'\fR, the user will be able to run any file within that directory @@ -343,25 +355,29 @@ arguments: ',', ':', '=', '\e'. .IX Subsection "Defaults" Certain configuration options may be changed from their default values at runtime via one or more \f(CW\*(C`Default_Entry\*(C'\fR lines. These -may affect all users on any host, all users on a specific host, -or just a specific user. When multiple entries match, they are -applied in order. Where there are conflicting values, the last -value on a matching line takes effect. +may affect all users on any host, all users on a specific host, a +specific user, or commands being run as a specific user. When +multiple entries match, they are applied in order. Where there are +conflicting values, the last value on a matching line takes effect. .PP -.Vb 3 +.Vb 4 \& Default_Type ::= 'Defaults' || +\& 'Defaults' '@' Host || \& 'Defaults' ':' User || -\& 'Defaults' '@' Host +\& 'Defaults' '>' RunasUser .Ve +.PP .Vb 1 \& Default_Entry ::= Default_Type Parameter_List .Ve +.PP .Vb 4 \& Parameter ::= Parameter '=' Value || \& Parameter '+=' Value || \& Parameter '-=' Value || \& '!'* Parameter || .Ve +.PP Parameters may be \fBflags\fR, \fBinteger\fR values, \fBstrings\fR, or \fBlists\fR. Flags are implicitly boolean and can be turned off via the '!' operator. Some integer, string and list parameters may also be @@ -379,93 +395,93 @@ to put the Defaults section is after the Host, User, and Cmnd aliases but before the user specifications. .PP \&\fBFlags\fR: -.Ip "long_otp_prompt" 12 +.IP "long_otp_prompt" 12 .IX Item "long_otp_prompt" When validating with a One Time Password scheme (\fBS/Key\fR or \fB\s-1OPIE\s0\fR), a two-line prompt is used to make it easier to cut and paste the challenge to a local window. It's not as pretty as the default but some people find it more convenient. This flag is \fIoff\fR by default. -.Ip "ignore_dot" 12 +.IP "ignore_dot" 12 .IX Item "ignore_dot" If set, \fBsudo\fR will ignore '.' or '' (current dir) in the \f(CW\*(C`PATH\*(C'\fR environment variable; the \f(CW\*(C`PATH\*(C'\fR itself is not modified. This -flag is \fIoff\fR by default. -.Ip "mail_always" 12 +flag is \fIon\fR by default. +.IP "mail_always" 12 .IX Item "mail_always" Send mail to the \fImailto\fR user every time a users runs \fBsudo\fR. This flag is \fIoff\fR by default. -.Ip "mail_badpass" 12 +.IP "mail_badpass" 12 .IX Item "mail_badpass" Send mail to the \fImailto\fR user if the user running sudo does not enter the correct password. This flag is \fIoff\fR by default. -.Ip "mail_no_user" 12 +.IP "mail_no_user" 12 .IX Item "mail_no_user" If set, mail will be sent to the \fImailto\fR user if the invoking user is not in the \fIsudoers\fR file. This flag is \fIon\fR by default. -.Ip "mail_no_host" 12 +.IP "mail_no_host" 12 .IX Item "mail_no_host" If set, mail will be sent to the \fImailto\fR user if the invoking user exists in the \fIsudoers\fR file, but is not allowed to run commands on the current host. This flag is \fIoff\fR by default. -.Ip "mail_no_perms" 12 +.IP "mail_no_perms" 12 .IX Item "mail_no_perms" If set, mail will be sent to the \fImailto\fR user if the invoking user is allowed to use \fBsudo\fR but the command they are trying is not listed in their \fIsudoers\fR file entry. This flag is \fIoff\fR by default. -.Ip "tty_tickets" 12 +.IP "tty_tickets" 12 .IX Item "tty_tickets" If set, users must authenticate on a per-tty basis. Normally, \&\fBsudo\fR uses a directory in the ticket dir with the same name as the user running it. With this flag enabled, \fBsudo\fR will use a file named for the tty the user is logged in on in that directory. This flag is \fIoff\fR by default. -.Ip "lecture" 12 +.IP "lecture" 12 .IX Item "lecture" If set, a user will receive a short lecture the first time he/she runs \fBsudo\fR. This flag is \fIon\fR by default. -.Ip "authenticate" 12 +.IP "authenticate" 12 .IX Item "authenticate" If set, users must authenticate themselves via a password (or other means of authentication) before they may run commands. This default may be overridden via the \f(CW\*(C`PASSWD\*(C'\fR and \f(CW\*(C`NOPASSWD\*(C'\fR tags. This flag is \fIon\fR by default. -.Ip "root_sudo" 12 +.IP "root_sudo" 12 .IX Item "root_sudo" If set, root is allowed to run \fBsudo\fR too. Disabling this prevents users from \*(L"chaining\*(R" \fBsudo\fR commands to get a root shell by doing something -like \f(CW\*(C`"sudo sudo /bin/sh"\*(C'\fR. +like \f(CW"sudo sudo /bin/sh"\fR. This flag is \fIon\fR by default. -.Ip "log_host" 12 +.IP "log_host" 12 .IX Item "log_host" -If set, the hostname will be logged in the (non-syslog) \fBsudo\fR log file. +If set, the hostname will be logged in the (non\-syslog) \fBsudo\fR log file. This flag is \fIoff\fR by default. -.Ip "log_year" 12 +.IP "log_year" 12 .IX Item "log_year" -If set, the four-digit year will be logged in the (non-syslog) \fBsudo\fR log file. +If set, the four-digit year will be logged in the (non\-syslog) \fBsudo\fR log file. This flag is \fIoff\fR by default. -.Ip "shell_noargs" 12 +.IP "shell_noargs" 12 .IX Item "shell_noargs" If set and \fBsudo\fR is invoked with no arguments it acts as if the \&\fB\-s\fR flag had been given. That is, it runs a shell as root (the shell is determined by the \f(CW\*(C`SHELL\*(C'\fR environment variable if it is set, falling back on the shell listed in the invoking user's /etc/passwd entry if not). This flag is \fIoff\fR by default. -.Ip "set_home" 12 +.IP "set_home" 12 .IX Item "set_home" If set and \fBsudo\fR is invoked with the \fB\-s\fR flag the \f(CW\*(C`HOME\*(C'\fR environment variable will be set to the home directory of the target user (which is root unless the \fB\-u\fR option is used). This effectively makes the \fB\-s\fR flag imply \fB\-H\fR. This flag is \fIoff\fR by default. -.Ip "always_set_home" 12 +.IP "always_set_home" 12 .IX Item "always_set_home" If set, \fBsudo\fR will set the \f(CW\*(C`HOME\*(C'\fR environment variable to the home directory of the target user (which is root unless the \fB\-u\fR option is used). This effectively means that the \fB\-H\fR flag is always implied. This flag is \fIoff\fR by default. -.Ip "path_info" 12 +.IP "path_info" 12 .IX Item "path_info" Normally, \fBsudo\fR will tell the user when a command could not be found in their \f(CW\*(C`PATH\*(C'\fR environment variable. Some sites may wish @@ -475,14 +491,14 @@ to. The disadvantage is that if the executable is simply not in the user's \f(CW\*(C`PATH\*(C'\fR, \fBsudo\fR will tell the user that they are not allowed to run it, which can be confusing. This flag is \fIoff\fR by default. -.Ip "preserve_groups" 12 +.IP "preserve_groups" 12 .IX Item "preserve_groups" By default \fBsudo\fR will initialize the group vector to the list of groups the target user is in. When \fIpreserve_groups\fR is set, the user's existing group vector is left unaltered. The real and effective group IDs, however, are still set to match the target user. This flag is \fIoff\fR by default. -.Ip "fqdn" 12 +.IP "fqdn" 12 .IX Item "fqdn" Set this flag if you want to put fully qualified hostnames in the \&\fIsudoers\fR file. I.e., instead of myhost you would use myhost.mydomain.edu. @@ -496,19 +512,19 @@ issues and the fact that there is no way to get all aliases from \&\s-1DNS\s0. If your machine's hostname (as returned by the \f(CW\*(C`hostname\*(C'\fR command) is already fully qualified you shouldn't need to set \&\fIfqdn\fR. This flag is \fIoff\fR by default. -.Ip "insults" 12 +.IP "insults" 12 .IX Item "insults" If set, \fBsudo\fR will insult users when they enter an incorrect password. This flag is \fIon\fR by default. -.Ip "requiretty" 12 +.IP "requiretty" 12 .IX Item "requiretty" If set, \fBsudo\fR will only run when the user is logged in to a real -tty. This will disallow things like \f(CW\*(C`"rsh somehost sudo ls"\*(C'\fR since +tty. This will disallow things like \f(CW"rsh somehost sudo ls"\fR since \&\fIrsh\fR\|(1) does not allocate a tty. Because it is not possible to turn -off echo when there is no tty present, some sites may wish to set +off echo when there is no tty present, some sites may with to set this flag to prevent a user from entering a visible password. This flag is \fIoff\fR by default. -.Ip "env_editor" 12 +.IP "env_editor" 12 .IX Item "env_editor" If set, \fBvisudo\fR will use the value of the \s-1EDITOR\s0 or \s-1VISUAL\s0 environment variables before falling back on the default editor list. @@ -518,28 +534,28 @@ is to place a colon-separated list of editors in the \f(CW\*(C`editor\*(C'\fR variable. \fBvisudo\fR will then only use the \s-1EDITOR\s0 or \s-1VISUAL\s0 if they match a value specified in \f(CW\*(C`editor\*(C'\fR. This flag is \f(CW\*(C`on\*(C'\fR by default. -.Ip "rootpw" 12 +.IP "rootpw" 12 .IX Item "rootpw" If set, \fBsudo\fR will prompt for the root password instead of the password of the invoking user. This flag is \fIoff\fR by default. -.Ip "runaspw" 12 +.IP "runaspw" 12 .IX Item "runaspw" If set, \fBsudo\fR will prompt for the password of the user defined by the \&\fIrunas_default\fR option (defaults to \f(CW\*(C`root\*(C'\fR) instead of the password of the invoking user. This flag is \fIoff\fR by default. -.Ip "targetpw" 12 +.IP "targetpw" 12 .IX Item "targetpw" If set, \fBsudo\fR will prompt for the password of the user specified by the \fB\-u\fR flag (defaults to \f(CW\*(C`root\*(C'\fR) instead of the password of the invoking user. This flag is \fIoff\fR by default. -.Ip "set_logname" 12 +.IP "set_logname" 12 .IX Item "set_logname" Normally, \fBsudo\fR will set the \f(CW\*(C`LOGNAME\*(C'\fR and \f(CW\*(C`USER\*(C'\fR environment variables to the name of the target user (usually root unless the \fB\-u\fR flag is given). However, since some programs (including the \s-1RCS\s0 revision control system) use \f(CW\*(C`LOGNAME\*(C'\fR to determine the real identity of the user, it may be desirable to change this behavior. This can be done by negating the set_logname option. -.Ip "stay_setuid" 12 +.IP "stay_setuid" 12 .IX Item "stay_setuid" Normally, when \fBsudo\fR executes a command the real and effective UIDs are set to the target user (root by default). This option @@ -551,7 +567,7 @@ that this means that sudo will run with the real uid of the invoking user which may allow that user to kill \fBsudo\fR before it can log a failure, depending on how your \s-1OS\s0 defines the interaction between signals and setuid processes. -.Ip "env_reset" 12 +.IP "env_reset" 12 .IX Item "env_reset" If set, \fBsudo\fR will reset the environment to only contain the following variables: \f(CW\*(C`HOME\*(C'\fR, \f(CW\*(C`LOGNAME\*(C'\fR, \f(CW\*(C`PATH\*(C'\fR, \f(CW\*(C`SHELL\*(C'\fR, \f(CW\*(C`TERM\*(C'\fR, @@ -562,75 +578,107 @@ by the value of the \fIset_logname\fR option). If \fBsudo\fR was compiled with the \f(CW\*(C`SECURE_PATH\*(C'\fR option, its value will be used for the \f(CW\*(C`PATH\*(C'\fR environment variable. Other variables may be preserved with the \fIenv_keep\fR option. -.Ip "use_loginclass" 12 +.IP "use_loginclass" 12 .IX Item "use_loginclass" If set, \fBsudo\fR will apply the defaults specified for the target user's login class if one exists. Only available if \fBsudo\fR is configured with -the \-\-with-logincap option. This flag is \fIoff\fR by default. +the \-\-with\-logincap option. This flag is \fIoff\fR by default. .PP \&\fBIntegers\fR: -.Ip "passwd_tries" 12 +.IP "passwd_tries" 12 .IX Item "passwd_tries" The number of tries a user gets to enter his/her password before \&\fBsudo\fR logs the failure and exits. The default is \f(CW\*(C`3\*(C'\fR. .PP \&\fBIntegers that can be used in a boolean context\fR: -.Ip "loglinelen" 12 +.IP "loglinelen" 12 .IX Item "loglinelen" Number of characters per line for the file log. This value is used to decide when to wrap lines for nicer log files. This has no effect on the syslog log file, only the file log. The default is \&\f(CW\*(C`80\*(C'\fR (use 0 or negate the option to disable word wrap). -.Ip "timestamp_timeout" 12 +.IP "timestamp_timeout" 12 .IX Item "timestamp_timeout" Number of minutes that can elapse before \fBsudo\fR will ask for a -passwd again. The default is \f(CW\*(C`5\*(C'\fR. Set this to \f(CW\*(C`0\*(C'\fR to always +passwd again. The default is \f(CW\*(C`5\*(C'\fR. Set this to \f(CW0\fR to always prompt for a password. -If set to a value less than \f(CW\*(C`0\*(C'\fR the user's timestamp will never +If set to a value less than \f(CW0\fR the user's timestamp will never expire. This can be used to allow users to create or delete their own timestamps via \f(CW\*(C`sudo \-v\*(C'\fR and \f(CW\*(C`sudo \-k\*(C'\fR respectively. -.Ip "passwd_timeout" 12 +.IP "passwd_timeout" 12 .IX Item "passwd_timeout" Number of minutes before the \fBsudo\fR password prompt times out. -The default is \f(CW\*(C`5\*(C'\fR, set this to \f(CW\*(C`0\*(C'\fR for no password timeout. -.Ip "umask" 12 +The default is \f(CW\*(C`5\*(C'\fR, set this to \f(CW0\fR for no password timeout. +.IP "umask" 12 .IX Item "umask" Umask to use when running the command. Negate this option or set it to 0777 to preserve the user's umask. The default is \f(CW\*(C`0022\*(C'\fR. .PP \&\fBStrings\fR: -.Ip "mailsub" 12 +.IP "mailsub" 12 .IX Item "mailsub" -Subject of the mail sent to the \fImailto\fR user. The escape \f(CW\*(C`%h\*(C'\fR +Subject of the mail sent to the \fImailto\fR user. The escape \f(CW%h\fR will expand to the hostname of the machine. Default is \f(CW\*(C`*** SECURITY information for %h ***\*(C'\fR. -.Ip "badpass_message" 12 +.IP "badpass_message" 12 .IX Item "badpass_message" Message that is displayed if a user enters an incorrect password. The default is \f(CW\*(C`Sorry, try again.\*(C'\fR unless insults are enabled. -.Ip "timestampdir" 12 +.IP "timestampdir" 12 .IX Item "timestampdir" The directory in which \fBsudo\fR stores its timestamp files. The default is \fI/var/run/sudo\fR. -.Ip "passprompt" 12 +.IP "timestampowner" 12 +.IX Item "timestampowner" +The owner of the timestamp directory and the timestamps stored therein. +The default is \f(CW\*(C`root\*(C'\fR. +.IP "passprompt" 12 .IX Item "passprompt" The default prompt to use when asking for a password; can be overridden -via the \fB\-p\fR option or the \f(CW\*(C`SUDO_PROMPT\*(C'\fR environment variable. Supports -two escapes: \*(L"%u\*(R" expands to the user's login name and \*(L"%h\*(R" expands -to the local hostname. The default value is \f(CW\*(C`Password:\*(C'\fR. -.Ip "runas_default" 12 +via the \fB\-p\fR option or the \f(CW\*(C`SUDO_PROMPT\*(C'\fR environment variable. +The following percent (`\f(CW\*(C`%\*(C'\fR') escapes are supported: +.RS 12 +.ie n .IP "%u" 8 +.el .IP "\f(CW%u\fR" 8 +.IX Item "%u" +expanded to the invoking user's login name +.ie n .IP "%U" 8 +.el .IP "\f(CW%U\fR" 8 +.IX Item "%U" +expanded to the login name of the user the command will +be run as (defaults to root) +.ie n .IP "%h" 8 +.el .IP "\f(CW%h\fR" 8 +.IX Item "%h" +expanded to the local hostname without the domain name +.ie n .IP "%H" 8 +.el .IP "\f(CW%H\fR" 8 +.IX Item "%H" +expanded to the local hostname including the domain name +(on if the machine's hostname is fully qualified or the \fIfqdn\fR +option is set) +.ie n .IP "\*(C`%%\*(C'" 8 +.el .IP "\f(CW\*(C`%%\*(C'\fR" 8 +.IX Item "%%" +two consecutive \f(CW\*(C`%\*(C'\fR characters are collaped into a single \f(CW\*(C`%\*(C'\fR character +.RE +.RS 12 +.Sp +The default value is \f(CW\*(C`Password:\*(C'\fR. +.RE +.IP "runas_default" 12 .IX Item "runas_default" The default user to run commands as if the \fB\-u\fR flag is not specified on the command line. This defaults to \f(CW\*(C`root\*(C'\fR. -.Ip "syslog_goodpri" 12 +.IP "syslog_goodpri" 12 .IX Item "syslog_goodpri" Syslog priority to use when user authenticates successfully. Defaults to \f(CW\*(C`notice\*(C'\fR. -.Ip "syslog_badpri" 12 +.IP "syslog_badpri" 12 .IX Item "syslog_badpri" Syslog priority to use when user authenticates unsuccessfully. Defaults to \f(CW\*(C`alert\*(C'\fR. -.Ip "editor" 12 +.IP "editor" 12 .IX Item "editor" A colon (':') separated list of editors allowed to be used with \&\fBvisudo\fR. \fBvisudo\fR will choose the editor that matches the user's @@ -639,47 +687,47 @@ list that exists and is executable. The default is the path to vi on your system. .PP \&\fBStrings that can be used in a boolean context\fR: -.Ip "logfile" 12 +.IP "logfile" 12 .IX Item "logfile" Path to the \fBsudo\fR log file (not the syslog log file). Setting a path turns on logging to a file; negating this option turns it off. -.Ip "syslog" 12 +.IP "syslog" 12 .IX Item "syslog" Syslog facility if syslog is being used for logging (negate to -disable syslog logging). Defaults to \f(CW\*(C`authpriv\*(C'\fR. -.Ip "mailerpath" 12 +disable syslog logging). Defaults to \f(CW\*(C`local2\*(C'\fR. +.IP "mailerpath" 12 .IX Item "mailerpath" Path to mail program used to send warning mail. Defaults to the path to sendmail found at configure time. -.Ip "mailerflags" 12 +.IP "mailerflags" 12 .IX Item "mailerflags" Flags to use when invoking mailer. Defaults to \fB\-t\fR. -.Ip "mailto" 12 +.IP "mailto" 12 .IX Item "mailto" Address to send warning and error mail to. The address should be enclosed in double quotes (\f(CW\*(C`"\*(C'\fR) to protect against sudo interpreting the \f(CW\*(C`@\*(C'\fR sign. Defaults to \f(CW\*(C`root\*(C'\fR. -.Ip "exempt_group" 12 +.IP "exempt_group" 12 .IX Item "exempt_group" Users in this group are exempt from password and \s-1PATH\s0 requirements. This is not set by default. -.Ip "verifypw" 12 +.IP "verifypw" 12 .IX Item "verifypw" This option controls when a password will be required when a user runs \&\fBsudo\fR with the \fB\-v\fR flag. It has the following possible values: .RS 12 -.Ip "all" 8 +.IP "all" 8 .IX Item "all" All the user's \fIsudoers\fR entries for the current host must have the \f(CW\*(C`NOPASSWD\*(C'\fR flag set to avoid entering a password. -.Ip "any" 8 +.IP "any" 8 .IX Item "any" At least one of the user's \fIsudoers\fR entries for the current host must have the \f(CW\*(C`NOPASSWD\*(C'\fR flag set to avoid entering a password. -.Ip "never" 8 +.IP "never" 8 .IX Item "never" The user need never enter a password to use the \fB\-v\fR flag. -.Ip "always" 8 +.IP "always" 8 .IX Item "always" The user must always enter a password to use the \fB\-v\fR flag. .RE @@ -687,24 +735,23 @@ The user must always enter a password to use the \fB\-v\fR flag. .Sp The default value is `all'. .RE -.Ip "listpw" 12 +.IP "listpw" 12 .IX Item "listpw" This option controls when a password will be required when a -user runs \fBsudo\fR with the \fB\-l\fR flag. It has the -following possible values: +user runs \fBsudo\fR with the \fB\-l\fR flag. It has the following possible values: .RS 12 -.Ip "all" 8 +.IP "all" 8 .IX Item "all" All the user's \fIsudoers\fR entries for the current host must have the \f(CW\*(C`NOPASSWD\*(C'\fR flag set to avoid entering a password. -.Ip "any" 8 +.IP "any" 8 .IX Item "any" At least one of the user's \fIsudoers\fR entries for the current host must have the \f(CW\*(C`NOPASSWD\*(C'\fR flag set to avoid entering a password. -.Ip "never" 8 +.IP "never" 8 .IX Item "never" The user need never enter a password to use the \fB\-l\fR flag. -.Ip "always" 8 +.IP "always" 8 .IX Item "always" The user must always enter a password to use the \fB\-l\fR flag. .RE @@ -714,33 +761,35 @@ The default value is `any'. .RE .PP \&\fBLists that can be used in a boolean context\fR: -.Ip "env_check" 12 +.IP "env_check" 12 .IX Item "env_check" Environment variables to be removed from the user's environment if the variable's value contains \f(CW\*(C`%\*(C'\fR or \f(CW\*(C`/\*(C'\fR characters. This can be used to guard against printf-style format vulnerabilities in -poorly-written programs. The argument may be a double-quoted, -space-separated list or a single value without double-quotes. The +poorly-written programs. The argument may be a double\-quoted, +space-separated list or a single value without double\-quotes. The list can be replaced, added to, deleted from, or disabled by using the \f(CW\*(C`=\*(C'\fR, \f(CW\*(C`+=\*(C'\fR, \f(CW\*(C`\-=\*(C'\fR, and \f(CW\*(C`!\*(C'\fR operators respectively. The default list of environment variables to check is printed when \fBsudo\fR is run by root with the \fI\-V\fR option. -.Ip "env_delete" 12 +.IP "env_delete" 12 .IX Item "env_delete" Environment variables to be removed from the user's environment. -The argument may be a double-quoted, space-separated list or a -single value without double-quotes. The list can be replaced, added +The argument may be a double\-quoted, space-separated list or a +single value without double\-quotes. The list can be replaced, added to, deleted from, or disabled by using the \f(CW\*(C`=\*(C'\fR, \f(CW\*(C`+=\*(C'\fR, \f(CW\*(C`\-=\*(C'\fR, and \&\f(CW\*(C`!\*(C'\fR operators respectively. The default list of environment variables to remove is printed when \fBsudo\fR is run by root with the -\&\fI\-V\fR option. -.Ip "env_keep" 12 +\&\fI\-V\fR option. Note that many operating systems will remove potentially +dangerous variables from the environment of any setuid process (such +as \fBsudo\fR). +.IP "env_keep" 12 .IX Item "env_keep" Environment variables to be preserved in the user's environment when the \fIenv_reset\fR option is in effect. This allows fine-grained control over the environment \fBsudo\fR\-spawned processes will receive. -The argument may be a double-quoted, space-separated list or a -single value without double-quotes. The list can be replaced, added +The argument may be a double\-quoted, space-separated list or a +single value without double\-quotes. The list can be replaced, added to, deleted from, or disabled by using the \f(CW\*(C`=\*(C'\fR, \f(CW\*(C`+=\*(C'\fR, \f(CW\*(C`\-=\*(C'\fR, and \&\f(CW\*(C`!\*(C'\fR operators respectively. This list has no default members. .PP @@ -756,16 +805,20 @@ syslog priorities are supported: \fBalert\fR, \fBcrit\fR, \fBdebug\fR, \fBemerg\ \& User_Spec ::= User_list Host_List '=' Cmnd_Spec_List \e \& (':' User_Spec)* .Ve +.PP .Vb 2 \& Cmnd_Spec_List ::= Cmnd_Spec | \& Cmnd_Spec ',' Cmnd_Spec_List .Ve +.PP .Vb 1 \& Cmnd_Spec ::= Runas_Spec? ('NOPASSWD:' | 'PASSWD:')? Cmnd .Ve +.PP .Vb 1 \& Runas_Spec ::= '(' Runas_List ')' .Ve +.PP A \fBuser specification\fR determines which commands a user may run (and as what user) on specified hosts. By default, commands are run as \fBroot\fR, but this can be changed on a per-command basis. @@ -782,18 +835,21 @@ commands that follow it. What this means is that for the entry: .Vb 1 \& dgb boulder = (operator) /bin/ls, /bin/kill, /usr/bin/lprm .Ve +.PP The user \fBdgb\fR may run \fI/bin/ls\fR, \fI/bin/kill\fR, and \&\fI/usr/bin/lprm\fR \*(-- but only as \fBoperator\fR. E.g., .PP .Vb 1 \& sudo -u operator /bin/ls. .Ve +.PP It is also possible to override a \f(CW\*(C`Runas_Spec\*(C'\fR later on in an entry. If we modify the entry like so: .PP .Vb 1 \& dgb boulder = (operator) /bin/ls, (root) /bin/kill, /usr/bin/lprm .Ve +.PP Then user \fBdgb\fR is now allowed to run \fI/bin/ls\fR as \fBoperator\fR, but \fI/bin/kill\fR and \fI/usr/bin/lprm\fR as \fBroot\fR. .Sh "\s-1NOPASSWD\s0 and \s-1PASSWD\s0" @@ -808,6 +864,7 @@ For example: .Vb 1 \& ray rushmore = NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm .Ve +.PP would allow the user \fBray\fR to run \fI/bin/kill\fR, \fI/bin/ls\fR, and \&\fI/usr/bin/lprm\fR as root on the machine rushmore as \fBroot\fR without authenticating himself. If we only want \fBray\fR to be able to @@ -816,6 +873,7 @@ run \fI/bin/kill\fR without a password the entry would be: .Vb 1 \& ray rushmore = NOPASSWD: /bin/kill, PASSWD: /bin/ls, /usr/bin/lprm .Ve +.PP Note, however, that the \f(CW\*(C`PASSWD\*(C'\fR tag has no effect on users who are in the group specified by the exempt_group option. .PP @@ -829,21 +887,26 @@ This behavior may be overridden via the verifypw and listpw options. .IX Subsection "Wildcards (aka meta characters):" \&\fBsudo\fR allows shell-style \fIwildcards\fR to be used in pathnames as well as command line arguments in the \fIsudoers\fR file. Wildcard -matching is done via the \fB\s-1POSIX\s0\fR \f(CW\*(C`fnmatch(3)\*(C'\fR routine. Note that +matching is done via the \fB\s-1POSIX\s0\fR \f(CWfnmatch(3)\fR routine. Note that these are \fInot\fR regular expressions. -.Ip "\f(CW\*(C`*\*(C'\fR" 8 +.ie n .IP "\*(C`*\*(C'" 8 +.el .IP "\f(CW\*(C`*\*(C'\fR" 8 .IX Item "*" Matches any set of zero or more characters. -.Ip "\f(CW\*(C`?\*(C'\fR" 8 +.ie n .IP "\*(C`?\*(C'" 8 +.el .IP "\f(CW\*(C`?\*(C'\fR" 8 .IX Item "?" Matches any single character. -.Ip "\f(CW\*(C`[...]\*(C'\fR" 8 +.ie n .IP "\*(C`[...]\*(C'" 8 +.el .IP "\f(CW\*(C`[...]\*(C'\fR" 8 .IX Item "[...]" Matches any character in the specified range. -.Ip "\f(CW\*(C`[!...]\*(C'\fR" 8 +.ie n .IP "\*(C`[!...]\*(C'" 8 +.el .IP "\f(CW\*(C`[!...]\*(C'\fR" 8 .IX Item "[!...]" Matches any character \fBnot\fR in the specified range. -.Ip "\f(CW\*(C`\ex\*(C'\fR" 8 +.ie n .IP "\*(C`\ex\*(C'" 8 +.el .IP "\f(CW\*(C`\ex\*(C'\fR" 8 .IX Item "x" For any character \*(L"x\*(R", evaluates to \*(L"x\*(R". This is used to escape special characters such as: \*(L"*\*(R", \*(L"?\*(R", \*(L"[\*(R", and \*(L"}\*(R". @@ -856,14 +919,15 @@ wildcards. This is to make a path like: .Vb 1 \& /usr/bin/* .Ve +.PP match \f(CW\*(C`/usr/bin/who\*(C'\fR but not \f(CW\*(C`/usr/bin/X11/xterm\*(C'\fR. .Sh "Exceptions to wildcard rules:" .IX Subsection "Exceptions to wildcard rules:" The following exceptions apply to the above rules: -.if n .Ip "\f(CW""""\fR" 8 -.el .Ip "\f(CW``''\fR" 8 -.IX Item """"" -If the empty string \f(CW\*(C`""\*(C'\fR is the only command line argument in the +.ie n .IP """""" 8 +.el .IP "\f(CW``''\fR" 8 +.IX Item """""" +If the empty string \f(CW""\fR is the only command line argument in the \&\fIsudoers\fR entry it means that command is not allowed to be run with \fBany\fR arguments. .Sh "Other special characters and reserved words:" @@ -909,11 +973,13 @@ these are a bit contrived. First, we define our \fIaliases\fR: \& User_Alias PARTTIMERS = bostley, jwfox, crawl \& User_Alias WEBMASTERS = will, wendy, wim .Ve +.PP .Vb 3 \& # Runas alias specification \& Runas_Alias OP = root, operator \& Runas_Alias DB = oracle, sybase .Ve +.PP .Vb 9 \& # Host alias specification \& Host_Alias SPARC = bigtime, eclipse, moet, anchor :\e @@ -925,6 +991,7 @@ these are a bit contrived. First, we define our \fIaliases\fR: \& Host_Alias SERVERS = master, mail, www, ns \& Host_Alias CDROM = orion, perseus, hercules .Ve +.PP .Vb 12 \& # Cmnd alias specification \& Cmnd_Alias DUMPS = /usr/bin/mt, /usr/sbin/dump, /usr/sbin/rdump,\e @@ -939,21 +1006,26 @@ these are a bit contrived. First, we define our \fIaliases\fR: \& /usr/local/bin/zsh \& Cmnd_Alias SU = /usr/bin/su .Ve +.PP Here we override some of the compiled in default values. We want -\&\fBsudo\fR to log via \fIsyslog\fR\|(3) using the \fIauth\fR facility in all cases. -We don't want to subject the full time staff to the \fBsudo\fR lecture, -and user \fBmillert\fR need not give a password. In addition, on the -machines in the \fI\s-1SERVERS\s0\fR \f(CW\*(C`Host_Alias\*(C'\fR, we keep an additional -local log file and make sure we log the year in each log line since -the log entries will be kept around for several years. +\&\fBsudo\fR to log via \fIsyslog\fR\|(3) using the \fIauth\fR facility in all +cases. We don't want to subject the full time staff to the \fBsudo\fR +lecture, user \fBmillert\fR need not give a password, and we don't +want to set the \f(CW\*(C`LOGNAME\*(C'\fR or \f(CW\*(C`USER\*(C'\fR environment variables when +running commands as root. Additionally, on the machines in the +\&\fI\s-1SERVERS\s0\fR \f(CW\*(C`Host_Alias\*(C'\fR, we keep an additional local log file and +make sure we log the year in each log line since the log entries +will be kept around for several years. .PP -.Vb 5 +.Vb 6 \& # Override built in defaults \& Defaults syslog=auth +\& Defaults>root !set_logname \& Defaults:FULLTIMERS !lecture \& Defaults:millert !authenticate \& Defaults@SERVERS log_year, logfile=/var/log/sudo.log .Ve +.PP The \fIUser specification\fR is the part that actually determines who may run what. .PP @@ -961,18 +1033,21 @@ run what. \& root ALL = (ALL) ALL \& %wheel ALL = (ALL) ALL .Ve +.PP We let \fBroot\fR and any user in group \fBwheel\fR run any command on any host as any user. .PP .Vb 1 \& FULLTIMERS ALL = NOPASSWD: ALL .Ve +.PP Full time sysadmins (\fBmillert\fR, \fBmikef\fR, and \fBdowdy\fR) may run any command on any host without authenticating themselves. .PP .Vb 1 \& PARTTIMERS ALL = ALL .Ve +.PP Part time sysadmins (\fBbostley\fR, \fBjwfox\fR, and \fBcrawl\fR) may run any command on any host but they must authenticate themselves first (since the entry lacks the \f(CW\*(C`NOPASSWD\*(C'\fR tag). @@ -980,9 +1055,10 @@ command on any host but they must authenticate themselves first .Vb 1 \& jack CSNETS = ALL .Ve +.PP The user \fBjack\fR may run any command on the machines in the \fI\s-1CSNETS\s0\fR alias -(the networks \f(CW\*(C`128.138.243.0\*(C'\fR, \f(CW\*(C`128.138.204.0\*(C'\fR, and \f(CW\*(C`128.138.242.0\*(C'\fR). -Of those networks, only \f(CW\*(C`128.138.204.0\*(C'\fR has an explicit netmask (in +(the networks \f(CW128.138.243.0\fR, \f(CW128.138.204.0\fR, and \f(CW128.138.242.0\fR). +Of those networks, only \f(CW128.138.204.0\fR has an explicit netmask (in \&\s-1CIDR\s0 notation) indicating it is a class C network. For the other networks in \fI\s-1CSNETS\s0\fR, the local machine's netmask will be used during matching. @@ -990,13 +1066,15 @@ during matching. .Vb 1 \& lisa CUNETS = ALL .Ve +.PP The user \fBlisa\fR may run any command on any host in the \fI\s-1CUNETS\s0\fR alias -(the class B network \f(CW\*(C`128.138.0.0\*(C'\fR). +(the class B network \f(CW128.138.0.0\fR). .PP .Vb 2 \& operator ALL = DUMPS, KILL, PRINTING, SHUTDOWN, HALT, REBOOT,\e \& /usr/oper/bin/ .Ve +.PP The \fBoperator\fR user may run commands limited to simple maintenance. Here, those are commands related to backups, killing processes, the printing system, shutting down the system, and any commands in the @@ -1005,11 +1083,13 @@ directory \fI/usr/oper/bin/\fR. .Vb 1 \& joe ALL = /usr/bin/su operator .Ve +.PP The user \fBjoe\fR may only \fIsu\fR\|(1) to operator. .PP .Vb 1 \& pete HPPA = /usr/bin/passwd [A-z]*, !/usr/bin/passwd root .Ve +.PP The user \fBpete\fR is allowed to change anyone's password except for root on the \fI\s-1HPPA\s0\fR machines. Note that this assumes \fIpasswd\fR\|(1) does not take multiple usernames on the command line. @@ -1017,18 +1097,21 @@ does not take multiple usernames on the command line. .Vb 1 \& bob SPARC = (OP) ALL : SGI = (OP) ALL .Ve +.PP The user \fBbob\fR may run anything on the \fI\s-1SPARC\s0\fR and \fI\s-1SGI\s0\fR machines as any user listed in the \fI\s-1OP\s0\fR \f(CW\*(C`Runas_Alias\*(C'\fR (\fBroot\fR and \fBoperator\fR). .PP .Vb 1 \& jim +biglab = ALL .Ve +.PP The user \fBjim\fR may run any command on machines in the \fIbiglab\fR netgroup. \&\fBSudo\fR knows that \*(L"biglab\*(R" is a netgroup due to the '+' prefix. .PP .Vb 1 \& +secretaries ALL = PRINTING, /usr/bin/adduser, /usr/bin/rmuser .Ve +.PP Users in the \fBsecretaries\fR netgroup need to help manage the printers as well as add and remove users, so they are allowed to run those commands on all machines. @@ -1036,24 +1119,28 @@ commands on all machines. .Vb 1 \& fred ALL = (DB) NOPASSWD: ALL .Ve +.PP The user \fBfred\fR can run commands as any user in the \fI\s-1DB\s0\fR \f(CW\*(C`Runas_Alias\*(C'\fR (\fBoracle\fR or \fBsybase\fR) without giving a password. .PP .Vb 1 \& john ALPHA = /usr/bin/su [!-]*, !/usr/bin/su *root* .Ve +.PP On the \fI\s-1ALPHA\s0\fR machines, user \fBjohn\fR may su to anyone except root but he is not allowed to give \fIsu\fR\|(1) any flags. .PP .Vb 1 \& jen ALL, !SERVERS = ALL .Ve +.PP The user \fBjen\fR may run any command on any machine except for those in the \fI\s-1SERVERS\s0\fR \f(CW\*(C`Host_Alias\*(C'\fR (master, mail, www and ns). .PP .Vb 1 \& jill SERVERS = /usr/bin/, !SU, !SHELLS .Ve +.PP For any machine in the \fI\s-1SERVERS\s0\fR \f(CW\*(C`Host_Alias\*(C'\fR, \fBjill\fR may run any commands in the directory /usr/bin/ except for those commands belonging to the \fI\s-1SU\s0\fR and \fI\s-1SHELLS\s0\fR \f(CW\*(C`Cmnd_Aliases\*(C'\fR. @@ -1061,18 +1148,21 @@ belonging to the \fI\s-1SU\s0\fR and \fI\s-1SHELLS\s0\fR \f(CW\*(C`Cmnd_Aliases\ .Vb 1 \& steve CSNETS = (operator) /usr/local/op_commands/ .Ve +.PP The user \fBsteve\fR may run any command in the directory /usr/local/op_commands/ but only as user operator. .PP .Vb 1 \& matt valkyrie = KILL .Ve +.PP On his personal workstation, valkyrie, \fBmatt\fR needs to be able to kill hung processes. .PP .Vb 1 \& WEBMASTERS www = (www) ALL, (root) /usr/bin/su www .Ve +.PP On the host www, any user in the \fI\s-1WEBMASTERS\s0\fR \f(CW\*(C`User_Alias\*(C'\fR (will, wendy, and wim), may run any command as user www (which owns the web pages) or simply \fIsu\fR\|(1) to www. @@ -1081,7 +1171,8 @@ web pages) or simply \fIsu\fR\|(1) to www. \& ALL CDROM = NOPASSWD: /sbin/umount /CDROM,\e \& /sbin/mount -o nosuid\e,nodev /dev/cd0a /CDROM .Ve -Any user may mount or unmount a \s-1CD-ROM\s0 on the machines in the \s-1CDROM\s0 +.PP +Any user may mount or unmount a CD-ROM on the machines in the \s-1CDROM\s0 \&\f(CW\*(C`Host_Alias\*(C'\fR (orion, perseus, hercules) without entering a password. This is a bit tedious for users to type, so it is a prime candidate for encapsulating in a shell script. @@ -1095,6 +1186,7 @@ executing that. For example: .Vb 1 \& bill ALL = ALL, !SU, !SHELLS .Ve +.PP Doesn't really prevent \fBbill\fR from running the commands listed in \&\fI\s-1SU\s0\fR or \fI\s-1SHELLS\s0\fR since he can simply copy those commands to a different name, or use a shell escape from an editor or other @@ -1121,4 +1213,4 @@ as returned by the \f(CW\*(C`hostname\*(C'\fR command or use the \fIfqdn\fR opti .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" -\&\fIrsh\fR\|(1), \fIsu\fR\|(1), \fIfnmatch\fR\|(3), \fIsudo\fR\|(8), \fIvisudo\fR\|(8). +\&\fIrsh\fR\|(1), \fIsu\fR\|(1), \fIfnmatch\fR\|(3), \fIsudo\fR\|(8), \fIvisudo\fR\|(8) diff --git a/usr.bin/sudo/testsudoers.c b/usr.bin/sudo/testsudoers.c index 88fc2afc1bf..d50c15b8432 100644 --- a/usr.bin/sudo/testsudoers.c +++ b/usr.bin/sudo/testsudoers.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * This code is derived from software contributed by Chris Jepeway. @@ -82,7 +82,7 @@ #endif /* HAVE_FNMATCH */ #ifndef lint -static const char rcsid[] = "$Sudo: testsudoers.c,v 1.76 2002/03/16 00:44:48 millert Exp $"; +static const char rcsid[] = "$Sudo: testsudoers.c,v 1.79 2003/03/15 20:31:02 millert Exp $"; #endif /* lint */ @@ -91,7 +91,7 @@ static const char rcsid[] = "$Sudo: testsudoers.c,v 1.76 2002/03/16 00:44:48 mil */ void init_parser __P((void)); void dumpaliases __P((void)); -void set_perms_dummy __P((int, int)); +void set_perms_dummy __P((int)); /* * Globals @@ -102,7 +102,7 @@ int parse_error = FALSE; int num_interfaces; struct interface *interfaces; struct sudo_user sudo_user; -void (*set_perms) __P((int, int)) = set_perms_dummy; +void (*set_perms) __P((int)) = set_perms_dummy; extern int clearaliases; extern int pedantic; @@ -311,8 +311,8 @@ netgr_matches(netgr, host, shost, user) } void -set_perms_dummy(i, j) - int i, j; +set_perms_dummy(i) + int i; { return; } @@ -377,17 +377,23 @@ main(argc, argv) /* Fill in cmnd_args from NewArgv. */ if (NewArgc > 1) { - size_t size; char *to, **from; + size_t size, n; - size = (size_t) NewArgv[NewArgc-1] + strlen(NewArgv[NewArgc-1]) - - (size_t) NewArgv[1] + 1; + size = (size_t) (NewArgv[NewArgc-1] - NewArgv[1]) + + strlen(NewArgv[NewArgc-1]) + 1; user_args = (char *) emalloc(size); - for (to = user_args, from = &NewArgv[1]; *from; from++) { + for (to = user_args, from = NewArgv + 1; *from; from++) { + n = strlcpy(to, *from, size - (to - user_args)); + if (n >= size) { + (void) fprintf(stderr, + "%s: internal error, init_vars() overflow\n", Argv[0]); + exit(1); + } + to += n; *to++ = ' '; - (void) strcpy(to, *from); - to += strlen(*from); } + *--to = '\0'; } /* Initialize default values. */ diff --git a/usr.bin/sudo/tgetpass.c b/usr.bin/sudo/tgetpass.c index 62f73da6ca6..f6c174a00dd 100644 --- a/usr.bin/sudo/tgetpass.c +++ b/usr.bin/sudo/tgetpass.c @@ -83,7 +83,7 @@ #include "sudo.h" #ifndef lint -static const char rcsid[] = "$Sudo: tgetpass.c,v 1.103 2001/12/17 23:56:47 millert Exp $"; +static const char rcsid[] = "$Sudo: tgetpass.c,v 1.104 2002/12/13 18:20:34 millert Exp $"; #endif /* lint */ #ifndef TCSASOFT @@ -154,9 +154,6 @@ restart: output = STDERR_FILENO; } - if (prompt) - (void) write(output, prompt, strlen(prompt)); - /* * Catch signals that would otherwise cause the user to end * up with echo turned off in the shell. Don't worry about @@ -187,6 +184,9 @@ restart: memset(&oterm, 0, sizeof(oterm)); } + if (prompt) + (void) write(output, prompt, strlen(prompt)); + pass = tgetline(input, buf, sizeof(buf), timeout); save_errno = errno; diff --git a/usr.bin/sudo/version.h b/usr.bin/sudo/version.h index bc7b7c6a4d0..7321bc0d433 100644 --- a/usr.bin/sudo/version.h +++ b/usr.bin/sudo/version.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2002 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Sudo: version.h,v 1.61 2002/04/18 15:41:30 millert Exp $ + * $Sudo: version.h,v 1.63 2003/03/15 20:31:02 millert Exp $ */ #ifndef _SUDO_VERSION_H #define _SUDO_VERSION_H -static const char version[] = "1.6.6"; +static const char version[] = "1.6.7"; #endif /* _SUDO_VERSION_H */ diff --git a/usr.bin/sudo/visudo.8 b/usr.bin/sudo/visudo.8 index 00a02735982..823800eaa02 100644 --- a/usr.bin/sudo/visudo.8 +++ b/usr.bin/sudo/visudo.8 @@ -1,7 +1,4 @@ -.\" Automatically generated by Pod::Man version 1.15 -.\" Thu Apr 25 09:34:54 2002 -.\" -.\" Copyright (c) 1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com> +.\" Copyright (c) 1996,1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -33,9 +30,12 @@ .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $Sudo: visudo.man.in,v 1.14 2003/03/15 20:33:31 millert Exp $ +.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: -.\" ====================================================================== +.\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp @@ -48,12 +48,6 @@ .if t .sp .5v .if n .sp .. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. .de Vb \" Begin verbatim text .ft CW .nf @@ -61,15 +55,14 @@ .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used -.\" to do unbreakable dashes and therefore won't be available. \*(C` and -.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ @@ -89,10 +82,10 @@ . ds R" '' 'br\} .\" -.\" If the F register is turned on, we'll generate index entries on stderr -.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and -.\" index entries marked with X<> in POD. Of course, you'll have to process -.\" the output yourself in some meaningful fashion. +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" @@ -101,14 +94,13 @@ . rr F .\} .\" -.\" For nroff, turn off justification. Always turn off hyphenation; it -.\" makes way too many mistakes in technical documents. +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. -.bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 @@ -168,11 +160,10 @@ . ds Ae AE .\} .rm #[ #] #H #V #F C -.\" ====================================================================== +.\" ======================================================================== .\" -.IX Title "visudo 8" -.TH visudo 8 "1.6.6" "April 25, 2002" "MAINTENANCE COMMANDS" -.UC +.IX Title "VISUDO 8" +.TH VISUDO 8 "March 13, 2003" "1.6.7" "MAINTENANCE COMMANDS" .SH "NAME" visudo \- edit the sudoers file .SH "SYNOPSIS" @@ -192,7 +183,7 @@ at compile-time that may be overridden via the \fIeditor\fR \fIsudoers\fR your system, as determined by the \fIconfigure\fR script. Normally, \&\fBvisudo\fR does not honor the \f(CW\*(C`EDITOR\*(C'\fR or \f(CW\*(C`VISUAL\*(C'\fR environment variables unless they contain an editor in the aforementioned editors -list. However, if \fBvisudo\fR is configured with the \fI\*(--with-enveditor\fR +list. However, if \fBvisudo\fR is configured with the \fI\-\-with\-enveditor\fR flag or the \fIenveditor\fR \f(CW\*(C`Default\*(C'\fR variable is set in \fIsudoers\fR, \&\fBvisudo\fR will use any the editor defines by \f(CW\*(C`EDITOR\*(C'\fR or \f(CW\*(C`VISUAL\*(C'\fR. Note that this can be a security hole since it allows the user to @@ -200,7 +191,7 @@ execute any program they wish simply by setting \f(CW\*(C`EDITOR\*(C'\fR or \f(C .PP \&\fBvisudo\fR parses the \fIsudoers\fR file after the edit and will not save the changes if there is a syntax error. Upon finding -an error, \fBvisudo\fR will print a message stating the line \fInumber\fR\|(s) +an error, \fBvisudo\fR will print a message stating the line number(s) where the error occurred and the user will receive the \&\*(L"What now?\*(R" prompt. At this point the user may enter \*(L"e\*(R" to re-edit the \fIsudoers\fR file, \*(L"x\*(R" to exit without @@ -214,7 +205,7 @@ error occurred (if the editor supports this feature). .SH "OPTIONS" .IX Header "OPTIONS" \&\fBvisudo\fR accepts the following command line options: -.Ip "\-c" 4 +.IP "\-c" 4 .IX Item "-c" Enable \fBcheck-only\fR mode. The existing \fIsudoers\fR file will be checked for syntax and a message will be printed to the @@ -222,40 +213,40 @@ standard output detailing the status of \fIsudoers\fR. If the syntax check completes successfully, \fBvisudo\fR will exit with a value of 0. If a syntax error is encountered, \&\fBvisudo\fR will exit with a value of 1. -.Ip "\-f" 4 +.IP "\-f" 4 .IX Item "-f" Specify and alternate \fIsudoers\fR file location. With this option \&\fBvisudo\fR will edit (or check) the \fIsudoers\fR file of your choice, instead of the default, \f(CW@sysconfdir\fR@/sudoers. The lock file used is the specified \fIsudoers\fR file with \*(L".tmp\*(R" appended to it. -.Ip "\-q" 4 +.IP "\-q" 4 .IX Item "-q" Enable \fBquiet\fR mode. In this mode details about syntax errors are not printed. This option is only useful when combined with the \fB\-c\fR flag. -.Ip "\-s" 4 +.IP "\-s" 4 .IX Item "-s" Enable \fBstrict\fR checking of the \fIsudoers\fR file. If an alias is used before it is defined, \fBvisudo\fR will consider this a parse error. Note that it is not possible to differentiate between an alias and a hostname or username that consists solely of uppercase letters, digits, and the underscore ('_') character. -.Ip "\-V" 4 +.IP "\-V" 4 .IX Item "-V" The \fB\-V\fR (version) option causes \fBvisudo\fR to print its version number and exit. .SH "ERRORS" .IX Header "ERRORS" -.Ip "sudoers file busy, try again later." 4 +.IP "sudoers file busy, try again later." 4 .IX Item "sudoers file busy, try again later." Someone else is currently editing the \fIsudoers\fR file. -.Ip "/etc/sudoers.tmp: Permission denied" 4 +.IP "/etc/sudoers.tmp: Permission denied" 4 .IX Item "/etc/sudoers.tmp: Permission denied" You didn't run \fBvisudo\fR as root. -.Ip "Can't find you in the passwd database" 4 +.IP "Can't find you in the passwd database" 4 .IX Item "Can't find you in the passwd database" Your userid does not appear in the system passwd file. -.Ip "Warning: undeclared Alias referenced near ..." 4 +.IP "Warning: undeclared Alias referenced near ..." 4 .IX Item "Warning: undeclared Alias referenced near ..." Either you are using a {User,Runas,Host,Cmnd}_Alias before defining it or you have a user or hostname listed that @@ -266,7 +257,7 @@ mode these are errors, not warnings. .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" The following environment variables are used only if \fBvisudo\fR -was configured with the \fI\*(--with-env-editor\fR option: +was configured with the \fI\-\-with\-env\-editor\fR option: .PP .Vb 2 \& EDITOR Invoked by visudo as the editor to use @@ -286,6 +277,7 @@ Many people have worked on \fIsudo\fR over the years; this version of .Vb 1 \& Todd Miller <Todd.Miller@courtesan.com> .Ve +.PP See the \s-1HISTORY\s0 file in the sudo distribution or visit http://www.sudo.ws/sudo/history.html for more details. .SH "BUGS" @@ -304,4 +296,4 @@ There is no easy way to prevent a user from gaining a root shell if the editor used by \fBvisudo\fR allows shell escapes. .SH "SEE ALSO" .IX Header "SEE ALSO" -\&\fIvi\fR\|(1), \fIsudo\fR\|(8), \fIvipw\fR\|(8). +\&\fIvi\fR\|(1), \fIsudoers\fR\|(5), \fIsudo\fR\|(8), \fIvipw\fR\|(8) diff --git a/usr.bin/sudo/visudo.c b/usr.bin/sudo/visudo.c index c3a1c59584d..faccead96d5 100644 --- a/usr.bin/sudo/visudo.c +++ b/usr.bin/sudo/visudo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2001 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,7 +73,7 @@ #include "version.h" #ifndef lint -static const char rcsid[] = "$Sudo: visudo.c,v 1.146 2002/01/17 15:35:54 millert Exp $"; +static const char rcsid[] = "$Sudo: visudo.c,v 1.149 2003/03/15 20:31:02 millert Exp $"; #endif /* lint */ /* @@ -231,16 +231,24 @@ main(argc, argv) Exit(-1); } + /* Add missing newline at EOF if needed. */ + if (n > 0 && buf[n - 1] != '\n') { + buf[0] = '\n'; + write(stmp_fd, buf, 1); + } + (void) close(stmp_fd); (void) touch(stmp, sudoers_sb.st_mtime); /* Parse sudoers to pull in editor and env_editor conf values. */ if ((yyin = fopen(stmp, "r"))) { yyout = stdout; + n = quiet; + quiet = 1; init_parser(); yyparse(); parse_error = FALSE; - yyrestart(yyin); + quiet = n; fclose(yyin); } } else @@ -390,10 +398,7 @@ main(argc, argv) * for parse errors. */ yyout = stdout; - if (parse_error) - yyin = freopen(stmp, "r", yyin); - else - yyin = fopen(stmp, "r"); + yyin = fopen(stmp, "r+"); if (yyin == NULL) { (void) fprintf(stderr, "%s: Can't re-open temporary file (%s), %s unchanged.\n", @@ -401,18 +406,25 @@ main(argc, argv) Exit(-1); } + /* Add missing newline at EOF if needed. */ + if (fseek(yyin, -1, SEEK_END) == 0 && (ch = fgetc(yyin)) != '\n') + fputc('\n', yyin); + rewind(yyin); + /* Clean slate for each parse */ user_runas = NULL; init_defaults(); init_parser(); - /* Parse the sudoers file */ + /* Parse the sudoers temp file */ + yyrestart(yyin); if (yyparse() && parse_error != TRUE) { (void) fprintf(stderr, "%s: Failed to parse temporary file (%s), unknown error.\n", Argv[0], stmp); parse_error = TRUE; } + fclose(yyin); } else { (void) fprintf(stderr, "%s: Editor (%s) failed, %s unchanged.\n", Argv[0], @@ -432,7 +444,6 @@ main(argc, argv) Exit(0); break; } - yyrestart(yyin); /* reset lexer */ } } while (parse_error == TRUE); |