diff options
-rw-r--r-- | usr.bin/sudo/BUGS | 2 | ||||
-rw-r--r-- | usr.bin/sudo/CHANGES | 30 | ||||
-rw-r--r-- | usr.bin/sudo/INSTALL | 16 | ||||
-rw-r--r-- | usr.bin/sudo/LICENSE | 2 | ||||
-rw-r--r-- | usr.bin/sudo/Makefile.in | 9 | ||||
-rw-r--r-- | usr.bin/sudo/README | 2 | ||||
-rw-r--r-- | usr.bin/sudo/RUNSON | 42 | ||||
-rw-r--r-- | usr.bin/sudo/TROUBLESHOOTING | 5 | ||||
-rw-r--r-- | usr.bin/sudo/aixcrypt.exp | 4 | ||||
-rw-r--r-- | usr.bin/sudo/auth/pam.c | 19 | ||||
-rw-r--r-- | usr.bin/sudo/config.h.in | 6 | ||||
-rw-r--r-- | usr.bin/sudo/configure | 604 | ||||
-rw-r--r-- | usr.bin/sudo/configure.in | 46 | ||||
-rw-r--r-- | usr.bin/sudo/defaults.c | 176 | ||||
-rw-r--r-- | usr.bin/sudo/defaults.h | 59 | ||||
-rw-r--r-- | usr.bin/sudo/install-sh | 2 | ||||
-rw-r--r-- | usr.bin/sudo/parse.c | 65 | ||||
-rw-r--r-- | usr.bin/sudo/parse.h | 6 | ||||
-rw-r--r-- | usr.bin/sudo/parse.yacc | 16 | ||||
-rw-r--r-- | usr.bin/sudo/sudo.8 | 21 | ||||
-rw-r--r-- | usr.bin/sudo/sudo.c | 44 | ||||
-rw-r--r-- | usr.bin/sudo/sudo.h | 19 | ||||
-rw-r--r-- | usr.bin/sudo/sudoers.5 | 104 | ||||
-rw-r--r-- | usr.bin/sudo/testsudoers.c | 16 | ||||
-rw-r--r-- | usr.bin/sudo/tgetpass.c | 8 | ||||
-rw-r--r-- | usr.bin/sudo/version.h | 6 | ||||
-rw-r--r-- | usr.bin/sudo/visudo.8 | 20 | ||||
-rw-r--r-- | usr.bin/sudo/visudo.c | 88 |
28 files changed, 857 insertions, 580 deletions
diff --git a/usr.bin/sudo/BUGS b/usr.bin/sudo/BUGS index 767c285fe29..9077baf784b 100644 --- a/usr.bin/sudo/BUGS +++ b/usr.bin/sudo/BUGS @@ -1,4 +1,4 @@ -Known bugs in sudo version 1.6.1 +Known bugs in sudo version 1.6.2 ================================ 1) "make install-man" should substitute correct paths into the diff --git a/usr.bin/sudo/CHANGES b/usr.bin/sudo/CHANGES index 979c86b56f6..4ac334d196a 100644 --- a/usr.bin/sudo/CHANGES +++ b/usr.bin/sudo/CHANGES @@ -1212,3 +1212,33 @@ Sudo 1.6 released. 382) Use our own fnmatch() if there is no fnmatch.h, even if there is an fnmatch() in libc. + +Sudo 1.6.1 released. + +383) Better behavior for -l and -v flags in conjunction with NOPASSWD and + added "verifypw" and "listpw" options. + +384) For HP-UX with cc, add the -Aa flag along with -D_HPUX_SOURCE. + +385) Fix compilation with K&R compilers. + +386) For netgroup host matching, match against the short version of the + hostname as well as the long one if they are different. + +387) Terminate passwd reading on '\r' in addition to '\n' + +388) Visudo used to loop endlessly if a user entered ^D at the whatnow + prompt. EOF is now treaded as 'x' (exit w/o saving changes). + +389) The 'shell_noargs' runtime option is back based on a patch from + bguillory@email.com. + +390) Systems that return RLIM_INFINITY for RLIMIT_NOFILE (like AIX) + would loop for a very loing time during sudo startup. A value of + RLIM_INFINITY is now ignored (getdtablesize/sysconf is used instead). + +391) Locking in visudo was broken. We now lock the sudoers file, not the + sudoers temp file, which should be safe. + +392) PAM fixups: custom prompts now work correctly and errors are + dealt with more sanely. Patches from Cloyce D. Spradling. diff --git a/usr.bin/sudo/INSTALL b/usr.bin/sudo/INSTALL index 0b4d9862716..37f709ae906 100644 --- a/usr.bin/sudo/INSTALL +++ b/usr.bin/sudo/INSTALL @@ -1,5 +1,5 @@ -Installation instructions for Sudo 1.6 -====================================== +Installation instructions for Sudo 1.6.2 +======================================== Sudo uses a `configure' script to probe the capabilities and type of the system in question. In this release, `configure' takes many @@ -228,12 +228,6 @@ Special features/options: security hole as most editors allow a user to get a shell (which would be a root shell and hence, no logging). - --enable-noargs-shell - If sudo is invoked with no arguments it acts as if the "-s" flag had - been given. That is, it runs a shell as root (the shell is determined - by the SHELL environment variable, falling back on the shell listed - in the invoking user's /etc/passwd entry). - The following options are also configurable at runtime: --with-otp-only @@ -423,6 +417,12 @@ The following options are also configurable at runtime: --enable-log-host Log the hostname in the log file. + --enable-noargs-shell + If sudo is invoked with no arguments it acts as if the "-s" flag had + been given. That is, it runs a shell as root (the shell is determined + by the SHELL environment variable, falling back on the shell listed + in the invoking user's /etc/passwd entry). + --enable-shell-sets-home If sudo is invoked with the "-s" flag the HOME environment variable will be set to the home directory of the target user (which is root diff --git a/usr.bin/sudo/LICENSE b/usr.bin/sudo/LICENSE index cda1d5bae5e..0f6d615f91f 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-1999 Todd C. Miller <Todd.Miller@courtesan.com> + Copyright (c) 1994-1996,1998-2000 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 0070bec9c7b..fea49bbe89c 100644 --- a/usr.bin/sudo/Makefile.in +++ b/usr.bin/sudo/Makefile.in @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com> +# Copyright (c) 1996, 1998-2000 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.190 1999/12/05 02:18:45 millert Exp $ +# $Sudo: Makefile.in,v 1.193 2000/01/17 23:46:24 millert Exp $ # #### Start of system configuration section. #### @@ -138,7 +138,7 @@ TESTOBJS = interfaces.o testsudoers.o $(PARSEOBJS) LIBOBJS = @LIBOBJS@ @ALLOCA@ -VERSION = 1.6.1 +VERSION = 1.6.2 DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES FAQ HISTORY INSTALL INSTALL.configure \ LICENSE Makefile.in PORTING README RUNSON TODO TROUBLESHOOTING \ @@ -295,6 +295,9 @@ install-man: $(INSTALL) -o $(install_uid) -g $(install_gid) -m 0444 $(srcdir)/sudoers.$(mantype) $(mandir5)/sudoers.$(mansect5) @MAN_POSTINSTALL@ +check: + @echo nothing to check + tags: $(SRCS) ctags $(SRCS) diff --git a/usr.bin/sudo/README b/usr.bin/sudo/README index 43145d2b16f..2356fbabe34 100644 --- a/usr.bin/sudo/README +++ b/usr.bin/sudo/README @@ -1,4 +1,4 @@ -This is Sudo version 1.6.1 +This is Sudo version 1.6.2 The sudo philosophy =================== diff --git a/usr.bin/sudo/RUNSON b/usr.bin/sudo/RUNSON index a98a9287583..c3ffa3e8f16 100644 --- a/usr.bin/sudo/RUNSON +++ b/usr.bin/sudo/RUNSON @@ -6,18 +6,19 @@ 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.4 Todd Miller none -SunOS 4.1.3 sun4 gcc2.7.2.1 1.6.1 Todd Miller none +SunOS 4.1.3 sun4 bundled cc 1.6.2 Todd Miller none +SunOS 4.1.3 sun4 gcc2.9.5.2 1.6.2 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.7.2.1 1.6.1 Todd Miller --with-skey +SunOS 4.1.3 sun4 gcc2.9.5.2 1.6.2 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 -Solaris 2.6 sparc gcc2.7.2.1 1.6.1 Todd Miller none -Solaris 2.6 i386 gcc2.7.2.1 1.6.1 Todd Miller none +Solaris 2.6 sparc gcc2.9.5.2 1.6.2 Todd Miller none +Solaris 2.6 sparc gcc2.9.5.2 1.6.2 Todd Miller --with-pam +Solaris 2.6 i386 gcc2.9.5.2 1.6.2 Todd Miller none Solaris 2.6 sparc unbundled cc 1.5.7 Giff Hammar none Solaris 2.6 i386 unbundled cc 1.5.8p2 Udo Keller none -Solaris 7 i386 gcc 2.8.1 1.6 Brian Jackson none +Solaris 7 i386 gcc 2.8.1 1.6.1 Ido Dubrawsky none 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 5.6 sun4u egcs 1.1.2 1.5.9p4 Scott Kinnane none @@ -31,14 +32,14 @@ HP-UX 9.05 hp700 gcc2.7.2.1 1.5.3 Todd Miller none HP-UX 9.05 hp700 gcc2.7.2.1 1.5.3 Todd Miller --with-kerb4 HP-UX 9.07 hp700 unbundled cc 1.5 Alek Komarnitsky --with-C2 HP-UX 9.05 hp700 unbundled cc 1.4 Todd Miller none -HP-UX 10.20 hp700 gcc2.7.2.1 1.6.1 Todd Miller --with-skey -HP-UX 10.10 hp700 unbundled cc 1.5.5b4 Todd Miller --with-skey -HP-UX 10.20 PA-RISC1.1 bundled cc 1.5.4 Leon von Stauber none +HP-UX 10.10 hp700 unbundled cc 1.6.2 Todd Miller --with-skey +HP-UX 10.20 hp700 gcc2.9.5.2 1.6.2 Todd Miller --with-skey +HP-UX 10.20 hp700 bundled cc 1.6.2 Todd Miller none HP-UX 10.20 PA-RISC2.0 bundled cc 1.5.4 Leon von Stauber none 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 10.20 hp700 gcc 2.8.1 1.5.6b2 Jeff Earickson --with-DCE -Ultrix 4.3 mips bundled cc 1.6.1 Todd Miller none +Ultrix 4.3 mips bundled cc 1.6.2 Todd Miller none Ultrix 4.3 mips gcc2.7.2.1 1.5.9 Todd Miller --with-skey IRIX 4.05H mips gcc2.6.3 1.5.3 Todd Miller none IRIX 4.05H mips unbundled cc 1.4 Todd Miller none @@ -46,8 +47,8 @@ IRIX 5.2 mips MipsPro C 1.5.6p1 Brian Jackson none IRIX 5.3 mips MipsPro C 1.5.6p1 Brian Jackson none IRIX 6.2 mips MipsPro C 1.5.6p1 Brian Jackson none IRIX 6.5 mips MipsPro C 1.5.6p1 Brian Jackson none -IRIX 5.3 mips unbundled cc 1.4 Todd Miller none -IRIX 5.3 mips gcc2.7.2.1 1.6.1 Todd Miller --with-skey +IRIX 5.3 mips unbundled cc 1.6.2 Todd Miller none +IRIX 5.3 mips gcc2.9.5.2 1.6.2 Todd Miller --with-skey IRIX 5.3 mips gcc2.7.2.1 1.5.3 Todd Miller --with-kerb4 IRIX 5.3 mips unbundled cc 1.4 Wallace Winfrey --with-C2 IRIX 6.2 mips unbundled cc 1.5 Alek Komarnitsky --with-C2 @@ -65,12 +66,15 @@ NEXTSTEP 3.2 i386 bundled cc 1.3.2 Jonathan Adams none NEXTSTEP 3.3 i386 bundled cc 1.4 Jonathan Adams none NEXTSTEP 3.3 sparc bundled cc 1.5.3 Mike Kienenberger none DEC UNIX 3.2c alpha bundled cc 1.5.3 Todd Miller none -DEC UNIX 4.0D alpha gcc-2.7.2.1 1.6.1 Todd Miller --with-skey +DEC UNIX 4.0D alpha gcc-2.9.5.2 1.6.2 Todd Miller --with-skey DEC UNIX 4.0 alpha gcc-2.7.2.1 1.5.3 Todd Miller --with-kerb4 DEC UNIX 4.0D alpha bundled cc 1.5.3 Randall R. Cable --with-C2 DEC UNIX 4.0E alpha bundled cc 1.5.9p2 Vangelis Haniotakis none AIX 3.2.X rs6000 bundled cc 1.4 Todd Miller none +AIX 4.1.3 rs6000 gcc-2.8.1 1.6.2 Todd Miller none AIX 4.1.3 PowerPC gcc-2.7.0 1.4 Bob Shair none +AIX 4.1.4 rs6000 gcc-2.8.1 1.6.2 Todd Miller none +AIX 4.1.4 rs6000 gcc-2.8.1 1.6.2 Todd Miller --with-authenticate AIX 4.1.5 rs6000 gcc-2.7.2.3 1.4.4 Daniel Robitaille none AIX 4.1.X rs6000 bundled cc 1.5.3 Robin Jackson --with-AFS AIX 4.1.X PowerPC bundled cc 1.5.3 Robin Jackson --with-AFS @@ -81,22 +85,24 @@ AIX 4.3.2 rs6000 egcs 1.1.2 1.5.9p4 Scott Kinnane 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 2.1 i386 shlicc 1.5.3 Todd Miller none -OpenBSD 2.X i586 gcc-2.8.1 1.6.1 Todd Miller none -OpenBSD 2.X alpha gcc-2.8.1 1.5.9 Todd Miller none -OpenBSD 2.X m68k gcc-2.8.1 1.5.9 Todd Miller none +OpenBSD 2.X i586 gcc-2.8.1 1.6.2 Todd Miller none +OpenBSD 2.X alpha gcc-2.8.1 1.6.2 Todd Miller none +OpenBSD 2.X m68k gcc-2.8.1 1.6.2 Todd Miller none +OpenBSD 2.X mvme88k gcc-2.8.1 1.5.9 Steve Murphree none FreeBSD 1.1 i386 gcc 1.3.2 Dworkin Muller none FreeBSD 2.0.5 i386 gcc 1.3.4 Dworkin Muller none FreeBSD 3.2 i386 gcc 2.7.2.1 1.6 Brian Jackson none Linux 1.2.13 i486 gcc-2.7.0 1.4 Michael Forman none Linux 1.2.8 i486 gcc-2.5.8 1.3.5 Ted Coady --with-C2 Linux 2.0.15 i586 gcc-2.7.2.1 1.5 Danny Barron none -Linux 2.0.36 i586 gcc 2.8.1 1.6.1 Todd Miller none +Linux 2.0.36 i586 gcc-2.95.2 1.6.2 Todd Miller none 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.34 alpha egcs-2.90.27 1.5.3 Karl Schlitt none Linux 2.0.33pl1 m68k gcc 2.7.2.3 1.5.6 James Troup none -Linux 2.2.12 i386 pgcc-2.91.66 1.6.1 Todd Miller --with-pam +Linux 2.2.12 i586 gcc-2.95.2 1.6.2 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 Pyramid DC/OSx 1.1 bundled cc 1.4 Les Schuettpelz none ATT SVR4.x i486 Metaware CC 1.4 Chris Ellington none diff --git a/usr.bin/sudo/TROUBLESHOOTING b/usr.bin/sudo/TROUBLESHOOTING index 06ce25c8444..627fa241a7a 100644 --- a/usr.bin/sudo/TROUBLESHOOTING +++ b/usr.bin/sudo/TROUBLESHOOTING @@ -10,6 +10,11 @@ A) Sudo must be setuid root to do its work. You need to do something like your $PATH before the directory containing sudo. If you are going to have '.' in your path you should make sure it is at the end. +Q) Sudo never gives me a chance to enter a password using PAM, it just + says 'Sorry, try again.' three times and quits. +A) You didn't setup PAM to work with sudo. On Linux this generally + means installing sample.pam as /etc/pam.d/sudo. + Q) Sudo is setup to log via syslog(3) but I'm not getting any log messages. A) Make sure you have an entry in your syslog.conf file to save diff --git a/usr.bin/sudo/aixcrypt.exp b/usr.bin/sudo/aixcrypt.exp deleted file mode 100644 index 5ee024ef6bb..00000000000 --- a/usr.bin/sudo/aixcrypt.exp +++ /dev/null @@ -1,4 +0,0 @@ -#! -__setkey -__encrypt -__crypt diff --git a/usr.bin/sudo/auth/pam.c b/usr.bin/sudo/auth/pam.c index 290eae86c0c..12dad345726 100644 --- a/usr.bin/sudo/auth/pam.c +++ b/usr.bin/sudo/auth/pam.c @@ -57,7 +57,7 @@ #include "sudo_auth.h" #ifndef lint -static const char rcsid[] = "$Sudo: pam.c,v 1.12 1999/11/23 18:27:00 millert Exp $"; +static const char rcsid[] = "$Sudo: pam.c,v 1.14 2000/01/24 03:23:40 millert Exp $"; #endif /* lint */ static int sudo_conv __P((int, PAM_CONST struct pam_message **, @@ -100,9 +100,10 @@ pam_verify(pw, prompt, auth) if ((error = pam_authenticate(pamh, PAM_SILENT)) == PAM_SUCCESS) return(AUTH_SUCCESS); - /* Any error other than PAM_PERM_DENIED may indicate a config problem. */ - if (error != PAM_PERM_DENIED && (s = pam_strerror(pamh, error))) { - log_error(NO_EXIT|NO_MAIL, "pam_authenticate: %s\n", s); + /* Any error other than PAM_AUTH_ERR or PAM_MAXTRIES is probably fatal. */ + if (error != PAM_AUTH_ERR && error != PAM_MAXTRIES) { + if ((s = pam_strerror(pamh, error))) + log_error(NO_EXIT|NO_MAIL, "pam_authenticate: %s\n", s); return(AUTH_FATAL); } return(AUTH_FAILURE); @@ -133,7 +134,7 @@ sudo_conv(num_msg, msg, response, appdata_ptr) { struct pam_response *pr; PAM_CONST struct pam_message *pm; - char *p = def_prompt; + const char *p = def_prompt; int echo = 0; extern int nil_pw; @@ -146,9 +147,11 @@ sudo_conv(num_msg, msg, response, appdata_ptr) case PAM_PROMPT_ECHO_ON: echo = 1; case PAM_PROMPT_ECHO_OFF: - /* Override default prompt for unix auth */ - if (strcmp(p, "Password: ") && strcmp(p, "Password:")) - p = (char *) pm->msg; + /* 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. */ pr->resp = estrdup((char *) tgetpass(p, def_ival(I_PW_TIMEOUT) * 60, !echo)); if (*pr->resp == '\0') diff --git a/usr.bin/sudo/config.h.in b/usr.bin/sudo/config.h.in index d419c2329ae..123cb20a624 100644 --- a/usr.bin/sudo/config.h.in +++ b/usr.bin/sudo/config.h.in @@ -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: config.h.in,v 1.141 1999/12/09 04:04:42 millert Exp $ + * $Sudo: config.h.in,v 1.143 2000/01/19 19:07:23 millert Exp $ */ /* @@ -251,8 +251,8 @@ /* Define if you have flock(2). */ #undef HAVE_FLOCK -/* Define if you have ftruncate(2). */ -#undef HAVE_FTRUNCATE +/* Define if you have fstat(2). */ +#undef HAVE_FSTAT /* Define if you have setrlimit(2). */ #undef HAVE_SETRLIMIT diff --git a/usr.bin/sudo/configure b/usr.bin/sudo/configure index e3240583453..876186a6875 100644 --- a/usr.bin/sudo/configure +++ b/usr.bin/sudo/configure @@ -657,7 +657,7 @@ fi -echo "Configuring Sudo version 1.6.1" +echo "Configuring Sudo version 1.6.2" PROGS="sudo visudo" CPPFLAGS="" LDFLAGS="" @@ -2866,9 +2866,21 @@ fi # (XXX - should be an option to configure) #STATIC_SUDO=true + # If using cc, run in ANSI mode if possible + if test -z "$GCC"; then + $CC -Aa 2>&1 | grep 'A option is available only' >conftest.out + if test ! -s conftest.out; then + CPPFLAGS="${CPPFLAGS} -Aa" + fi + rm -f conftest.out + fi + + # Add -D_HPUX_SOURCE so we don't get strict ANSI headers + CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE" + if test "$CHECKSHADOW" = "true"; then echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:2872: checking for getprpwnam in -lsec" >&5 +echo "configure:2884: checking for getprpwnam in -lsec" >&5 if test -n ""; then ac_lib_var=`echo sec'_'getprpwnam | sed 'y% ./+-%___p_%'` else @@ -2880,7 +2892,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 2884 "configure" +#line 2896 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2891,7 +2903,7 @@ int main() { getprpwnam() ; return 0; } EOF -if { (eval echo configure:2895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2910,7 +2922,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then #define HAVE_GETPRPWNAM 1 EOF echo $ac_n "checking for iscomsec in -lsec""... $ac_c" 1>&6 -echo "configure:2914: checking for iscomsec in -lsec" >&5 +echo "configure:2926: checking for iscomsec in -lsec" >&5 if test -n ""; then ac_lib_var=`echo sec'_'iscomsec | sed 'y% ./+-%___p_%'` else @@ -2922,7 +2934,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 2926 "configure" +#line 2938 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2933,7 +2945,7 @@ int main() { iscomsec() ; return 0; } EOF -if { (eval echo configure:2937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2971,15 +2983,6 @@ fi fi fi - # DCE support (requires ANSI C compiler) - if test "$with_DCE" = "yes"; then - if test -n "$GCC"; then - CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE" - else - CPPFLAGS="${CPPFLAGS} -Aa -D_HPUX_SOURCE" - fi - fi - # AFS support needs -lBSD if test "$with_AFS" = "yes"; then AFS_LIBS="-lc -lBSD" @@ -2990,6 +2993,18 @@ fi # (XXX - should be an option to configure) #STATIC_SUDO=true + # If using cc, run in ANSI mode if possible + if test -z "$GCC"; then + $CC -Aa 2>&1 | grep 'A option is available only' >conftest.out + if test ! -s conftest.out; then + CPPFLAGS="${CPPFLAGS} -Aa" + fi + rm -f conftest.out + fi + + # Add -D_HPUX_SOURCE so we don't get strict ANSI headers + CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE" + cat >> confdefs.h <<\EOF #define BROKEN_SYSLOG 1 EOF @@ -2999,12 +3014,12 @@ EOF for ac_func in getspwuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3003: checking for $ac_func" >&5 +echo "configure:3018: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3008 "configure" +#line 3023 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3027,7 +3042,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3067,12 +3082,7 @@ done # order of libs in 9.X is important. -lc_r must be last SUDO_LIBS="${SUDO_LIBS} -ldce -lM -lc_r" LIBS="${LIBS} -ldce -lM -lc_r" - - if test -n "$GCC"; then - CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE -D_REENTRANT -I/usr/include/reentrant" - else - CPPFLAGS="${CPPFLAGS} -Aa -D_HPUX_SOURCE -D_REENTRANT -I/usr/include/reentrant" - fi + CPPFLAGS="${CPPFLAGS} -D_REENTRANT -I/usr/include/reentrant" fi # AFS support needs -lBSD @@ -3104,7 +3114,7 @@ EOF SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-no_library_replacement" echo $ac_n "checking whether to disable sia support on Digital UNIX""... $ac_c" 1>&6 -echo "configure:3108: checking whether to disable sia support on Digital UNIX" >&5 +echo "configure:3118: checking whether to disable sia support on Digital UNIX" >&5 # Check whether --enable-sia or --disable-sia was given. if test "${enable_sia+set}" = set; then enableval="$enable_sia" @@ -3128,12 +3138,12 @@ fi # unless overridden on the command line if test "$CHECKSIA" = "true"; then echo $ac_n "checking for sia_ses_init""... $ac_c" 1>&6 -echo "configure:3132: checking for sia_ses_init" >&5 +echo "configure:3142: checking for sia_ses_init" >&5 if eval "test \"`echo '$''{'ac_cv_func_sia_ses_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3137 "configure" +#line 3147 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char sia_ses_init(); below. */ @@ -3156,7 +3166,7 @@ sia_ses_init(); ; return 0; } EOF -if { (eval echo configure:3160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_sia_ses_init=yes" else @@ -3184,7 +3194,7 @@ fi fi if test "$CHECKSHADOW" = "true"; then echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:3188: checking for getprpwnam in -lsecurity" >&5 +echo "configure:3198: checking for getprpwnam in -lsecurity" >&5 if test -n ""; then ac_lib_var=`echo security'_'getprpwnam | sed 'y% ./+-%___p_%'` else @@ -3196,7 +3206,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <<EOF -#line 3200 "configure" +#line 3210 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3207,7 +3217,7 @@ int main() { getprpwnam() ; return 0; } EOF -if { (eval echo configure:3211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3237,12 +3247,12 @@ EOF # -ldb includes bogus versions of snprintf/vsnprintf echo $ac_n "checking for snprintf""... $ac_c" 1>&6 -echo "configure:3241: checking for snprintf" >&5 +echo "configure:3251: checking for snprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3246 "configure" +#line 3256 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char snprintf(); below. */ @@ -3265,7 +3275,7 @@ snprintf(); ; return 0; } EOF -if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_snprintf=yes" else @@ -3289,12 +3299,12 @@ NEED_SNPRINTF=1 fi echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:3293: checking for vsnprintf" >&5 +echo "configure:3303: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3298 "configure" +#line 3308 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vsnprintf(); below. */ @@ -3317,7 +3327,7 @@ vsnprintf(); ; return 0; } EOF -if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vsnprintf=yes" else @@ -3342,7 +3352,7 @@ fi # 4.x and higher need -ldb too... echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:3346: checking for dbopen in -ldb" >&5 +echo "configure:3356: checking for dbopen in -ldb" >&5 if test -n ""; then ac_lib_var=`echo db'_'dbopen | sed 'y% ./+-%___p_%'` else @@ -3354,7 +3364,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <<EOF -#line 3358 "configure" +#line 3368 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3365,7 +3375,7 @@ int main() { dbopen() ; return 0; } EOF -if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3389,12 +3399,12 @@ fi for ac_func in dispcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3393: checking for $ac_func" >&5 +echo "configure:3403: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3398 "configure" +#line 3408 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3417,7 +3427,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3442,9 +3452,9 @@ fi done echo $ac_n "checking for broken /usr/include/prot.h""... $ac_c" 1>&6 -echo "configure:3446: checking for broken /usr/include/prot.h" >&5 +echo "configure:3456: checking for broken /usr/include/prot.h" >&5 cat > conftest.$ac_ext <<EOF -#line 3448 "configure" +#line 3458 "configure" #include "confdefs.h" #include <sys/types.h> @@ -3455,7 +3465,7 @@ int main() { exit(0); ; return 0; } EOF -if { (eval echo configure:3459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -3501,7 +3511,7 @@ EOF # IRIX <= 4 needs -lsun if test "$OSREV" -le 4; then echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6 -echo "configure:3505: checking for getpwnam in -lsun" >&5 +echo "configure:3515: checking for getpwnam in -lsun" >&5 if test -n ""; then ac_lib_var=`echo sun'_'getpwnam | sed 'y% ./+-%___p_%'` else @@ -3513,7 +3523,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsun $LIBS" cat > conftest.$ac_ext <<EOF -#line 3517 "configure" +#line 3527 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3524,7 +3534,7 @@ int main() { getpwnam() ; return 0; } EOF -if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3556,12 +3566,12 @@ EOF # Some Linux versions need to link with -lshadow if test "$CHECKSHADOW" = "true"; then echo $ac_n "checking for getspnam""... $ac_c" 1>&6 -echo "configure:3560: checking for getspnam" >&5 +echo "configure:3570: checking for getspnam" >&5 if eval "test \"`echo '$''{'ac_cv_func_getspnam'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3565 "configure" +#line 3575 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getspnam(); below. */ @@ -3584,7 +3594,7 @@ getspnam(); ; return 0; } EOF -if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getspnam=yes" else @@ -3605,7 +3615,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for getspnam in -lshadow""... $ac_c" 1>&6 -echo "configure:3609: checking for getspnam in -lshadow" >&5 +echo "configure:3619: checking for getspnam in -lshadow" >&5 if test -n ""; then ac_lib_var=`echo shadow'_'getspnam | sed 'y% ./+-%___p_%'` else @@ -3617,7 +3627,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lshadow $LIBS" cat > conftest.$ac_ext <<EOF -#line 3621 "configure" +#line 3631 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3628,7 +3638,7 @@ int main() { getspnam() ; return 0; } EOF -if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3667,7 +3677,7 @@ EOF if test "$CHECKSHADOW" = "true"; then echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:3671: checking for getprpwnam in -lsec" >&5 +echo "configure:3681: checking for getprpwnam in -lsec" >&5 if test -n ""; then ac_lib_var=`echo sec'_'getprpwnam | sed 'y% ./+-%___p_%'` else @@ -3679,7 +3689,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 3683 "configure" +#line 3693 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3690,7 +3700,7 @@ int main() { getprpwnam() ; return 0; } EOF -if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3720,7 +3730,7 @@ fi OS="ultrix" if test "$CHECKSHADOW" = "true"; then echo $ac_n "checking for getauthuid in -lauth""... $ac_c" 1>&6 -echo "configure:3724: checking for getauthuid in -lauth" >&5 +echo "configure:3734: checking for getauthuid in -lauth" >&5 if test -n ""; then ac_lib_var=`echo auth'_'getauthuid | sed 'y% ./+-%___p_%'` else @@ -3732,7 +3742,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lauth $LIBS" cat > conftest.$ac_ext <<EOF -#line 3736 "configure" +#line 3746 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3743,7 +3753,7 @@ int main() { getauthuid() ; return 0; } EOF -if { (eval echo configure:3747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3782,7 +3792,7 @@ fi if test "$CHECKSHADOW" = "true"; then echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:3786: checking for getspnam in -lsec" >&5 +echo "configure:3796: checking for getspnam in -lsec" >&5 if test -n ""; then ac_lib_var=`echo sec'_'getspnam | sed 'y% ./+-%___p_%'` else @@ -3794,7 +3804,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 3798 "configure" +#line 3808 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3805,7 +3815,7 @@ int main() { getspnam() ; return 0; } EOF -if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3834,7 +3844,7 @@ fi *-*-sco*) if test "$CHECKSHADOW" = "true"; then echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6 -echo "configure:3838: checking for getprpwnam in -lprot" >&5 +echo "configure:3848: checking for getprpwnam in -lprot" >&5 if test -n "-lx"; then ac_lib_var=`echo prot'_'getprpwnam-lx | sed 'y% ./+-%___p_%'` else @@ -3846,7 +3856,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lprot -lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 3850 "configure" +#line 3860 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3857,7 +3867,7 @@ int main() { getprpwnam() ; return 0; } EOF -if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3881,7 +3891,7 @@ else fi echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:3885: checking for getspnam in -lgen" >&5 +echo "configure:3895: checking for getspnam in -lgen" >&5 if test -n ""; then ac_lib_var=`echo gen'_'getspnam | sed 'y% ./+-%___p_%'` else @@ -3893,7 +3903,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <<EOF -#line 3897 "configure" +#line 3907 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3904,7 +3914,7 @@ int main() { getspnam() ; return 0; } EOF -if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3933,7 +3943,7 @@ fi *-sequent-sysv*) if test "$CHECKSHADOW" = "true"; then echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:3937: checking for getspnam in -lsec" >&5 +echo "configure:3947: checking for getspnam in -lsec" >&5 if test -n ""; then ac_lib_var=`echo sec'_'getspnam | sed 'y% ./+-%___p_%'` else @@ -3945,7 +3955,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 3949 "configure" +#line 3959 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3956,7 +3966,7 @@ int main() { getspnam() ; return 0; } EOF -if { (eval echo configure:3960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4004,12 +4014,12 @@ esac if test "$CHECKSHADOW" = "true"; then echo $ac_n "checking for getspnam""... $ac_c" 1>&6 -echo "configure:4008: checking for getspnam" >&5 +echo "configure:4018: checking for getspnam" >&5 if eval "test \"`echo '$''{'ac_cv_func_getspnam'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4013 "configure" +#line 4023 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getspnam(); below. */ @@ -4032,7 +4042,7 @@ getspnam(); ; return 0; } EOF -if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getspnam=yes" else @@ -4057,12 +4067,12 @@ fi fi if test "$CHECKSHADOW" = "true"; then echo $ac_n "checking for getprpwnam""... $ac_c" 1>&6 -echo "configure:4061: checking for getprpwnam" >&5 +echo "configure:4071: checking for getprpwnam" >&5 if eval "test \"`echo '$''{'ac_cv_func_getprpwnam'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4066 "configure" +#line 4076 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getprpwnam(); below. */ @@ -4085,7 +4095,7 @@ getprpwnam(); ; return 0; } EOF -if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getprpwnam=yes" else @@ -4106,7 +4116,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:4110: checking for getprpwnam in -lsec" >&5 +echo "configure:4120: checking for getprpwnam in -lsec" >&5 if test -n ""; then ac_lib_var=`echo sec'_'getprpwnam | sed 'y% ./+-%___p_%'` else @@ -4118,7 +4128,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 4122 "configure" +#line 4132 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4129,7 +4139,7 @@ int main() { getprpwnam() ; return 0; } EOF -if { (eval echo configure:4133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4151,7 +4161,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:4155: checking for getprpwnam in -lsecurity" >&5 +echo "configure:4165: checking for getprpwnam in -lsecurity" >&5 if test -n ""; then ac_lib_var=`echo security'_'getprpwnam | sed 'y% ./+-%___p_%'` else @@ -4163,7 +4173,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <<EOF -#line 4167 "configure" +#line 4177 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4174,7 +4184,7 @@ int main() { getprpwnam() ; return 0; } EOF -if { (eval echo configure:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4196,7 +4206,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6 -echo "configure:4200: checking for getprpwnam in -lprot" >&5 +echo "configure:4210: checking for getprpwnam in -lprot" >&5 if test -n ""; then ac_lib_var=`echo prot'_'getprpwnam | sed 'y% ./+-%___p_%'` else @@ -4208,7 +4218,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lprot $LIBS" cat > conftest.$ac_ext <<EOF -#line 4212 "configure" +#line 4222 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4219,7 +4229,7 @@ int main() { getprpwnam() ; return 0; } EOF -if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4252,13 +4262,13 @@ fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:4256: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:4266: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext <<EOF -#line 4262 "configure" +#line 4272 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -4276,7 +4286,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 4280 "configure" +#line 4290 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -4298,12 +4308,12 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4302: checking for working const" >&5 +echo "configure:4312: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4307 "configure" +#line 4317 "configure" #include "confdefs.h" int main() { @@ -4352,7 +4362,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:4356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4377,7 +4387,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4381: checking for $ac_word" >&5 +echo "configure:4391: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4408,7 +4418,7 @@ test -n "$YACC" || YACC="yacc" if test -z "$with_sendmail"; then echo $ac_n "checking for sendmail""... $ac_c" 1>&6 -echo "configure:4412: checking for sendmail" >&5 +echo "configure:4422: checking for sendmail" >&5 if test -f "/usr/sbin/sendmail"; then echo "$ac_t""/usr/sbin/sendmail" 1>&6 cat >> confdefs.h <<\EOF @@ -4451,7 +4461,7 @@ fi fi echo $ac_n "checking for mv""... $ac_c" 1>&6 -echo "configure:4455: checking for mv" >&5 +echo "configure:4465: checking for mv" >&5 if test -f "/usr/bin/mv"; then echo "$ac_t""/usr/bin/mv" 1>&6 cat >> confdefs.h <<\EOF @@ -4481,7 +4491,7 @@ else fi echo $ac_n "checking for bourne shell""... $ac_c" 1>&6 -echo "configure:4485: checking for bourne shell" >&5 +echo "configure:4495: checking for bourne shell" >&5 if test -f "/bin/sh"; then echo "$ac_t""/bin/sh" 1>&6 cat >> confdefs.h <<\EOF @@ -4535,7 +4545,7 @@ else fi echo $ac_n "checking for vi""... $ac_c" 1>&6 -echo "configure:4539: checking for vi" >&5 +echo "configure:4549: checking for vi" >&5 if test -f "/usr/bin/vi"; then echo "$ac_t""/usr/bin/vi" 1>&6 cat >> confdefs.h <<\EOF @@ -4571,12 +4581,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4575: checking for ANSI C header files" >&5 +echo "configure:4585: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4580 "configure" +#line 4590 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -4584,7 +4594,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4601,7 +4611,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 4605 "configure" +#line 4615 "configure" #include "confdefs.h" #include <string.h> EOF @@ -4619,7 +4629,7 @@ 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 <<EOF -#line 4623 "configure" +#line 4633 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -4640,7 +4650,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 4644 "configure" +#line 4654 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4651,7 +4661,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4679,12 +4689,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4683: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4693: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4688 "configure" +#line 4698 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -4692,7 +4702,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4717,7 +4727,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4721: checking for opendir in -ldir" >&5 +echo "configure:4731: checking for opendir in -ldir" >&5 if test -n ""; then ac_lib_var=`echo dir'_'opendir | sed 'y% ./+-%___p_%'` else @@ -4729,7 +4739,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 4733 "configure" +#line 4743 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4740,7 +4750,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4762,7 +4772,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4766: checking for opendir in -lx" >&5 +echo "configure:4776: checking for opendir in -lx" >&5 if test -n ""; then ac_lib_var=`echo x'_'opendir | sed 'y% ./+-%___p_%'` else @@ -4774,7 +4784,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 4778 "configure" +#line 4788 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4785,7 +4795,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4811,17 +4821,17 @@ for ac_hdr in string.h strings.h unistd.h malloc.h paths.h utime.h netgroup.h sy do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4815: checking for $ac_hdr" >&5 +echo "configure:4825: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4820 "configure" +#line 4830 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4852,17 +4862,17 @@ if test "$OS" != "ultrix"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4856: checking for $ac_hdr" >&5 +echo "configure:4866: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4861 "configure" +#line 4871 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4892,17 +4902,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4896: checking for $ac_hdr" >&5 +echo "configure:4906: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4901 "configure" +#line 4911 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4925,12 +4935,12 @@ EOF for ac_func in tcgetattr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4929: checking for $ac_func" >&5 +echo "configure:4939: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4934 "configure" +#line 4944 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4953,7 +4963,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4984,12 +4994,12 @@ done fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4988: checking for mode_t" >&5 +echo "configure:4998: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4993 "configure" +#line 5003 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -5017,12 +5027,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5021: checking for uid_t in sys/types.h" >&5 +echo "configure:5031: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5026 "configure" +#line 5036 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -5051,12 +5061,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5055: checking for size_t" >&5 +echo "configure:5065: checking for size_t" >&5 if eval "test \"`echo '$''{'sudo_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5060 "configure" +#line 5070 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -5086,12 +5096,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:5090: checking for ssize_t" >&5 +echo "configure:5100: checking for ssize_t" >&5 if eval "test \"`echo '$''{'sudo_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5095 "configure" +#line 5105 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -5121,12 +5131,12 @@ EOF fi echo $ac_n "checking for dev_t""... $ac_c" 1>&6 -echo "configure:5125: checking for dev_t" >&5 +echo "configure:5135: checking for dev_t" >&5 if eval "test \"`echo '$''{'sudo_cv_type_dev_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5130 "configure" +#line 5140 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -5156,12 +5166,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:5160: checking for ino_t" >&5 +echo "configure:5170: checking for ino_t" >&5 if eval "test \"`echo '$''{'sudo_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5165 "configure" +#line 5175 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -5191,9 +5201,9 @@ EOF fi echo $ac_n "checking for full void implementation""... $ac_c" 1>&6 -echo "configure:5195: checking for full void implementation" >&5 +echo "configure:5205: checking for full void implementation" >&5 cat > conftest.$ac_ext <<EOF -#line 5197 "configure" +#line 5207 "configure" #include "confdefs.h" int main() { @@ -5201,7 +5211,7 @@ void *foo; foo = (void *)0; (void *)"test"; ; return 0; } EOF -if { (eval echo configure:5205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define VOID void @@ -5221,7 +5231,7 @@ fi rm -f conftest* echo $ac_n "checking max length of uid_t""... $ac_c" 1>&6 -echo "configure:5225: checking max length of uid_t" >&5 +echo "configure:5235: checking max length of uid_t" >&5 if eval "test \"`echo '$''{'sudo_cv_uid_t_len'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5230,7 +5240,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 5234 "configure" +#line 5244 "configure" #include "confdefs.h" #include <stdio.h> #include <pwd.h> @@ -5251,7 +5261,7 @@ main() { exit(0); } EOF -if { (eval echo configure:5255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then sudo_cv_uid_t_len=`cat conftestdata` else @@ -5274,16 +5284,16 @@ EOF echo $ac_n "checking for long long support""... $ac_c" 1>&6 -echo "configure:5278: checking for long long support" >&5 +echo "configure:5288: checking for long long support" >&5 cat > conftest.$ac_ext <<EOF -#line 5280 "configure" +#line 5290 "configure" #include "confdefs.h" int main() { long long foo = 1000; foo /= 10; ; return 0; } EOF -if { (eval echo configure:5287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_LONG_LONG 1 @@ -5293,11 +5303,11 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 5297 "configure" +#line 5307 "configure" #include "confdefs.h" main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);} EOF -if { (eval echo configure:5301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then cat >> confdefs.h <<\EOF #define LONG_IS_QUAD 1 @@ -5319,7 +5329,7 @@ else fi rm -f conftest* echo $ac_n "checking for sa_len field in struct sockaddr""... $ac_c" 1>&6 -echo "configure:5323: checking for sa_len field in struct sockaddr" >&5 +echo "configure:5333: checking for sa_len field in struct sockaddr" >&5 if eval "test \"`echo '$''{'sudo_cv_sock_sa_len'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5327,7 +5337,7 @@ else sudo_cv_sock_sa_len=no else cat > conftest.$ac_ext <<EOF -#line 5331 "configure" +#line 5341 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -5337,7 +5347,7 @@ s.sa_len = 0; exit(0); } EOF -if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then sudo_cv_sock_sa_len=yes else @@ -5362,12 +5372,12 @@ fi case "$DEFS" in *"RETSIGTYPE"*) ;; *) echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5366: checking return type of signal handlers" >&5 +echo "configure:5376: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5371 "configure" +#line 5381 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -5384,7 +5394,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5403,15 +5413,15 @@ EOF ;; esac -for ac_func in strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid ftruncate strftime setrlimit initgroups +for ac_func in strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid strftime setrlimit initgroups fstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5410: checking for $ac_func" >&5 +echo "configure:5420: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5415 "configure" +#line 5425 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5434,7 +5444,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5462,12 +5472,12 @@ if test -n "$SECUREWARE"; then for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5466: checking for $ac_func" >&5 +echo "configure:5476: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5471 "configure" +#line 5481 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5490,7 +5500,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5517,12 +5527,12 @@ done for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5521: checking for $ac_func" >&5 +echo "configure:5531: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5526 "configure" +#line 5536 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5545,7 +5555,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5572,12 +5582,12 @@ done for ac_func in initprivs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5576: checking for $ac_func" >&5 +echo "configure:5586: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5581 "configure" +#line 5591 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5600,7 +5610,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5627,12 +5637,12 @@ done fi if test -z "$BROKEN_GETCWD"; then echo $ac_n "checking for getcwd""... $ac_c" 1>&6 -echo "configure:5631: checking for getcwd" >&5 +echo "configure:5641: checking for getcwd" >&5 if eval "test \"`echo '$''{'ac_cv_func_getcwd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5636 "configure" +#line 5646 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getcwd(); below. */ @@ -5655,7 +5665,7 @@ getcwd(); ; return 0; } EOF -if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getcwd=yes" else @@ -5680,12 +5690,12 @@ fi fi echo $ac_n "checking for lockf""... $ac_c" 1>&6 -echo "configure:5684: checking for lockf" >&5 +echo "configure:5694: checking for lockf" >&5 if eval "test \"`echo '$''{'ac_cv_func_lockf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5689 "configure" +#line 5699 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char lockf(); below. */ @@ -5708,7 +5718,7 @@ lockf(); ; return 0; } EOF -if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_lockf=yes" else @@ -5731,12 +5741,12 @@ else for ac_func in flock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5735: checking for $ac_func" >&5 +echo "configure:5745: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5740 "configure" +#line 5750 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5759,7 +5769,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5786,12 +5796,12 @@ done fi echo $ac_n "checking for waitpid""... $ac_c" 1>&6 -echo "configure:5790: checking for waitpid" >&5 +echo "configure:5800: checking for waitpid" >&5 if eval "test \"`echo '$''{'ac_cv_func_waitpid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5795 "configure" +#line 5805 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char waitpid(); below. */ @@ -5814,7 +5824,7 @@ waitpid(); ; return 0; } EOF -if { (eval echo configure:5818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_waitpid=yes" else @@ -5837,12 +5847,12 @@ else for ac_func in wait3 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5841: checking for $ac_func" >&5 +echo "configure:5851: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5846 "configure" +#line 5856 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5865,7 +5875,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5892,12 +5902,12 @@ done fi echo $ac_n "checking for innetgr""... $ac_c" 1>&6 -echo "configure:5896: checking for innetgr" >&5 +echo "configure:5906: checking for innetgr" >&5 if eval "test \"`echo '$''{'ac_cv_func_innetgr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5901 "configure" +#line 5911 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char innetgr(); below. */ @@ -5920,7 +5930,7 @@ innetgr(); ; return 0; } EOF -if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_innetgr=yes" else @@ -5940,12 +5950,12 @@ EOF for ac_func in getdomainname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5944: checking for $ac_func" >&5 +echo "configure:5954: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5949 "configure" +#line 5959 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5968,7 +5978,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5997,12 +6007,12 @@ else fi echo $ac_n "checking for lsearch""... $ac_c" 1>&6 -echo "configure:6001: checking for lsearch" >&5 +echo "configure:6011: checking for lsearch" >&5 if eval "test \"`echo '$''{'ac_cv_func_lsearch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6006 "configure" +#line 6016 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char lsearch(); below. */ @@ -6025,7 +6035,7 @@ lsearch(); ; return 0; } EOF -if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_lsearch=yes" else @@ -6046,7 +6056,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for lsearch in -lcompat""... $ac_c" 1>&6 -echo "configure:6050: checking for lsearch in -lcompat" >&5 +echo "configure:6060: checking for lsearch in -lcompat" >&5 if test -n ""; then ac_lib_var=`echo compat'_'lsearch | sed 'y% ./+-%___p_%'` else @@ -6058,7 +6068,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcompat $LIBS" cat > conftest.$ac_ext <<EOF -#line 6062 "configure" +#line 6072 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6069,7 +6079,7 @@ int main() { lsearch() ; return 0; } EOF -if { (eval echo configure:6073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6086,17 +6096,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "search.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for search.h""... $ac_c" 1>&6 -echo "configure:6090: checking for search.h" >&5 +echo "configure:6100: checking for search.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6095 "configure" +#line 6105 "configure" #include "confdefs.h" #include <search.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6129,12 +6139,12 @@ fi fi echo $ac_n "checking for setenv""... $ac_c" 1>&6 -echo "configure:6133: checking for setenv" >&5 +echo "configure:6143: checking for setenv" >&5 if eval "test \"`echo '$''{'ac_cv_func_setenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6138 "configure" +#line 6148 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char setenv(); below. */ @@ -6157,7 +6167,7 @@ setenv(); ; return 0; } EOF -if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_setenv=yes" else @@ -6178,12 +6188,12 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for putenv""... $ac_c" 1>&6 -echo "configure:6182: checking for putenv" >&5 +echo "configure:6192: checking for putenv" >&5 if eval "test \"`echo '$''{'ac_cv_func_putenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6187 "configure" +#line 6197 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char putenv(); below. */ @@ -6206,7 +6216,7 @@ putenv(); ; return 0; } EOF -if { (eval echo configure:6210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_putenv=yes" else @@ -6232,12 +6242,12 @@ fi fi echo $ac_n "checking for utime""... $ac_c" 1>&6 -echo "configure:6236: checking for utime" >&5 +echo "configure:6246: checking for utime" >&5 if eval "test \"`echo '$''{'ac_cv_func_utime'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6241 "configure" +#line 6251 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char utime(); below. */ @@ -6260,7 +6270,7 @@ utime(); ; return 0; } EOF -if { (eval echo configure:6264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_utime=yes" else @@ -6279,7 +6289,7 @@ if eval "test \"`echo '$ac_cv_func_'utime`\" = yes"; then EOF echo $ac_n "checking for POSIX utime""... $ac_c" 1>&6 -echo "configure:6283: checking for POSIX utime" >&5 +echo "configure:6293: checking for POSIX utime" >&5 if eval "test \"`echo '$''{'sudo_cv_func_utime_posix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6288,7 +6298,7 @@ if test "$cross_compiling" = yes; then sudo_cv_func_utime_posix=no else cat > conftest.$ac_ext <<EOF -#line 6292 "configure" +#line 6302 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -6300,7 +6310,7 @@ utime("conftestdata", &ut); exit(0); } EOF -if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then sudo_cv_func_utime_posix=yes else @@ -6328,7 +6338,7 @@ LIBOBJS="$LIBOBJS utime.o" fi echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6 -echo "configure:6332: checking for working fnmatch" >&5 +echo "configure:6342: checking for working fnmatch" >&5 if eval "test \"`echo '$''{'sudo_cv_func_fnmatch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6337,13 +6347,13 @@ if test "$cross_compiling" = yes; then sudo_cv_func_fnmatch=no else cat > conftest.$ac_ext <<EOF -#line 6341 "configure" +#line 6351 "configure" #include "confdefs.h" #include <fnmatch.h> main() { exit(fnmatch("/*/bin/echo *", "/usr/bin/echo just a test", 0)); } EOF -if { (eval echo configure:6347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then sudo_cv_func_fnmatch=yes else @@ -6370,12 +6380,12 @@ fi for ac_func in strerror strcasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6374: checking for $ac_func" >&5 +echo "configure:6384: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6379 "configure" +#line 6389 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6398,7 +6408,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6425,12 +6435,12 @@ done echo $ac_n "checking for snprintf""... $ac_c" 1>&6 -echo "configure:6429: checking for snprintf" >&5 +echo "configure:6439: checking for snprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6434 "configure" +#line 6444 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char snprintf(); below. */ @@ -6453,7 +6463,7 @@ snprintf(); ; return 0; } EOF -if { (eval echo configure:6457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_snprintf=yes" else @@ -6477,12 +6487,12 @@ NEED_SNPRINTF=1 fi echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:6481: checking for vsnprintf" >&5 +echo "configure:6491: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6486 "configure" +#line 6496 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vsnprintf(); below. */ @@ -6505,7 +6515,7 @@ vsnprintf(); ; return 0; } EOF -if { (eval echo configure:6509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vsnprintf=yes" else @@ -6529,12 +6539,12 @@ NEED_SNPRINTF=1 fi echo $ac_n "checking for asprintf""... $ac_c" 1>&6 -echo "configure:6533: checking for asprintf" >&5 +echo "configure:6543: checking for asprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_asprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6538 "configure" +#line 6548 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char asprintf(); below. */ @@ -6557,7 +6567,7 @@ asprintf(); ; return 0; } EOF -if { (eval echo configure:6561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_asprintf=yes" else @@ -6581,12 +6591,12 @@ NEED_SNPRINTF=1 fi echo $ac_n "checking for vasprintf""... $ac_c" 1>&6 -echo "configure:6585: checking for vasprintf" >&5 +echo "configure:6595: checking for vasprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vasprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6590 "configure" +#line 6600 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vasprintf(); below. */ @@ -6609,7 +6619,7 @@ vasprintf(); ; return 0; } EOF -if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vasprintf=yes" else @@ -6637,12 +6647,12 @@ if test -n "$NEED_SNPRINTF"; then fi if test -z "$LIB_CRYPT"; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:6641: checking for crypt" >&5 +echo "configure:6651: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6646 "configure" +#line 6656 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char crypt(); below. */ @@ -6665,7 +6675,7 @@ crypt(); ; return 0; } EOF -if { (eval echo configure:6669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -6683,7 +6693,7 @@ if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:6687: checking for crypt in -lcrypt" >&5 +echo "configure:6697: checking for crypt in -lcrypt" >&5 if test -n ""; then ac_lib_var=`echo crypt'_'crypt | sed 'y% ./+-%___p_%'` else @@ -6695,7 +6705,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <<EOF -#line 6699 "configure" +#line 6709 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6706,7 +6716,7 @@ int main() { crypt() ; return 0; } EOF -if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6725,7 +6735,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt_d""... $ac_c" 1>&6 -echo "configure:6729: checking for crypt in -lcrypt_d" >&5 +echo "configure:6739: checking for crypt in -lcrypt_d" >&5 if test -n ""; then ac_lib_var=`echo crypt_d'_'crypt | sed 'y% ./+-%___p_%'` else @@ -6737,7 +6747,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt_d $LIBS" cat > conftest.$ac_ext <<EOF -#line 6741 "configure" +#line 6751 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6748,7 +6758,7 @@ int main() { crypt() ; return 0; } EOF -if { (eval echo configure:6752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6767,7 +6777,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lufc""... $ac_c" 1>&6 -echo "configure:6771: checking for crypt in -lufc" >&5 +echo "configure:6781: checking for crypt in -lufc" >&5 if test -n ""; then ac_lib_var=`echo ufc'_'crypt | sed 'y% ./+-%___p_%'` else @@ -6779,7 +6789,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lufc $LIBS" cat > conftest.$ac_ext <<EOF -#line 6783 "configure" +#line 6793 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6790,7 +6800,7 @@ int main() { crypt() ; return 0; } EOF -if { (eval echo configure:6794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6818,12 +6828,12 @@ fi fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:6822: checking for socket" >&5 +echo "configure:6832: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6827 "configure" +#line 6837 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char socket(); below. */ @@ -6846,7 +6856,7 @@ socket(); ; return 0; } EOF -if { (eval echo configure:6850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -6864,7 +6874,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:6868: checking for socket in -lsocket" >&5 +echo "configure:6878: checking for socket in -lsocket" >&5 if test -n ""; then ac_lib_var=`echo socket'_'socket | sed 'y% ./+-%___p_%'` else @@ -6876,7 +6886,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 6880 "configure" +#line 6890 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6887,7 +6897,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:6891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6906,7 +6916,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:6910: checking for socket in -linet" >&5 +echo "configure:6920: checking for socket in -linet" >&5 if test -n ""; then ac_lib_var=`echo inet'_'socket | sed 'y% ./+-%___p_%'` else @@ -6918,7 +6928,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <<EOF -#line 6922 "configure" +#line 6932 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6929,7 +6939,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:6933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6949,7 +6959,7 @@ else echo "$ac_t""no" 1>&6 echo "configure: warning: unable to find socket() trying -lsocket -lnsl" 1>&2 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:6953: checking for socket in -lsocket" >&5 +echo "configure:6963: checking for socket in -lsocket" >&5 if test -n "-lnsl"; then ac_lib_var=`echo socket'_'socket-lnsl | sed 'y% ./+-%___p_%'` else @@ -6961,7 +6971,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket -lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 6965 "configure" +#line 6975 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6972,7 +6982,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:6976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6999,12 +7009,12 @@ fi fi echo $ac_n "checking for inet_addr""... $ac_c" 1>&6 -echo "configure:7003: checking for inet_addr" >&5 +echo "configure:7013: checking for inet_addr" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_addr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7008 "configure" +#line 7018 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char inet_addr(); below. */ @@ -7027,7 +7037,7 @@ inet_addr(); ; return 0; } EOF -if { (eval echo configure:7031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_inet_addr=yes" else @@ -7045,7 +7055,7 @@ if eval "test \"`echo '$ac_cv_func_'inet_addr`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6 -echo "configure:7049: checking for inet_addr in -lnsl" >&5 +echo "configure:7059: checking for inet_addr in -lnsl" >&5 if test -n ""; then ac_lib_var=`echo nsl'_'inet_addr | sed 'y% ./+-%___p_%'` else @@ -7057,7 +7067,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 7061 "configure" +#line 7071 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7068,7 +7078,7 @@ int main() { inet_addr() ; return 0; } EOF -if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7087,7 +7097,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -linet""... $ac_c" 1>&6 -echo "configure:7091: checking for inet_addr in -linet" >&5 +echo "configure:7101: checking for inet_addr in -linet" >&5 if test -n ""; then ac_lib_var=`echo inet'_'inet_addr | sed 'y% ./+-%___p_%'` else @@ -7099,7 +7109,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <<EOF -#line 7103 "configure" +#line 7113 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7110,7 +7120,7 @@ int main() { inet_addr() ; return 0; } EOF -if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7130,7 +7140,7 @@ else echo "$ac_t""no" 1>&6 echo "configure: warning: unable to find socket() trying -lsocket -lnsl" 1>&2 echo $ac_n "checking for inet_addr in -lsocket""... $ac_c" 1>&6 -echo "configure:7134: checking for inet_addr in -lsocket" >&5 +echo "configure:7144: checking for inet_addr in -lsocket" >&5 if test -n "-lnsl"; then ac_lib_var=`echo socket'_'inet_addr-lnsl | sed 'y% ./+-%___p_%'` else @@ -7142,7 +7152,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket -lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 7146 "configure" +#line 7156 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7153,7 +7163,7 @@ int main() { inet_addr() ; return 0; } EOF -if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7180,12 +7190,12 @@ fi fi echo $ac_n "checking for syslog""... $ac_c" 1>&6 -echo "configure:7184: checking for syslog" >&5 +echo "configure:7194: checking for syslog" >&5 if eval "test \"`echo '$''{'ac_cv_func_syslog'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7189 "configure" +#line 7199 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char syslog(); below. */ @@ -7208,7 +7218,7 @@ syslog(); ; return 0; } EOF -if { (eval echo configure:7212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_syslog=yes" else @@ -7226,7 +7236,7 @@ if eval "test \"`echo '$ac_cv_func_'syslog`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for syslog in -lsocket""... $ac_c" 1>&6 -echo "configure:7230: checking for syslog in -lsocket" >&5 +echo "configure:7240: checking for syslog in -lsocket" >&5 if test -n ""; then ac_lib_var=`echo socket'_'syslog | sed 'y% ./+-%___p_%'` else @@ -7238,7 +7248,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 7242 "configure" +#line 7252 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7249,7 +7259,7 @@ int main() { syslog() ; return 0; } EOF -if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7268,7 +7278,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for syslog in -lnsl""... $ac_c" 1>&6 -echo "configure:7272: checking for syslog in -lnsl" >&5 +echo "configure:7282: checking for syslog in -lnsl" >&5 if test -n ""; then ac_lib_var=`echo nsl'_'syslog | sed 'y% ./+-%___p_%'` else @@ -7280,7 +7290,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 7284 "configure" +#line 7294 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7291,7 +7301,7 @@ int main() { syslog() ; return 0; } EOF -if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7310,7 +7320,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for syslog in -linet""... $ac_c" 1>&6 -echo "configure:7314: checking for syslog in -linet" >&5 +echo "configure:7324: checking for syslog in -linet" >&5 if test -n ""; then ac_lib_var=`echo inet'_'syslog | sed 'y% ./+-%___p_%'` else @@ -7322,7 +7332,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <<EOF -#line 7326 "configure" +#line 7336 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7333,7 +7343,7 @@ int main() { syslog() ; return 0; } EOF -if { (eval echo configure:7337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7363,19 +7373,19 @@ 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 $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:7367: checking for working alloca.h" >&5 +echo "configure:7377: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7372 "configure" +#line 7382 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:7379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -7396,12 +7406,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:7400: checking for alloca" >&5 +echo "configure:7410: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7405 "configure" +#line 7415 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -7424,7 +7434,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:7428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -7456,12 +7466,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:7460: checking whether alloca needs Cray hooks" >&5 +echo "configure:7470: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7465 "configure" +#line 7475 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -7486,12 +7496,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7490: checking for $ac_func" >&5 +echo "configure:7500: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7495 "configure" +#line 7505 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7514,7 +7524,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:7518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7541,7 +7551,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:7545: checking stack direction for C alloca" >&5 +echo "configure:7555: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7549,7 +7559,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 7553 "configure" +#line 7563 "configure" #include "confdefs.h" find_stack_direction () { @@ -7568,7 +7578,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:7572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -7648,21 +7658,21 @@ EOF fi echo $ac_n "checking for -ldes""... $ac_c" 1>&6 -echo "configure:7652: checking for -ldes" >&5 +echo "configure:7662: checking for -ldes" >&5 if eval "test \"`echo '$''{'ac_cv_lib_des'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldes $LIBS" cat > conftest.$ac_ext <<EOF -#line 7659 "configure" +#line 7669 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_lib_des=yes else @@ -7785,7 +7795,7 @@ if test "$with_authenticate" = "yes"; then fi echo $ac_n "checking for log file location""... $ac_c" 1>&6 -echo "configure:7789: checking for log file location" >&5 +echo "configure:7799: checking for log file location" >&5 if test -n "$with_logpath"; then echo "$ac_t""$with_logpath" 1>&6 cat >> confdefs.h <<EOF @@ -7815,7 +7825,7 @@ else fi echo $ac_n "checking for timestamp file location""... $ac_c" 1>&6 -echo "configure:7819: checking for timestamp file location" >&5 +echo "configure:7829: checking for timestamp file location" >&5 if test -n "$with_timedir"; then echo "$ac_t""$with_timedir" 1>&6 cat >> confdefs.h <<EOF diff --git a/usr.bin/sudo/configure.in b/usr.bin/sudo/configure.in index 7eca0dc25b1..86a446617a1 100644 --- a/usr.bin/sudo/configure.in +++ b/usr.bin/sudo/configure.in @@ -1,6 +1,6 @@ dnl dnl Process this file with GNU autoconf to produce a configure script. -dnl $Sudo: configure.in,v 1.294 1999/12/09 04:04:45 millert Exp $ +dnl $Sudo: configure.in,v 1.299 2000/01/19 19:07:24 millert Exp $ dnl dnl Copyright (c) 1994-1996,1998-1999 Todd C. Miller <Todd.Miller@courtesan.com> dnl @@ -9,7 +9,7 @@ AC_CONFIG_HEADER(config.h pathnames.h) dnl dnl This won't work before AC_INIT() dnl -echo "Configuring Sudo version 1.6.1" +echo "Configuring Sudo version 1.6.2" dnl dnl Variables that get substituted in the Makefile dnl @@ -1033,6 +1033,18 @@ case "$host" in # (XXX - should be an option to configure) #STATIC_SUDO=true + # If using cc, run in ANSI mode if possible + if test -z "$GCC"; then + $CC -Aa 2>&1 | grep 'A option is available only' >conftest.out + if test ! -s conftest.out; then + CPPFLAGS="${CPPFLAGS} -Aa" + fi + rm -f conftest.out + fi + + # Add -D_HPUX_SOURCE so we don't get strict ANSI headers + CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE" + if test "$CHECKSHADOW" = "true"; then AC_CHECK_LIB(sec, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) AC_CHECK_LIB(sec, iscomsec, AC_DEFINE(HAVE_ISCOMSEC)) [SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"; SECUREWARE=1]) CHECKSHADOW="false" @@ -1046,15 +1058,6 @@ case "$host" in fi fi - # DCE support (requires ANSI C compiler) - if test "$with_DCE" = "yes"; then - if test -n "$GCC"; then - CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE" - else - CPPFLAGS="${CPPFLAGS} -Aa -D_HPUX_SOURCE" - fi - fi - # AFS support needs -lBSD if test "$with_AFS" = "yes"; then AFS_LIBS="-lc -lBSD" @@ -1065,6 +1068,18 @@ case "$host" in # (XXX - should be an option to configure) #STATIC_SUDO=true + # If using cc, run in ANSI mode if possible + if test -z "$GCC"; then + $CC -Aa 2>&1 | grep 'A option is available only' >conftest.out + if test ! -s conftest.out; then + CPPFLAGS="${CPPFLAGS} -Aa" + fi + rm -f conftest.out + fi + + # Add -D_HPUX_SOURCE so we don't get strict ANSI headers + CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE" + AC_DEFINE(BROKEN_SYSLOG) if test "$CHECKSHADOW" = "true"; then @@ -1085,12 +1100,7 @@ case "$host" in # order of libs in 9.X is important. -lc_r must be last SUDO_LIBS="${SUDO_LIBS} -ldce -lM -lc_r" LIBS="${LIBS} -ldce -lM -lc_r" - - if test -n "$GCC"; then - CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE -D_REENTRANT -I/usr/include/reentrant" - else - CPPFLAGS="${CPPFLAGS} -Aa -D_HPUX_SOURCE -D_REENTRANT -I/usr/include/reentrant" - fi + CPPFLAGS="${CPPFLAGS} -D_REENTRANT -I/usr/include/reentrant" fi # AFS support needs -lBSD @@ -1333,7 +1343,7 @@ esac dnl dnl Function checks dnl -AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid ftruncate strftime setrlimit initgroups) +AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid strftime setrlimit initgroups fstat) if test -n "$SECUREWARE"; then AC_CHECK_FUNCS(bigcrypt) AC_CHECK_FUNCS(set_auth_parameters) diff --git a/usr.bin/sudo/defaults.c b/usr.bin/sudo/defaults.c index a62daadbf95..c2b9ffd766d 100644 --- a/usr.bin/sudo/defaults.c +++ b/usr.bin/sudo/defaults.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999-2000 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,7 +53,7 @@ #include "sudo.h" #ifndef lint -static const char rcsid[] = "$Sudo: defaults.c,v 1.13 1999/12/02 20:31:24 millert Exp $"; +static const char rcsid[] = "$Sudo: defaults.c,v 1.17 2000/01/17 23:46:24 millert Exp $"; #endif /* lint */ /* @@ -106,130 +106,141 @@ static int store_str __P((char *, struct sudo_defs_types *, int)); static int store_syslogfac __P((char *, struct sudo_defs_types *, int)); static int store_syslogpri __P((char *, struct sudo_defs_types *, int)); static int store_mode __P((char *, struct sudo_defs_types *, int)); +static int store_pwflag __P((char *, struct sudo_defs_types *, int)); /* * Table describing compile-time and run-time options. */ struct sudo_defs_types sudo_defs_table[] = { { - "syslog_ifac", T_INT, { 0 }, - NULL + "syslog_ifac", T_INT, NULL }, { - "syslog_igoodpri", T_INT, { 0 }, - NULL + "syslog_igoodpri", T_INT, NULL }, { - "syslog_ibadpri", T_INT, { 0 }, - NULL + "syslog_ibadpri", T_INT, NULL }, { - "syslog", T_LOGFAC|T_BOOL, { 0 }, + "syslog", T_LOGFAC|T_BOOL, "Syslog facility if syslog is being used for logging: %s" }, { - "syslog_goodpri", T_LOGPRI, { 0 }, + "syslog_goodpri", T_LOGPRI, "Syslog priority to use when user authenticates successfully: %s" }, { - "syslog_badpri", T_LOGPRI, { 0 }, + "syslog_badpri", T_LOGPRI, "Syslog priority to use when user authenticates unsuccessfully: %s" }, { - "long_otp_prompt", T_FLAG, { 0 }, + "long_otp_prompt", T_FLAG, "Put OTP prompt on its own line" }, { - "ignore_dot", T_FLAG, { 0 }, + "ignore_dot", T_FLAG, "Ignore '.' in $PATH" }, { - "mail_always", T_FLAG, { 0 }, + "mail_always", T_FLAG, "Always send mail when sudo is run" }, { - "mail_no_user", T_FLAG, { 0 }, + "mail_no_user", T_FLAG, "Send mail if the user is not in sudoers" }, { - "mail_no_host", T_FLAG, { 0 }, + "mail_no_host", T_FLAG, "Send mail if the user is not in sudoers for this host" }, { - "mail_no_perms", T_FLAG, { 0 }, + "mail_no_perms", T_FLAG, "Send mail if the user is not allowed to run a command" }, { - "tty_tickets", T_FLAG, { 0 }, + "tty_tickets", T_FLAG, "Use a separate timestamp for each user/tty combo" }, { - "lecture", T_FLAG, { 0 }, + "lecture", T_FLAG, "Lecture user the first time they run sudo" }, { - "authenticate", T_FLAG, { 0 }, + "authenticate", T_FLAG, "Require users to authenticate by default" }, { - "root_sudo", T_FLAG, { 0 }, + "root_sudo", T_FLAG, "Root may run sudo" }, { - "log_host", T_FLAG, { 0 }, + "log_host", T_FLAG, "Log the hostname in the (non-syslog) log file" }, { - "log_year", T_FLAG, { 0 }, + "log_year", T_FLAG, "Log the year in the (non-syslog) log file" }, { - "set_home", T_FLAG, { 0 }, + "shell_noargs", T_FLAG, + "If sudo is invoked with no arguments, start a shell" + }, { + "set_home", T_FLAG, "Set $HOME to the target user when starting a shell with -s" }, { - "path_info", T_FLAG, { 0 }, + "path_info", T_FLAG, "Allow some information gathering to give useful error messages" }, { - "fqdn", T_FLAG, { 0 }, + "fqdn", T_FLAG, "Require fully-qualified hsotnames in the sudoers file" }, { - "insults", T_FLAG, { 0 }, + "insults", T_FLAG, "Insult the user when they enter an incorrect password" }, { - "requiretty", T_FLAG, { 0 }, + "requiretty", T_FLAG, "Only allow the user to run sudo if they have a tty" }, { - "loglinelen", T_INT|T_BOOL, { 0 }, + "loglinelen", T_INT|T_BOOL, "Length at which to wrap log file lines (0 for no wrap): %d" }, { - "timestamp_timeout", T_INT|T_BOOL, { 0 }, + "timestamp_timeout", T_INT|T_BOOL, "Authentication timestamp timeout: %d minutes" }, { - "passwd_timeout", T_INT|T_BOOL, { 0 }, + "passwd_timeout", T_INT|T_BOOL, "Password prompt timeout: %d minutes" }, { - "passwd_tries", T_INT, { 0 }, + "passwd_tries", T_INT, "Number of tries to enter a password: %d" }, { - "umask", T_MODE|T_BOOL, { 0 }, + "umask", T_MODE|T_BOOL, "Umask to use or 0777 to use user's: 0%o" }, { - "logfile", T_STR|T_BOOL|T_PATH, { 0 }, + "logfile", T_STR|T_BOOL|T_PATH, "Path to log file: %s" }, { - "mailerpath", T_STR|T_BOOL|T_PATH, { 0 }, + "mailerpath", T_STR|T_BOOL|T_PATH, "Path to mail program: %s" }, { - "mailerflags", T_STR|T_BOOL, { 0 }, + "mailerflags", T_STR|T_BOOL, "Flags for mail program: %s" }, { - "mailto", T_STR|T_BOOL, { 0 }, + "mailto", T_STR|T_BOOL, "Address to send mail to: %s" }, { - "mailsub", T_STR, { 0 }, + "mailsub", T_STR, "Subject line for mail messages: %s" }, { - "badpass_message", T_STR, { 0 }, + "badpass_message", T_STR, "Incorrect password message: %s" }, { - "timestampdir", T_STR|T_PATH, { 0 }, + "timestampdir", T_STR|T_PATH, "Path to authentication timestamp dir: %s" }, { - "exempt_group", T_STR|T_BOOL, { 0 }, + "exempt_group", T_STR|T_BOOL, "Users in this group are exempt from password and PATH requirements: %s" }, { - "passprompt", T_STR, { 0 }, + "passprompt", T_STR, "Default password prompt: %s" }, { - "runas_default", T_STR, { 0 }, + "runas_default", T_STR, "Default user to run commands as: %s" }, { - "secure_path", T_STR|T_BOOL, { 0 }, + "secure_path", T_STR|T_BOOL, "Value to override user's $PATH with: %s" }, { - NULL, 0, { 0 }, NULL + "listpw_i", T_INT, NULL + }, { + "verifypw_i", T_INT, NULL + }, { + "listpw", T_PWFLAG, + "When to require a password for 'list' pseudocommand: %s" + }, { + "verifypw", T_PWFLAG, + "When to require a password for 'verify' pseudocommand: %s" + }, { + NULL, 0, NULL } }; @@ -251,6 +262,7 @@ dump_defaults() case T_STR: case T_LOGFAC: case T_LOGPRI: + case T_PWFLAG: if (cur->sd_un.str) { (void) printf(cur->desc, cur->sd_un.str); putchar('\n'); @@ -358,6 +370,19 @@ set_default(var, val, op) return(FALSE); } break; + case T_PWFLAG: + if (!store_pwflag(val, cur, op)) { + if (val) + (void) fprintf(stderr, + "%s: value '%s' is invalid for option '%s'\n", Argv[0], + val, var); + else + (void) fprintf(stderr, + "%s: no value specified for `%s' on line %d\n", Argv[0], + var, sudolineno); + return(FALSE); + } + break; case T_STR: if (!val) { /* Check for bogus boolean usage or lack of a value. */ @@ -450,6 +475,7 @@ init_defaults() case T_STR: case T_LOGFAC: case T_LOGPRI: + case T_PWFLAG: if (def->sd_un.str) { free(def->sd_un.str); def->sd_un.str = NULL; @@ -492,6 +518,9 @@ init_defaults() #ifdef HOST_IN_LOG def_flag(I_LOG_HOST) = TRUE; #endif +#ifdef SHELL_IF_NO_ARGS + def_flag(I_SHELL_NOARGS) = TRUE; +#endif #ifdef SHELL_SETS_HOME def_flag(I_SET_HOME) = TRUE; #endif @@ -512,6 +541,10 @@ init_defaults() (void) store_syslogpri(PRI_FAILURE, &sudo_defs_table[I_BADPRISTR], TRUE); #endif + /* Password flags also have a string and integer component. */ + (void) store_pwflag("any", &sudo_defs_table[I_LISTPWSTR], TRUE); + (void) store_pwflag("all", &sudo_defs_table[I_VERIFYPWSTR], TRUE); + /* Then initialize the int-like things. */ #ifdef SUDO_UMASK def_mode(I_UMASK) = SUDO_UMASK; @@ -601,8 +634,10 @@ store_syslogfac(val, def, op) struct strmap *fac; if (op == FALSE) { - free(def->sd_un.str); - def->sd_un.str = NULL; + if (def->sd_un.str) { + free(def->sd_un.str); + def->sd_un.str = NULL; + } return(TRUE); } #ifdef LOG_NFACILITIES @@ -682,3 +717,50 @@ store_mode(val, def, op) } return(TRUE); } + +static int +store_pwflag(val, def, op) + char *val; + struct sudo_defs_types *def; + int op; +{ + int isub, flags; + + if (strcmp(def->name, "verifypw") == 0) + isub = I_VERIFYPW; + else + isub = I_LISTPW; + + /* Handle !foo. */ + if (op == FALSE) { + if (def->sd_un.str) { + free(def->sd_un.str); + def->sd_un.str = NULL; + } + def->sd_un.str = estrdup("never"); + sudo_defs_table[isub].sd_un.ival = PWCHECK_NEVER; + return(TRUE); + } + if (!val) + return(FALSE); + + /* Convert strings to integer values. */ + if (strcmp(val, "all") == 0) + flags = PWCHECK_ALL; + else if (strcmp(val, "any") == 0) + flags = PWCHECK_ANY; + else if (strcmp(val, "never") == 0) + flags = PWCHECK_NEVER; + else if (strcmp(val, "always") == 0) + flags = PWCHECK_ALWAYS; + else + return(FALSE); + + /* Store both name and number. */ + if (def->sd_un.str) + free(def->sd_un.str); + def->sd_un.str = estrdup(val); + sudo_defs_table[isub].sd_un.ival = flags; + + return(TRUE); +} diff --git a/usr.bin/sudo/defaults.h b/usr.bin/sudo/defaults.h index f532606ea12..ca159604f11 100644 --- a/usr.bin/sudo/defaults.h +++ b/usr.bin/sudo/defaults.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1999-2000 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: defaults.h,v 1.8 1999/12/02 20:31:24 millert Exp $ + * $Sudo: defaults.h,v 1.12 2000/01/17 23:46:25 millert Exp $ */ #ifndef _SUDO_DEFAULTS_H @@ -43,13 +43,13 @@ struct sudo_defs_types { char *name; int type; + char *desc; union { int flag; char *str; unsigned int ival; mode_t mode; } sd_un; - char *desc; }; /* @@ -69,6 +69,8 @@ struct sudo_defs_types { #define T_LOGFAC 0x005 #undef T_LOGPRI #define T_LOGPRI 0x006 +#undef T_PWFLAG +#define T_PWFLAG 0x007 #undef T_MASK #define T_MASK 0x0FF #undef T_BOOL @@ -103,31 +105,40 @@ struct sudo_defs_types { #define I_ROOT_SUDO 15 #define I_LOG_HOST 16 #define I_LOG_YEAR 17 -#define I_SET_HOME 18 -#define I_PATH_INFO 19 -#define I_FQDN 20 -#define I_INSULTS 21 -#define I_REQUIRETTY 22 +#define I_SHELL_NOARGS 18 +#define I_SET_HOME 19 +#define I_PATH_INFO 20 +#define I_FQDN 21 +#define I_INSULTS 22 +#define I_REQUIRETTY 23 /* Integer values */ -#define I_LOGLEN 23 /* wrap log file line after N chars */ -#define I_TS_TIMEOUT 24 /* timestamp stale after N minutes */ -#define I_PW_TIMEOUT 25 /* exit if pass not entered in N minutes */ -#define I_PW_TRIES 26 /* exit after N bad password tries */ -#define I_UMASK 27 /* umask to use or 0777 to use user's */ +#define I_LOGLEN 24 /* wrap log file line after N chars */ +#define I_TS_TIMEOUT 25 /* timestamp stale after N minutes */ +#define I_PW_TIMEOUT 26 /* exit if pass not entered in N minutes */ +#define I_PW_TRIES 27 /* exit after N bad password tries */ +#define I_UMASK 28 /* umask to use or 0777 to use user's */ /* Strings */ -#define I_LOGFILE 28 /* path to logfile (or NULL for none) */ -#define I_MAILERPATH 29 /* path to sendmail or other mailer */ -#define I_MAILERFLAGS 30 /* flags to pass to the mailer */ -#define I_MAILTO 31 /* who to send bitch mail to */ -#define I_MAILSUB 32 /* subject line of mail msg */ -#define I_BADPASS_MSG 33 /* what to say when passwd is wrong */ -#define I_TIMESTAMPDIR 34 /* path to timestamp dir */ -#define I_EXEMPT_GRP 35 /* no password or PATH override for these */ -#define I_PASSPROMPT 36 /* password prompt */ -#define I_RUNAS_DEF 37 /* default user to run commands as */ -#define I_SECURE_PATH 38 /* set $PATH to this if not NULL */ +#define I_LOGFILE 29 /* path to logfile (or NULL for none) */ +#define I_MAILERPATH 30 /* path to sendmail or other mailer */ +#define I_MAILERFLAGS 31 /* flags to pass to the mailer */ +#define I_MAILTO 32 /* who to send bitch mail to */ +#define I_MAILSUB 33 /* subject line of mail msg */ +#define I_BADPASS_MSG 34 /* what to say when passwd is wrong */ +#define I_TIMESTAMPDIR 35 /* path to timestamp dir */ +#define I_EXEMPT_GRP 36 /* no password or PATH override for these */ +#define I_PASSPROMPT 37 /* password prompt */ +#define I_RUNAS_DEF 38 /* default user to run commands as */ +#define I_SECURE_PATH 39 /* set $PATH to this if not NULL */ + +/* Integer versions of list/verify options */ +#define I_LISTPW 40 +#define I_VERIFYPW 41 + +/* String versions of list/verify options */ +#define I_LISTPWSTR 42 +#define I_VERIFYPWSTR 43 /* * Macros for accessing sudo_defs_table. diff --git a/usr.bin/sudo/install-sh b/usr.bin/sudo/install-sh index 6056dda81df..9f53f8bbded 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.1 $ +## $Revision: 1.2 $ ## A script to install files and directories. PROGNAME=`basename $0` diff --git a/usr.bin/sudo/parse.c b/usr.bin/sudo/parse.c index 4df2821e331..1924403e153 100644 --- a/usr.bin/sudo/parse.c +++ b/usr.bin/sudo/parse.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2000 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * This code is derived from software contributed by Chris Jepeway @@ -91,13 +91,14 @@ #endif /* HAVE_FNMATCH */ #ifndef lint -static const char rcsid[] = "$Sudo: parse.c,v 1.123 1999/12/09 03:54:57 millert Exp $"; +static const char rcsid[] = "$Sudo: parse.c,v 1.127 2000/01/17 23:46:25 millert Exp $"; #endif /* lint */ /* * Globals */ int parse_error = FALSE; +extern int keepall; extern FILE *yyin, *yyout; /* @@ -111,8 +112,8 @@ static int has_meta __P((char *)); * allowed to run the specified command on this host as the target user. */ int -sudoers_lookup(check_cmnd) - int check_cmnd; +sudoers_lookup(pwflags) + int pwflags; { int error; @@ -127,6 +128,10 @@ sudoers_lookup(check_cmnd) /* Allocate space for data structures in the parser. */ init_parser(); + /* For most pwflags to be useful we need to keep more state around. */ + if (pwflags && pwflags != PWCHECK_NEVER && pwflags != PWCHECK_ALWAYS) + keepall = TRUE; + /* Need to be root while stat'ing things in the parser. */ set_perms(PERM_ROOT, 0); error = yyparse(); @@ -146,30 +151,43 @@ sudoers_lookup(check_cmnd) error = VALIDATE_NOT_OK; else error = VALIDATE_NOT_OK | FLAG_NOPASS; - if (check_cmnd == TRUE) { + if (pwflags) { + error |= FLAG_NO_CHECK; + } else { error |= FLAG_NO_HOST; if (!top) error |= FLAG_NO_USER; - } else - error |= FLAG_NO_CHECK; + } /* - * Only check the actual command if the check_cmnd flag is set. - * It is not set for the "validate" and "list" pseudo-commands. + * Only check the actual command if pwflags flag is not set. + * It is set for the "validate", "list" and "kill" pseudo-commands. * Always check the host and user. */ - if (check_cmnd == FALSE) + if (pwflags) { + int nopass, found; + + if (pwflags == PWCHECK_NEVER || !def_flag(I_AUTHENTICATE)) + nopass = FLAG_NOPASS; + else + nopass = -1; + found = 0; while (top) { if (host_matches == TRUE) { - /* User may always validate or list on allowed hosts */ - if (no_passwd == TRUE) - return(VALIDATE_OK | FLAG_NOPASS); - else - return(VALIDATE_OK); + found = 1; + if (pwflags == PWCHECK_ANY && no_passwd == TRUE) + nopass = FLAG_NOPASS; + else if (pwflags == PWCHECK_ALL && nopass != 0) + nopass = (no_passwd == TRUE) ? FLAG_NOPASS : 0; } top--; } - else + if (found) { + if (nopass == -1) + nopass = 0; + return(VALIDATE_OK | nopass); + } + } else { while (top) { if (host_matches == TRUE) { error &= ~FLAG_NO_HOST; @@ -196,6 +214,7 @@ sudoers_lookup(check_cmnd) } top--; } + } /* * The user was not explicitly granted nor denied access. @@ -405,13 +424,14 @@ usergr_matches(group, user) /* * Returns TRUE if "host" and "user" belong to the netgroup "netgr", - * else return FALSE. Either of "host" or "user" may be NULL + * else return FALSE. Either of "host", "shost" or "user" may be NULL * in which case that argument is not checked... */ int -netgr_matches(netgr, host, user) +netgr_matches(netgr, host, shost, user) char *netgr; char *host; + char *shost; char *user; { #ifdef HAVE_GETDOMAINNAME @@ -436,10 +456,13 @@ netgr_matches(netgr, host, user) #endif /* HAVE_GETDOMAINNAME */ #ifdef HAVE_INNETGR - return(innetgr(netgr, host, user, domain)); -#else - return(FALSE); + if (innetgr(netgr, host, user, domain)) + return(TRUE); + else if (host != shost && innetgr(netgr, shost, user, domain)) + return(TRUE); #endif /* HAVE_INNETGR */ + + return(FALSE); } /* diff --git a/usr.bin/sudo/parse.h b/usr.bin/sudo/parse.h index eb138471c9e..20d31811209 100644 --- a/usr.bin/sudo/parse.h +++ b/usr.bin/sudo/parse.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2000 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: parse.h,v 1.5 1999/09/08 08:06:15 millert Exp $ + * $Sudo: parse.h,v 1.7 2000/01/17 23:46:25 millert Exp $ */ #ifndef _SUDO_PARSE_H @@ -109,7 +109,7 @@ extern int top; */ int addr_matches __P((char *)); int command_matches __P((char *, char *, char *, char *)); -int netgr_matches __P((char *, char *, char *)); +int netgr_matches __P((char *, char *, char *, char *)); int usergr_matches __P((char *, char *)); #endif /* _SUDO_PARSE_H */ diff --git a/usr.bin/sudo/parse.yacc b/usr.bin/sudo/parse.yacc index 445fe793e16..7c43255c391 100644 --- a/usr.bin/sudo/parse.yacc +++ b/usr.bin/sudo/parse.yacc @@ -1,6 +1,6 @@ %{ /* - * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2000 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * This code is derived from software contributed by Chris Jepeway @@ -79,7 +79,7 @@ #endif /* HAVE_LSEARCH */ #ifndef lint -static const char rcsid[] = "$Sudo: parse.yacc,v 1.167 1999/12/05 19:06:09 millert Exp $"; +static const char rcsid[] = "$Sudo: parse.yacc,v 1.170 2000/01/17 23:46:25 millert Exp $"; #endif /* lint */ /* @@ -90,6 +90,7 @@ int errorlineno = -1; int clearaliases = TRUE; int printmatches = FALSE; int pedantic = FALSE; +int keepall = FALSE; /* * Alias types @@ -353,7 +354,7 @@ host : ALL { free($1); } | NETGROUP { - if (netgr_matches($1, user_host, NULL)) + if (netgr_matches($1, user_host, user_shost, NULL)) $$ = TRUE; else $$ = -1; @@ -411,6 +412,9 @@ cmndspec : runasspec nopasswd opcmnd { * the user was listed in sudoers. Also, we * need to be able to tell whether or not a * user was listed for this specific host. + * + * If keepall is set and the user matches then + * we need to keep entries around too... */ if (user_matches != -1 && host_matches != -1 && cmnd_matches != -1 && runas_matches != -1) @@ -419,6 +423,8 @@ cmndspec : runasspec nopasswd opcmnd { (top == 2 && host_matches != -1 && match[0].host == -1))) pushcp; + else if (user_matches == TRUE && keepall) + pushcp; cmnd_matches = -1; } ; @@ -529,7 +535,7 @@ runasuser : WORD { user_matches == TRUE) append_runas($1, ", "); } - if (netgr_matches($1, NULL, *user_runas)) + if (netgr_matches($1, NULL, NULL, *user_runas)) $$ = TRUE; else $$ = -1; @@ -783,7 +789,7 @@ user : WORD { free($1); } | NETGROUP { - if (netgr_matches($1, NULL, user_name)) + if (netgr_matches($1, NULL, NULL, user_name)) $$ = TRUE; else $$ = -1; diff --git a/usr.bin/sudo/sudo.8 b/usr.bin/sudo/sudo.8 index ad88f7d6646..06f25f27fd7 100644 --- a/usr.bin/sudo/sudo.8 +++ b/usr.bin/sudo/sudo.8 @@ -1,12 +1,12 @@ .rn '' }` -''' $RCSfile: sudo.8,v $$Revision: 1.1 $$Date: 1999/11/18 16:29:01 $ +''' $RCSfile: sudo.8,v $$Revision: 1.2 $$Date: 2000/01/24 04:22:53 $ ''' ''' $Log: sudo.8,v $ -''' Revision 1.1 1999/11/18 16:29:01 millert -''' Initial revision +''' Revision 1.2 2000/01/24 04:22:53 millert +''' sudo 1.6.2 ''' -''' Revision 1.39 1999/11/16 05:42:28 millert -''' get rid of references to sudo-bugs. Now mention the web site or the sudo@ alias +''' Revision 1.43 2000/01/17 17:28:41 millert +''' Crank version to 1.6.2 ''' ''' .de Sh @@ -99,7 +99,7 @@ .nr % 0 .rr F .\} -.TH sudo 8 "1.6" "15/Nov/1999" "MAINTENANCE COMMANDS" +.TH sudo 8 "1.6.2" "4/Dec/1999" "MAINTENANCE COMMANDS" .UC .if n .hy 0 .if n .na @@ -203,7 +203,12 @@ sudo \- execute a command as another user superuser or another user, as specified in the sudoers file. The real and effective uid and gid are set to match those of the target user as specified in the passwd file (the group vector is also -initialized when the target user is not root). +initialized when the target user is not root). By default, \fBsudo\fR +requires that users authenticate themselves with a password +(NOTE: this is the user's password, not the root password). Once +a user has been authenticated, a timestamp is updated and the +user may then use sudo without a password for a short period of time +(five minutes by default). .PP \fBsudo\fR determines who is an authorized user by consulting the file \fI/etc/sudoers\fR. By giving \fBsudo\fR the \f(CW-v\fR flag a user @@ -423,7 +428,7 @@ See the HISTORY file in the \fBsudo\fR distribution for a short history of \fBsudo\fR. .SH "BUGS" If you feel you have found a bug in sudo, please submit a bug report -at http://www.courtesan.com/sudo/bugs/. +at http://www.courtesan.com/sudo/bugs/ .SH "DISCLAIMER" \fBSudo\fR is provided ``AS IS'\*(R' and any express or implied warranties, including, but not limited to, the implied warranties of merchantability diff --git a/usr.bin/sudo/sudo.c b/usr.bin/sudo/sudo.c index 44016b74256..546b951049b 100644 --- a/usr.bin/sudo/sudo.c +++ b/usr.bin/sudo/sudo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994-1996,1998-1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1994-1996,1998-2000 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -86,7 +86,7 @@ extern char *getenv __P((char *)); #endif /* STDC_HEADERS */ #ifndef lint -static const char rcsid[] = "$Sudo: sudo.c,v 1.262 1999/12/09 04:04:47 millert Exp $"; +static const char rcsid[] = "$Sudo: sudo.c,v 1.268 2000/01/17 23:46:25 millert Exp $"; #endif /* lint */ /* @@ -163,7 +163,7 @@ main(argc, argv) int fd; int cmnd_status; int sudo_mode; - int check_cmnd; + int sudoers_flags; #ifdef POSIX_SIGNALS sigset_t set, oset; #else @@ -218,7 +218,7 @@ main(argc, argv) /* Setup defaults data structures. */ init_defaults(); - check_cmnd = 1; + sudoers_flags = 0; if (sudo_mode & MODE_SHELL) user_cmnd = "shell"; else @@ -237,12 +237,12 @@ main(argc, argv) break; case MODE_VALIDATE: user_cmnd = "validate"; - check_cmnd = 0; + sudoers_flags = def_ival(I_VERIFYPW); break; case MODE_KILL: case MODE_INVALIDATE: user_cmnd = "kill"; - check_cmnd = 0; + sudoers_flags = PWCHECK_NEVER; break; case MODE_LISTDEFS: list_options(); @@ -251,7 +251,7 @@ main(argc, argv) case MODE_LIST: user_cmnd = "list"; printmatches = 1; - check_cmnd = 0; + sudoers_flags = def_ival(I_LISTPW); break; } @@ -270,7 +270,7 @@ main(argc, argv) add_env(!(sudo_mode & MODE_SHELL)); /* add in SUDO_* envariables */ /* Validate the user but don't search for pseudo-commands. */ - validated = sudoers_lookup(check_cmnd); + validated = sudoers_lookup(sudoers_flags); /* This goes after the sudoers parse since we honor sudoers options. */ if (sudo_mode == MODE_KILL || sudo_mode == MODE_INVALIDATE) { @@ -289,6 +289,10 @@ main(argc, argv) exit(1); } + /* If no command line args and "set_home" is not set, error out. */ + if ((sudo_mode & MODE_IMPLIED_SHELL) && !def_flag(I_SHELL_NOARGS)) + usage(1); + /* May need to set $HOME to target user. */ if ((sudo_mode & MODE_SHELL) && def_flag(I_SET_HOME)) sudo_mode |= MODE_RESET_HOME; @@ -543,12 +547,10 @@ parse_args() NewArgv = Argv + 1; NewArgc = Argc - 1; -#ifdef SHELL_IF_NO_ARGS if (NewArgc == 0) { /* no options and no command */ - rval |= MODE_SHELL; + rval |= (MODE_IMPLIED_SHELL | MODE_SHELL); return(rval); } -#endif while (NewArgc > 0 && NewArgv[0][0] == '-') { if (NewArgv[0][1] != '\0' && NewArgv[0][2] != '\0') { @@ -637,10 +639,8 @@ parse_args() case '-': NewArgc--; NewArgv++; -#ifdef SHELL_IF_NO_ARGS if (rval == MODE_RUN) - rval |= MODE_SHELL; -#endif + rval |= (MODE_IMPLIED_SHELL | MODE_SHELL); return(rval); case '\0': (void) fprintf(stderr, "%s: '-' requires an argument\n", @@ -766,6 +766,7 @@ check_sudoers() if (chmod(_PATH_SUDOERS, SUDOERS_MODE) == 0) { (void) fprintf(stderr, "%s: fixed mode on %s\n", Argv[0], _PATH_SUDOERS); + statbuf.st_mode |= SUDOERS_MODE; if (statbuf.st_gid != SUDOERS_GID) { if (!chown(_PATH_SUDOERS,(uid_t) -1,SUDOERS_GID)) { (void) fprintf(stderr, "%s: set group on %s\n", @@ -1008,16 +1009,17 @@ initial_setup() /* * Close any open fd's other than stdin, stdout and stderr. */ -#ifdef RLIMIT_NOFILE - if (getrlimit(RLIMIT_NOFILE, &rl) == 0) - maxfd = rl.rlim_max - 1; - else -#endif /* RLIMIT_NOFILE */ #ifdef HAVE_SYSCONF - maxfd = sysconf(_SC_OPEN_MAX) - 1; + maxfd = sysconf(_SC_OPEN_MAX) - 1; #else - maxfd = getdtablesize() - 1; + maxfd = getdtablesize() - 1; #endif /* HAVE_SYSCONF */ +#ifdef RLIMIT_NOFILE + if (getrlimit(RLIMIT_NOFILE, &rl) == 0) { + if (rl.rlim_max != RLIM_INFINITY && rl.rlim_max <= maxfd) + maxfd = rl.rlim_max - 1; + } +#endif /* RLIMIT_NOFILE */ for (fd = maxfd; fd > STDERR_FILENO; fd--) (void) close(fd); diff --git a/usr.bin/sudo/sudo.h b/usr.bin/sudo/sudo.h index 93527a475ca..8def3aadf76 100644 --- a/usr.bin/sudo/sudo.h +++ b/usr.bin/sudo/sudo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994-1996,1998-1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1994-1996,1998-2000 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.164 1999/12/02 20:31:24 millert Exp $ + * $Sudo: sudo.h,v 1.168 2000/01/17 23:46:26 millert Exp $ */ #ifndef _SUDO_SUDO_H @@ -99,7 +99,8 @@ struct sudo_user { #define MODE_LISTDEFS 00200 #define MODE_BACKGROUND 00400 #define MODE_SHELL 01000 -#define MODE_RESET_HOME 02000 +#define MODE_IMPLIED_SHELL 02000 +#define MODE_RESET_HOME 04000 /* * Used with set_perms() @@ -145,6 +146,18 @@ struct sudo_user { #define SUDO_UNLOCK 4 /* unlock a file */ /* + * Flags for sudoers_lookup: + * PASSWD_NEVER: user never has to give a passwd + * PASSWD_ALL: no passwd needed if all entries for host have NOPASSWD flag + * PASSWD_ANY: no passwd needed if any entry for host has a NOPASSWD flag + * PASSWD_ALWAYS: passwd always needed + */ +#define PWCHECK_NEVER 0x01 +#define PWCHECK_ALL 0x02 +#define PWCHECK_ANY 0x04 +#define PWCHECK_ALWAYS 0x08 + +/* * Function prototypes */ #define YY_DECL int yylex __P((void)) diff --git a/usr.bin/sudo/sudoers.5 b/usr.bin/sudo/sudoers.5 index 87b695e9c40..be44be9391c 100644 --- a/usr.bin/sudo/sudoers.5 +++ b/usr.bin/sudo/sudoers.5 @@ -1,16 +1,12 @@ .rn '' }` -''' $RCSfile: sudoers.5,v $$Revision: 1.2 $$Date: 2000/01/18 21:49:02 $ +''' $RCSfile: sudoers.5,v $$Revision: 1.3 $$Date: 2000/01/24 04:22:53 $ ''' ''' $Log: sudoers.5,v $ -''' Revision 1.2 2000/01/18 21:49:02 aaron -''' Repair duplicate word occurences; (as found by a Perl script sent to us from -''' Tom Christiansen <tchrist@perl.com>). +''' Revision 1.3 2000/01/24 04:22:53 millert +''' sudo 1.6.2 ''' -''' Revision 1.1.1.1 1999/11/18 16:29:01 millert -''' sudo 1.6, now with a BSD license -''' -''' Revision 1.15 1999/11/16 05:23:41 millert -''' Add warning about using ALL in a command context. +''' Revision 1.22 2000/01/24 03:57:49 millert +''' Add netgroup caveat ''' ''' .de Sh @@ -103,7 +99,7 @@ .nr % 0 .rr F .\} -.TH sudoers 5 "1.6" "15/Nov/1999" "FILE FORMATS" +.TH sudoers 5 "1.6.2" "23/Jan/2000" "FILE FORMATS" .UC .if n .hy 0 .if n .na @@ -237,9 +233,9 @@ There are four kinds of aliases: the \f(CWUser_Alias\fR, \f(CWRunas_Alias\fR, .PP .Vb 4 \& Alias ::= 'User_Alias' = User_Alias (':' User_Alias)* | -\& 'Runas_Alias' (':' Runas_Alias)* | -\& 'Host_Alias' (':' Host_Alias)* | -\& 'Cmnd_Alias' (':' Cmnd_Alias)* +\& 'Runas_Alias' = Runas_Alias (':' Runas_Alias)* | +\& 'Host_Alias' = Host_Alias (':' Host_Alias)* | +\& 'Cmnd_Alias' = Cmnd_Alias (':' Cmnd_Alias)* .Ve .Vb 1 \& User_Alias ::= NAME '=' User_List @@ -462,6 +458,54 @@ Address to send mail to Users in this group are exempt from password and \s-1PATH\s0 requirements .Ip "secure_path" 12 Value to override user's \f(CW$PATH\fR with +.Ip "verifypw" 12 +This option controls when a password will be required when a +user runs sudo with the \fB\-v\fR. It has the following possible values: +.Sp +.Vb 3 +\& all All the user's sudoers entries for the +\& current host must have the C<NOPASSWD> +\& flag set to avoid entering a password. +.Ve +.Vb 4 +\& any At least one of the user's sudoers entries +\& for the current host must have the +\& C<NOPASSWD> flag set to avoid entering a +\& password. +.Ve +.Vb 2 +\& never The user need never enter a password to use +\& the B<-v> flag. +.Ve +.Vb 2 +\& always The user must always enter a password to use +\& the B<-v> flag. +.Ve +The default value is `all\*(R'. +.Ip "listpw" 12 +This option controls when a password will be required when a +user runs sudo with the \fB\-l\fR. It has the following possible values: +.Sp +.Vb 3 +\& all All the user's sudoers entries for the +\& current host must have the C<NOPASSWD> +\& flag set to avoid entering a password. +.Ve +.Vb 4 +\& any At least one of the user's sudoers entries +\& for the current host must have the +\& C<NOPASSWD> flag set to avoid entering a +\& password. +.Ve +.Vb 2 +\& never The user need never enter a password to use +\& the B<-l> flag. +.Ve +.Vb 2 +\& always The user must always enter a password to use +\& the B<-l> flag. +.Ve +The default value is `any\*(R'. .PP When logging via \fIsyslog\fR\|(3), sudo accepts the following values for the syslog facility (the value of the \fBsyslog\fR Parameter): \fBauthpriv\fR (if your \s-1OS\s0 @@ -471,18 +515,19 @@ syslog priorities are supported: \fBalert\fR, \fBcrit\fR, \fBdebug\fR, \fBemerg\ \fBerr\fR, \fBinfo\fR, \fBnotice\fR, and \fBwarning\fR. .Sh "User Specification" .PP -.Vb 1 -\& Runas_Spec ::= '(' Runas_List ')' -.Ve -.Vb 1 -\& Cmnd_Spec ::= Runas_Spec? ('NOPASSWD:' | 'PASSWD:')? Cmnd +.Vb 2 +\& User_Spec ::= User_list Host_List '=' User_List Cmnd_Spec_List \e +\& (':' User_Spec)* .Ve .Vb 2 \& Cmnd_Spec_List ::= Cmnd_Spec | \& Cmnd_Spec ',' Cmnd_Spec_List .Ve .Vb 1 -\& User_Spec ::= User_list Cmnd_Spec_List (':' User_Spec)* +\& Cmnd_Spec ::= Runas_Spec? ('NOPASSWD:' | 'PASSWD:')? Cmnd +.Ve +.Vb 1 +\& Runas_Spec ::= '(' Runas_List ')' .Ve A \fBuser specification\fR determines which commands a user may run (and as what user) on specified hosts. By default, commands are @@ -532,6 +577,15 @@ 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 +Note however, that the \f(CWPASSWD\fR tag has no effect on users who are +in the group specified by the exempt_group option. +.PP +By default, if the \f(CWNOPASSWD\fR tag is applied to any of the entries +for a user on the current host, he or she will be able to run +\f(CWsudo -l\fR without a password. Additionally, a user may only run +\f(CWsudo -v\fR without a password if the \f(CWNOPASSWD\fR tag is present +for all a user's entries that pertain to the current host. +This behavior may be overridden via the verifypw and listpw options. .Sh "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 @@ -800,6 +854,12 @@ The \fIsudoers\fR file should \fBalways\fR be edited by the \fBvisudo\fR command which locks the file and does grammatical checking. It is imperative that \fIsudoers\fR be free of syntax errors since \fBsudo\fR will not run with a syntactically incorrect \fIsudoers\fR file. +.PP +When using netgroups of machines (as opposed to users), if you +store fully-qualified hostnames in the netgroup (as is usually the +case), you either need to have the machine's hostname be fully-qualified +as returned by the \f(CWhostname\fR command or use the \fIfqdn\fR option in +\fIsudoers\fR. .SH "FILES" .PP .Vb 3 @@ -902,6 +962,10 @@ will not run with a syntactically incorrect \fIsudoers\fR file. .IX Item "secure_path" +.IX Item "verifypw" + +.IX Item "listpw" + .IX Subsection "User Specification" .IX Subsection "Runas_Spec" @@ -922,7 +986,7 @@ will not run with a syntactically incorrect \fIsudoers\fR file. .IX Subsection "Exceptions to wildcard rules:" -.IX Item "\f(CW""\fR" +.IX Item \f(CW""\fR .IX Subsection "Other special characters and reserved words:" diff --git a/usr.bin/sudo/testsudoers.c b/usr.bin/sudo/testsudoers.c index 0a5485e13dc..0e32a2a542b 100644 --- a/usr.bin/sudo/testsudoers.c +++ b/usr.bin/sudo/testsudoers.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2000 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * This code is derived from software contributed by Chris Jepeway @@ -77,7 +77,7 @@ #endif /* HAVE_FNMATCH */ #ifndef lint -static const char rcsid[] = "$Sudo: testsudoers.c,v 1.66 1999/12/09 03:54:57 millert Exp $"; +static const char rcsid[] = "$Sudo: testsudoers.c,v 1.68 2000/01/17 23:46:26 millert Exp $"; #endif /* lint */ /* @@ -240,9 +240,10 @@ usergr_matches(group, user) } int -netgr_matches(netgr, host, user) +netgr_matches(netgr, host, shost, user) char *netgr; char *host; + char *shost; char *user; { #ifdef HAVE_GETDOMAINNAME @@ -268,10 +269,13 @@ netgr_matches(netgr, host, user) #endif /* HAVE_GETDOMAINNAME */ #ifdef HAVE_INNETGR - return(innetgr(netgr, host, user, domain)); -#else - return(FALSE); + if (innetgr(netgr, host, user, domain)) + return(TRUE); + else if (host != shost && innetgr(netgr, shost, user, domain)) + return(TRUE); #endif /* HAVE_INNETGR */ + + return(FALSE); } void diff --git a/usr.bin/sudo/tgetpass.c b/usr.bin/sudo/tgetpass.c index ba6c5d3d78a..32922aacfe1 100644 --- a/usr.bin/sudo/tgetpass.c +++ b/usr.bin/sudo/tgetpass.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2000 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -78,7 +78,7 @@ #endif /* TCSASOFT */ #ifndef lint -static const char rcsid[] = "$Sudo: tgetpass.c,v 1.91 1999/12/05 02:18:47 millert Exp $"; +static const char rcsid[] = "$Sudo: tgetpass.c,v 1.93 2000/01/17 23:46:26 millert Exp $"; #endif /* lint */ static char *tgetline __P((int, char *, size_t, int)); @@ -216,14 +216,14 @@ tgetline(fd, buf, bufsiz, timeout) /* Read a character, exit loop on error, EOF or EOL */ n = read(fd, &c, 1); - if (n != 1 || c == '\n') + if (n != 1 || c == '\n' || c == '\r') break; *cp++ = c; } free(readfds); } else { /* Keep reading until out of space, EOF, error, or newline */ - while (--left && (n = read(fd, &c, 1)) == 1 && c != '\n') + while (--left && (n = read(fd, &c, 1)) == 1 && (c != '\n' || c != '\r')) *cp++ = c; } *cp = '\0'; diff --git a/usr.bin/sudo/version.h b/usr.bin/sudo/version.h index 07475e22bf4..1fac06c59ee 100644 --- a/usr.bin/sudo/version.h +++ b/usr.bin/sudo/version.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2000 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.55 1999/12/05 02:18:47 millert Exp $ + * $Sudo: version.h,v 1.57 2000/01/17 23:46:26 millert Exp $ */ #ifndef _SUDO_VERSION_H #define _SUDO_VERSION_H -static const char version[] = "1.6.1"; +static const char version[] = "1.6.2"; #endif /* _SUDO_VERSION_H */ diff --git a/usr.bin/sudo/visudo.8 b/usr.bin/sudo/visudo.8 index b4c3ae7b625..6aa0d92e6c8 100644 --- a/usr.bin/sudo/visudo.8 +++ b/usr.bin/sudo/visudo.8 @@ -1,12 +1,12 @@ .rn '' }` -''' $RCSfile: visudo.8,v $$Revision: 1.1 $$Date: 1999/11/18 16:29:01 $ +''' $RCSfile: visudo.8,v $$Revision: 1.2 $$Date: 2000/01/24 04:22:53 $ ''' ''' $Log: visudo.8,v $ -''' Revision 1.1 1999/11/18 16:29:01 millert -''' Initial revision +''' Revision 1.2 2000/01/24 04:22:53 millert +''' sudo 1.6.2 ''' -''' Revision 1.12 1999/11/16 05:42:28 millert -''' get rid of references to sudo-bugs. Now mention the web site or the sudo@ alias +''' Revision 1.15 2000/01/17 17:28:41 millert +''' Crank version to 1.6.2 ''' ''' .de Sh @@ -99,7 +99,7 @@ .nr % 0 .rr F .\} -.TH visudo 8 "1.6" "15/Nov/1999" "MAINTENANCE COMMANDS" +.TH visudo 8 "1.6.2" "4/Dec/1999" "MAINTENANCE COMMANDS" .UC .if n .hy 0 .if n .na @@ -249,13 +249,13 @@ mode these are errors not warnings. .SH "ENVIRONMENT" The following environment variables are used only if \fBvisudo\fR was configured with the \fI--with-env-editor\fR option: -.Sp +.PP .Vb 2 \& EDITOR Used by visudo as the editor to use \& VISUAL Used by visudo if EDITOR is not set .Ve .SH "FILES" -.Sp +.PP .Vb 2 \& /etc/sudoers List of who can run what \& /etc/sudoers.tmp Lock file for visudo @@ -263,14 +263,14 @@ was configured with the \fI--with-env-editor\fR option: .SH "AUTHOR" Many people have worked on \fIsudo\fR over the years, this version of \fBvisudo\fR was written by: -.Sp +.PP .Vb 1 \& Todd Miller <Todd.Miller@courtesan.com> .Ve See the HISTORY file in the sudo distribution for more details. .SH "BUGS" If you feel you have found a bug in sudo, please submit a bug report -at http://www.courtesan.com/sudo/bugs/. +at http://www.courtesan.com/sudo/bugs/ .SH "DISCLAIMER" \fBVisudo\fR is provided ``AS IS'\*(R' and any express or implied warranties, including, but not limited to, the implied warranties of merchantability diff --git a/usr.bin/sudo/visudo.c b/usr.bin/sudo/visudo.c index 6a16082623c..ca2c3792cd7 100644 --- a/usr.bin/sudo/visudo.c +++ b/usr.bin/sudo/visudo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2000 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -81,7 +81,7 @@ extern int stat __P((const char *, struct stat *)); #endif /* POSIX_SIGNALS && !SA_RESETHAND */ #ifndef lint -static const char rcsid[] = "$Sudo: visudo.c,v 1.117 1999/12/02 20:31:25 millert Exp $"; +static const char rcsid[] = "$Sudo: visudo.c,v 1.121 2000/01/19 19:07:24 millert Exp $"; #endif /* lint */ /* @@ -93,7 +93,7 @@ static RETSIGTYPE Exit __P((int)); static void setup_signals __P((void)); int command_matches __P((char *, char *, char *, char *)); int addr_matches __P((char *)); -int netgr_matches __P((char *, char *, char *)); +int netgr_matches __P((char *, char *, char *, char *)); int usergr_matches __P((char *, char *)); void init_parser __P((void)); void yyrestart __P((FILE *)); @@ -169,44 +169,44 @@ main(argc, argv) #endif /* ENV_EDITOR */ /* - * Open sudoers temp file and grab a lock. + * Open sudoers, lock it and stat it. + * sudoers_fd must remain open throughout in order to hold the lock. */ - stmp_fd = open(stmp, O_WRONLY | O_CREAT, 0600); - if (stmp_fd < 0) { - (void) fprintf(stderr, "%s: %s\n", Argv[0], strerror(errno)); - exit(1); + sudoers_fd = open(sudoers, O_RDWR | O_CREAT); + if (sudoers_fd == -1) { + (void) fprintf(stderr, "%s: %s: %s\n", Argv[0], sudoers, + strerror(errno)); + Exit(-1); } - if (!lock_file(stmp_fd, SUDO_TLOCK)) { + if (!lock_file(sudoers_fd, SUDO_TLOCK)) { (void) fprintf(stderr, "%s: sudoers file busy, try again later.\n", Argv[0]); exit(1); } -#ifdef HAVE_FTRUNCATE - if (ftruncate(stmp_fd, 0) == -1) { +#ifdef HAVE_FSTAT + if (fstat(sudoers_fd, &sudoers_sb) == -1) { #else - if (truncate(stmp, 0) == -1) { + if (stat(sudoers, &sudoers_sb) == -1) { #endif - (void) fprintf(stderr, "%s: can't truncate %s: %s\n", Argv[0], - stmp, strerror(errno)); + (void) fprintf(stderr, "%s: can't stat %s: %s\n", + Argv[0], sudoers, strerror(errno)); Exit(-1); } + /* + * Open sudoers temp file. + */ + stmp_fd = open(stmp, O_WRONLY | O_CREAT | O_TRUNC, 0600); + if (stmp_fd < 0) { + (void) fprintf(stderr, "%s: %s: %s\n", Argv[0], stmp, strerror(errno)); + exit(1); + } + /* Install signal handlers to clean up stmp if we are killed. */ setup_signals(); - (void) memset(&sudoers_sb, 0, sizeof(sudoers_sb)); - if (stat(sudoers, &sudoers_sb) == -1 && errno != ENOENT) { - (void) fprintf(stderr, "%s: %s\n", Argv[0], strerror(errno)); - Exit(-1); - } - sudoers_fd = open(sudoers, O_RDONLY); - if (sudoers_fd == -1 && errno != ENOENT) { - (void) fprintf(stderr, "%s: %s\n", Argv[0], strerror(errno)); - Exit(-1); - } - /* Copy sudoers -> stmp and reset the mtime */ - if (sudoers_fd != -1) { + if (sudoers_sb.st_size) { while ((n = read(sudoers_fd, buf, sizeof(buf))) > 0) if (write(stmp_fd, buf, n) != n) { (void) fprintf(stderr, "%s: Write failed: %s\n", Argv[0], @@ -214,10 +214,10 @@ main(argc, argv) Exit(-1); } - (void) close(sudoers_fd); - } - (void) close(stmp_fd); - (void) touch(stmp, sudoers_sb.st_mtime); + (void) close(stmp_fd); + (void) touch(stmp, sudoers_sb.st_mtime); + } else + (void) close(stmp_fd); /* * Edit the temp file and parse it (for sanity checking) @@ -369,7 +369,7 @@ main(argc, argv) } } - return(0); + exit(0); } /* @@ -401,8 +401,8 @@ usergr_matches(g, u) } int -netgr_matches(n, h, u) - char *n, *h, *u; +netgr_matches(n, h, sh, u) + char *n, *h, *sh, *u; { return(TRUE); } @@ -428,17 +428,21 @@ whatnow() for (c = choice; c != '\n' && c != EOF;) c = getchar(); - if (choice == 'e' || choice == 'x' || choice == 'Q') - break; - else { - (void) puts("Options are:"); - (void) puts(" (e)dit sudoers file again"); - (void) puts(" e(x)it without saving changes to sudoers file"); - (void) puts(" (Q)uit and save changes to sudoers file (DANGER!)\n"); + switch (choice) { + case EOF: + choice = 'x'; + /* FALLTHROUGH */ + case 'e': + case 'x': + case 'Q': + return(choice); + default: + (void) puts("Options are:"); + (void) puts(" (e)dit sudoers file again"); + (void) puts(" e(x)it without saving changes to sudoers file"); + (void) puts(" (Q)uit and save changes to sudoers file (DANGER!)\n"); } } - - return(choice); } /* |