This patch will upgrade CU Sudo version 1.3.1 to version 1.3.1 patchlevel 4. To apply, run: cd sudo.v1.3.1 patch -p1 < cu-sudo.v1.3.1pl4.patch diff -uN sudo.v1.3.1/BUGS sudo.v1.3.1pl4/BUGS --- sudo.v1.3.1/BUGS Fri Aug 5 15:47:28 1994 +++ sudo.v1.3.1pl4/BUGS Tue Sep 20 17:39:38 1994 @@ -1,2 +1,5 @@ 1) Multiple entries per user doesn't work. Only the first one is used. + +2) A syntax error on the first line of the sudoers file may not be caught + by visudo. diff -uN sudo.v1.3.1/CHANGES sudo.v1.3.1pl4/CHANGES --- sudo.v1.3.1/CHANGES Wed Aug 17 10:39:17 1994 +++ sudo.v1.3.1pl4/CHANGES Tue Oct 4 11:00:22 1994 @@ -179,3 +179,34 @@ 62) All .{c,lex,yacc} files now include both sys/types.h and unistd.h so we are sure to get the typedef of uid_t. + +CHANGES from sudo 1.3.1 + +63) Added preliminary support for DEC OSF/1 protected passwords + (shadow passwords). + +CHANGES from sudo 1.3.1pl1 + +64) More support for DEC OSF/1 protected passwords (shadow passwords). + +CHANGES from sudo 1.3.1pl2 + +65) Fixed mail logging to include the username as it should have. + +66) Added hostname to log message in error mail. + +67) Added -l flag to sudo to list the allowed/forbidden commands. + Suggested by matthew@gateway.bsis.com (Matthew Stier) + +68) Fixed bison warnings for parse.yacc and visudo.yacc. + Pointed out by alfie@dcs.warwick.ac.uk (Nick Holloway). + +CHANGES from sudo 1.3.1pl3 + +69) Sudo will now exit with an error if the command to be run is > MAXPATHLEN. + +70) Test in configure for termios support was insufficient. It thought + Nextstep 3.2 had termios just because it as termios.h (need to link + with -posix for termios on NeXT's) + +CHANGES from sudo 1.3.1pl4 diff -uN sudo.v1.3.1/INSTALL sudo.v1.3.1pl4/INSTALL --- sudo.v1.3.1/INSTALL Mon Jul 25 16:36:53 1994 +++ sudo.v1.3.1pl4/INSTALL Wed Aug 31 19:52:41 1994 @@ -9,10 +9,10 @@ other than /usr/local (ie: --prefix=/opt). NOTE: if you use C2 security you need to use the --with-C2 flag to - configure. Currently this only affects hpux, ultrix, and ConvexOS with - C2 security. For hpux only, you can use --with-C2 if you are expecting - to migrate to C2 security later but it makes password lookups about - twice as slow. + configure. Currently this only affects hpux, ultrix, DEF OSF/1 and + ConvexOS with C2 security. For hpux only, you can use --with-C2 if + you are expecting to migrate to C2 security later but it makes password + lookups about twice as slow. NOTE2: if you use AFS, you need to run configure with --with-AFS diff -uN sudo.v1.3.1/Makefile.in sudo.v1.3.1pl4/Makefile.in --- sudo.v1.3.1/Makefile.in Tue Aug 30 16:29:22 1994 +++ sudo.v1.3.1pl4/Makefile.in Tue Oct 4 10:57:19 1994 @@ -3,7 +3,7 @@ #* #* This software comes with no waranty whatsoever, use at your own risk. #* -#* Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu +#* Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu #* #* sudo version 1.1 allows users to execute commands as root @@ -93,8 +93,10 @@ HDRS = sudo.h version.h insults.h +VERSION = 1.3.1pl4 + DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES COPYING INSTALL Makefile.in PORTING \ - README README.v1.3.1 SUPPORTED TODO HISTORY aclocal.m4 getcwd.c \ + README SUPPORTED TODO HISTORY aclocal.m4 getcwd.c \ putenv.c strdup.c tgetpass.c config.h.in configure configure.in \ indent.pro installbsd pathnames.h.in sample.sudoers sudo.man \ sudo.cat sudoers aixcrypt.exp visudoers/Makefile.in \ @@ -145,6 +147,10 @@ install-man: $(INSTALL) -o $(owner) -g $(group) -m 0644 $(manpage) $(mandir)/sudo.$(mansect) + echo '.so man$(mansect)/sudo.$(mansect)' > $(mandir)/visudo.$(mansect) + chown $(owner) $(mandir)/visudo.$(mansect) + chgrp $(group) $(mandir)/visudo.$(mansect) + chmod 0644 $(mandir)/visudo.$(mansect) @MAN_POSTINSTALL@ tags: $(SRCS) @@ -168,8 +174,9 @@ ( cd visudoers && rm -f TAGS tags ) dist: $(DISTFILES) - rm -f ../cu-sudo.v1.3.1.tar.Z + rm -f ../cu-sudo.v$(VERSION).tar.Z ( cd .. ; TF="/tmp/sudo.dist$$" ; rm -f $$TF ; for i in $(DISTFILES) ; \ - do echo sudo.v1.3.1/$$i >> $$TF ; done ; tar cf cu-sudo.v1.3.1.tar \ - `cat $$TF` && compress cu-sudo.v1.3.1.tar ) - ls -l ../cu-sudo.v1.3.1.tar.Z + do echo sudo.v$(VERSION)/$$i >> $$TF ; done ; \ + tar cf cu-sudo.v$(VERSION).tar \ + `cat $$TF` && compress cu-sudo.v$(VERSION).tar ) + ls -l ../cu-sudo.v$(VERSION).tar.Z diff -uN sudo.v1.3.1/README sudo.v1.3.1pl4/README --- sudo.v1.3.1/README Tue Aug 30 16:27:47 1994 +++ sudo.v1.3.1pl4/README Tue Sep 20 15:17:35 1994 @@ -24,4 +24,11 @@ desire). For more info see the INSTALL file. If you need to make changes, please send them to sudo-bugs@cs.colorado.edu +MAILING LISTS: + Please send bugs, problems, comments, etc to sudo-bugs@cs.colorado.edu +There is a mailing list that receives announcements whenever a new +version of sudo is released. You can subscribe to it by sending a +message to "majordomo@cs.colorado.edu" that includes the line +"subscribe sudo-announce". There is also a list for people working +on sudo. The command to add yourself is "subscribe sudo-workers". diff -uN sudo.v1.3.1/README.v1.3.1 sudo.v1.3.1pl4/README.v1.3.1 --- sudo.v1.3.1/README.v1.3.1 Tue Aug 30 16:27:47 1994 +++ sudo.v1.3.1pl4/README.v1.3.1 Wed Dec 31 17:00:00 1969 @@ -1,27 +0,0 @@ -This is the CU version of sudo, release 1.3.1. - -Sudo is a program designed to allow a sysadmin to give limited root privileges -to users and log root activity. The basic philosophy is to give as few -privileges as possible but still allow people to get their work done. - -For a history of CU sudo please see the HISTORY file that came with the -release. Please note that while this source is based on the Root -Group's sudo 1.1, the code has been changed significantly, so please -do not bother them with bugs in CU sudo. Bug reports for this sudo -should be sent to sudo-bugs@cs.colorado.edu. - -CU sudo 1.3.1 is mostly a cleanup of the sudo 1.3 code including bug fixes, -code reworkings, portability changes with a few extra features. See the -CHANGES file for the full scoop. - -Note that sudo now uses a "configure script." You should be able to just -type "./configure" and to generate the Makefiles, config.h and pathnames.h. -Sudo should build "out of the box" for the OS's listed in SUPPORTED. -Regardless, you should read the INSTALL file before proceeding. - -Also note that sudo options are now configured in sudo.h instead of the Makefile -(although you can override the sudo.h values from the Makefile if you so -desire). For more info see the INSTALL file. If you need to make changes, -please send them to sudo-bugs@cs.colorado.edu - -Please send bugs, problems, comments, etc to sudo-bugs@cs.colorado.edu diff -uN sudo.v1.3.1/SUPPORTED sudo.v1.3.1pl4/SUPPORTED --- sudo.v1.3.1/SUPPORTED Mon Jul 25 16:22:27 1994 +++ sudo.v1.3.1pl4/SUPPORTED Tue Oct 4 10:41:49 1994 @@ -10,7 +10,7 @@ KSR OS Linux (shadow password support untested) NextStep 2.x and 3.x -DEC OSF/1 1.x and 2.0 +DEC OSF/1 1.x and 2.0 (w/ or w/o enhanced security, see INSTALL) SunOS 3.5 and 4.x Solaris 2.x Ultrix 4.x (w/ or w/o enhanced security, see INSTALL) diff -uN sudo.v1.3.1/TODO sudo.v1.3.1pl4/TODO --- sudo.v1.3.1/TODO Sat Aug 13 15:16:26 1994 +++ sudo.v1.3.1pl4/TODO Tue Sep 20 16:10:30 1994 @@ -1,20 +1,22 @@ TODO list -01) Fix bison warnings on parse.yacc. +01) Add groups of users to the config file. -02) Add groups of users to the config file. +02) Nestable command aliases -03) Deal with host aliases (CNAME records) rationally. +03) Add uid and gid options to sudo and sudoers file. -04) Nestable command aliases +04) Redo parsing to be more like op(8) with true command aliases where + can specify uid, gid(s) and part/all of the environment. -05) Add uid and gid options to sudo and sudoers file. +05) Add default options to sudoers file (umask, def uid, def gids, dir, PATH). -06) Redo parsing to be more like op(8) with true command aliases where - can specify uid, gid(s) and part/all of the environment. +06) Add a whatnow-style prompt to visudo. + +07) Add a SHELLS reserved word that checks against /etc/shells. -07) Add default options to sudoers file (umask, def uid, def gids, dir, PATH). +08) Make the sudoers file accessible via NIS, Hesiod, and maybe NetInfo. -08) Add a whatnow-style prompt to visudo. +09) Add a %h field to MAILSUBJECT for the hostname. -09) Add a SHELLS reserved word that checks against /etc/shells. +10) Add a -h flag to sudo for a history mechanism. diff -uN sudo.v1.3.1/aclocal.m4 sudo.v1.3.1pl4/aclocal.m4 --- sudo.v1.3.1/aclocal.m4 Wed Jul 6 18:33:17 1994 +++ sudo.v1.3.1pl4/aclocal.m4 Mon Feb 6 15:41:12 1995 @@ -95,17 +95,24 @@ fi ])dnl dnl +dnl Check for ssize_t declation +define(SUDO_SSIZE_T, +[AC_CHECKING(for ssize_t in sys/types.h) +AC_HEADER_EGREP(ssize_t, sys/types.h, , AC_DEFINE(ssize_t, int))])dnl +dnl dnl check for known UNIX variants dnl XXX - check to see that uname was checked first dnl define(SUDO_OSTYPE, AC_BEFORE([$0], [AC_PROGRAM_CHECK]) [echo trying to figure out what OS you are running +OS="unknown" +OSREV=0 if test -n "$UNAMEPROG"; then echo "checking OS based on uname(1)" OS=`$UNAMEPROG -s` # this is yucky but we want to make sure $OSREV is an int... - OSREV=`$UNAMEPROG -r | $SEDPROG -e 's/^[A-z \.0]*//' -e 's/\..*//'` + OSREV=`$UNAMEPROG -r | $SEDPROG -e 's/^[[ \.0A-z]]*//' -e 's/\..*//'` if test "$OS" = "SunOS" -a "$OSREV" -ge 5 ; then OS="solaris" diff -uN sudo.v1.3.1/check.c sudo.v1.3.1pl4/check.c --- sudo.v1.3.1/check.c Thu Aug 11 19:58:14 1994 +++ sudo.v1.3.1pl4/check.c Fri Sep 2 13:54:48 1994 @@ -3,7 +3,7 @@ * * This software comes with no waranty whatsoever, use at your own risk. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * */ @@ -36,7 +36,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: check.c,v 1.32 1994/08/12 01:58:03 millert Exp $"; +static char rcsid[] = "$Id: check.c,v 1.36 1994/09/02 19:54:28 millert Exp $"; #endif /* lint */ #include "config.h" @@ -64,6 +64,10 @@ #ifdef __svr4__ #include #endif /* __svr4__ */ +#if defined(__osf__) && defined(HAVE_C2_SECURITY) +#include +#include +#endif /* __osf__ && HAVE_C2_SECURITY */ #if defined(ultrix) && defined(HAVE_C2_SECURITY) #include #endif /* ultrix && HAVE_C2_SECURITY */ @@ -265,13 +269,16 @@ #ifdef __svr4__ struct spwd *spw_ent; #endif /* __svr4__ */ -#if defined (__hpux) && defined(HAVE_C2_SECURITY) +#if defined(__hpux) && defined(HAVE_C2_SECURITY) struct s_passwd *spw_ent; #endif /* __hpux && HAVE_C2_SECURITY */ -#if defined (ultrix) && defined(HAVE_C2_SECURITY) +#if defined(__osf__) && defined(HAVE_C2_SECURITY) + struct pr_passwd *spw_ent; +#endif /* __osf__ && HAVE_C2_SECURITY */ +#if defined(ultrix) && defined(HAVE_C2_SECURITY) AUTHORIZATION *spw_ent; #endif /* ultrix && HAVE_C2_SECURITY */ -#if defined (__convex__) && defined(HAVE_C2_SECURITY) +#if defined(__convex__) && defined(HAVE_C2_SECURITY) char salt[2]; /* Need the salt to perform the encryption */ register int i; struct pr_passwd *spw_ent; @@ -280,7 +287,7 @@ char *pass; /* this is what gets entered */ register int counter = TRIES_FOR_PASSWORD; -#if defined (__hpux) && defined(HAVE_C2_SECURITY) +#if defined(__hpux) && defined(HAVE_C2_SECURITY) /* * grab encrypted password from shadow pw file * or just use the regular one... @@ -291,7 +298,18 @@ if (spw_ent && spw_ent -> pw_passwd) encrypted = spw_ent -> pw_passwd; #endif /* __hpux && HAVE_C2_SECURITY */ -#if defined (ultrix) && defined(HAVE_C2_SECURITY) +#if defined(__osf__) && defined(HAVE_C2_SECURITY) + /* + * grab encrypted password from protected passwd file + * or just use the regular one... + */ + be_root(); + spw_ent = getprpwuid(uid); + be_user(); + if (spw_ent) + encrypted = spw_ent -> ufld.fd_encrypt; +#endif /* __osf__ && HAVE_C2_SECURITY */ +#if defined(ultrix) && defined(HAVE_C2_SECURITY) /* * grab encrypted password from /etc/auth * or just use the regular one... @@ -318,7 +336,7 @@ } encrypted = spw_ent -> sp_pwdp; #endif /* __svr4__ */ -#if defined (__convex__) && defined(HAVE_C2_SECURITY) +#if defined(__convex__) && defined(HAVE_C2_SECURITY) /* * Convex with C2 security */ @@ -345,13 +363,13 @@ #endif /* USE_GETPASS */ if (!pass || *pass == '\0') exit(0); -#if defined (__convex__) && defined(HAVE_C2_SECURITY) +#if defined(__convex__) && defined(HAVE_C2_SECURITY) strncpy(salt, spw_ent->ufld.fd_encrypt, 2); i = AUTH_SALT_SIZE + AUTH_CIPHERTEXT_SEG_CHARS; if (strncmp(encrypted, crypt(pass, salt), i) == 0) return; /* if the passwd is correct return() */ #else -#if defined (ultrix) && defined(HAVE_C2_SECURITY) +#if defined(ultrix) && defined(HAVE_C2_SECURITY) if (spw_ent && !strcmp(encrypted, (char *) crypt16(pass, encrypted))) return; /* if the passwd is correct return() */ #endif /* ultrix && HAVE_C2_SECURITY */ diff -uN sudo.v1.3.1/config.h.in sudo.v1.3.1pl4/config.h.in --- sudo.v1.3.1/config.h.in Sun Aug 14 19:09:41 1994 +++ sudo.v1.3.1pl4/config.h.in Tue Oct 4 10:55:48 1994 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu */ /* @@ -66,6 +66,9 @@ /* Define to `unsigned' if doesn't define. */ #undef size_t +/* Define to `int' if doesn't define. */ +#undef ssize_t + /* Define to be nil if C compiler doesn't support "const." */ #undef const @@ -144,6 +147,9 @@ /* Define if you have setenv(3). */ #undef HAVE_SETENV +/* Define if you have tcgetattr(3). */ +#undef HAVE_TCGETATTR + /* Define if you have the header file. */ #undef HAVE_MALLOC_H @@ -164,8 +170,10 @@ /* Define if you have the header file. */ #undef HAVE_TERMIO_H -/* Define if you have the header file. */ +/* Define if you have the header file and tcgetattr(3). */ +#ifdef HAVE_TCGETATTR #undef HAVE_TERMIOS_H +#endif /* HAVE_TCGETATTR */ /* Define if you have the header file. */ #undef HAVE_SYS_SOCKIO_H diff -uN sudo.v1.3.1/configure sudo.v1.3.1pl4/configure --- sudo.v1.3.1/configure Sun Aug 14 19:22:52 1994 +++ sudo.v1.3.1pl4/configure Sat Jul 1 18:23:10 1995 @@ -1,65 +1,49 @@ -echo Configuring CU Sudo version 1.3.1 -#!/bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 1.10 -# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. - -# This configure script is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as published -# by the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This script is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#! /bin/sh -# Save the original args to write them into config.status later. -configure_args="$*" +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.4 +# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. -# Only options that might do something get documented. -ac_usage="Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] ---build=BUILD configure for building on BUILD [BUILD=HOST] ---disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) ---enable-FEATURE[=ARG] include FEATURE [ARG=yes] ---exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local] ---help print this message ---host=HOST configure for HOST [guessed] ---prefix=PREFIX install host independent files in PREFIX [/usr/local] ---quiet, --silent do not print \`checking for...' messages ---srcdir=DIR find the sources in DIR [configure dir or ..] ---target=TARGET configure for TARGET [TARGET=HOST] ---verbose print results of checks ---version print the version of autoconf that created configure ---with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ---without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ---x-includes=DIR X include files are in DIR ---x-libraries=DIR X library files are in DIR" +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --with-getpass" +ac_help="$ac_help + --with-C2" +ac_help="$ac_help + --with-AFS" +ac_help="$ac_help + --with-csops" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE -exec_prefix= +cache_file=./config.cache +exec_prefix=NONE host=NONE no_create= nonopt=NONE -norecursion= -prefix= -program_prefix= -program_suffix= -program_transform_name= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, silent= +site= srcdir= target=NONE verbose= -x_includes= -x_libraries= +x_includes=NONE +x_libraries=NONE + +# Initialize some other variables. +subdirs= ac_prev= for ac_option @@ -72,14 +56,13 @@ continue fi - # Accept (but ignore some of) the important Cygnus configure - # options, so we can diagnose typos. - case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case "$ac_option" in -build | --build | --buil | --bui | --bu | --b) @@ -87,20 +70,27 @@ -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) build="$ac_optarg" ;; + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that aren't valid shell variable names. + # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - echo "configure: $ac_feature: invalid feature name" >&2; exit 1 + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that aren't valid shell variable names. + # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - echo "configure: $ac_feature: invalid feature name" >&2; exit 1 + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in @@ -109,7 +99,6 @@ esac eval "enable_${ac_feature}='$ac_optarg'" ;; - # For backward compatibility, recognize -exec-prefix and --exec_prefix. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) @@ -120,11 +109,42 @@ exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) - with_gas=yes ;; # Obsolete; use --with-gas. + # Obsolete; use --with-gas. + with_gas=yes ;; -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF -$ac_usage +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=PREFIX install architecture-dependent files in PREFIX + [same as prefix] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +--enable and --with options recognized:$ac_help EOF exit 0 ;; @@ -134,15 +154,16 @@ host="$ac_optarg" ;; -nfp | --nfp | --nf) - with_fp=no ;; # Obsolete; use --without-fp. + # Obsolete; use --without-fp. + with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; - -norecursion | --norecursion | --norecursio | --norecursi \ - | --norecurs | --norecur | --norecu | --norec | --nore | --nor) - norecursion=yes ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; @@ -184,6 +205,11 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -198,14 +224,14 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 1.10" + echo "configure generated by autoconf version 2.4" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that aren't valid shell variable names. + # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - echo "configure: $ac_package: invalid package name" >&2; exit 1 + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in @@ -216,14 +242,16 @@ -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that aren't valid shell variable names. + # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - echo "configure: $ac_package: invalid package name" >&2; exit 1 + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; - --x) with_x=yes ;; # Obsolete; use --with-x. + --x) + # Obsolete; use --with-x. + with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) @@ -239,15 +267,15 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; - -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1 + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" >&2 + echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then - echo "configure: can only configure for one host and one target at a time" >&2; exit 1 + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; @@ -256,31 +284,53 @@ done if test -n "$ac_prev"; then - echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1 + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi -trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 -trap 'rm -fr confdefs* $ac_clean_files' 0 +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log -# Save the original args if we used an alternate arg parser. -ac_configure_temp="${configure_args-$*}" -# Strip out --no-create and --norecursion so they don't pile up. -configure_args= -for ac_arg in $ac_configure_temp; do +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; - -norecursion | --norecursion | --norecursio | --norecursi \ - | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;; - *) configure_args="$configure_args $ac_arg" ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. +# Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = 'set'; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LANG+set}" = set; then LANG=C; export LANG; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h @@ -294,7 +344,7 @@ # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then `..'. + # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. @@ -302,18 +352,58 @@ if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi +else + ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then - if test x$ac_srcdir_defaulted = xyes; then - echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1 + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else - echo "configure: can not find sources in ${srcdir}" >&2; exit 1 + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='${CPP}' -ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1' +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi @@ -327,216 +417,293 @@ MAN_PREFIX='$(prefix)/man' MANTYPE="man" MAN_POSTINSTALL="" -# check whether --with-getpass or --without-getpass was given. +# Check whether --with-getpass or --without-getpass was given. withval="$with_getpass" if test -n "$withval"; then - -{ -test -n "$verbose" && \ -echo " defining USE_GETPASS" -echo "#define" USE_GETPASS "1" >> confdefs.h -DEFS="$DEFS -DUSE_GETPASS=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}USE_GETPASS\${ac_dB}USE_GETPASS\${ac_dC}1\${ac_dD} -\${ac_uA}USE_GETPASS\${ac_uB}USE_GETPASS\${ac_uC}1\${ac_uD} -\${ac_eA}USE_GETPASS\${ac_eB}USE_GETPASS\${ac_eC}1\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define USE_GETPASS 1 +EOF echo 'Using system getpass' TGETPASS="" fi -# check whether --with-C2 or --without-C2 was given. +# Check whether --with-C2 or --without-C2 was given. withval="$with_C2" if test -n "$withval"; then - -{ -test -n "$verbose" && \ -echo " defining HAVE_C2_SECURITY" -echo "#define" HAVE_C2_SECURITY "1" >> confdefs.h -DEFS="$DEFS -DHAVE_C2_SECURITY=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_C2_SECURITY\${ac_dB}HAVE_C2_SECURITY\${ac_dC}1\${ac_dD} -\${ac_uA}HAVE_C2_SECURITY\${ac_uB}HAVE_C2_SECURITY\${ac_uC}1\${ac_uD} -\${ac_eA}HAVE_C2_SECURITY\${ac_eB}HAVE_C2_SECURITY\${ac_eC}1\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define HAVE_C2_SECURITY 1 +EOF C2=1 echo 'Configuring for C2 security' fi -# check whether --with-AFS or --without-AFS was given. +# Check whether --with-AFS or --without-AFS was given. withval="$with_AFS" if test -n "$withval"; then - -{ -test -n "$verbose" && \ -echo " defining HAVE_AFS" -echo "#define" HAVE_AFS "1" >> confdefs.h -DEFS="$DEFS -DHAVE_AFS=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_AFS\${ac_dB}HAVE_AFS\${ac_dC}1\${ac_dD} -\${ac_uA}HAVE_AFS\${ac_uB}HAVE_AFS\${ac_uC}1\${ac_uD} -\${ac_eA}HAVE_AFS\${ac_eB}HAVE_AFS\${ac_eC}1\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define HAVE_AFS 1 +EOF AFS=1 echo 'Configuring for use with AFS' fi -# check whether --with-csops or --without-csops was given. +# Check whether --with-csops or --without-csops was given. withval="$with_csops" if test -n "$withval"; then OPTIONS="${OPTIONS} -DUSE_INSULTS -DENV_EDITOR -DSHORT_MESSAGE" echo 'CSOps--adding options: USE_INSULTS ENV_EDITOR SHORT_MESSAGE' fi -if test -z "$CC"; then - # Extract the first word of `gcc', so it can be a program name with args. - set ac_dummy gcc; ac_word=$2 - test -n "$silent" || echo "checking for $ac_word" +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - CC="gcc" + ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" + test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 fi -test -z "$CC" && CC="cc" -test -n "$CC" && test -n "$verbose" && echo " setting CC to $CC" -# Find out if we are using GNU C, under whatever name. -cat > conftest.c <&6 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c < conftest.out 2>&1 -if egrep yes conftest.out >/dev/null 2>&1; then - GCC=1 # For later tests. +if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +if test $ac_cv_prog_gcc = yes; then + GCC=yes + if test "${CFLAGS+set}" != set; then + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_gcc_g=yes +else + ac_cv_prog_gcc_g=no fi rm -f conftest* -test -n "$silent" || echo "checking how to run the C preprocessor" +fi + echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 + if test $ac_cv_prog_gcc_g = yes; then + CFLAGS="-g -O" + else + CFLAGS="-O" + fi + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi if test -z "$CPP"; then - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and ``${CC-cc}'' will simply confuse - # make. It must be expanded now. +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" - cat > conftest.${ac_ext} < conftest.$ac_ext < +#include Syntax Error EOF -# Some shells (Coherent) do redirections in the wrong order, so need -# the parens. -ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else + echo "$ac_err" >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.${ac_ext} < conftest.$ac_ext < +#include Syntax Error EOF -# Some shells (Coherent) do redirections in the wrong order, so need -# the parens. -ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else + echo "$ac_err" >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" fi -test -n "$verbose" && echo " setting CPP to $CPP" +echo "$ac_t""$CPP" 1>&6 -if test -z "$UNAMEPROG"; then - # Extract the first word of `uname', so it can be a program name with args. - set ac_dummy uname; ac_word=$2 - test -n "$silent" || echo "checking for $ac_word" +# Extract the first word of "uname", so it can be a program name with args. +set dummy uname; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_UNAMEPROG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$UNAMEPROG"; then + ac_cv_prog_UNAMEPROG="$UNAMEPROG" # Let the user override the test. +else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - UNAMEPROG="uname" + ac_cv_prog_UNAMEPROG="uname" break fi done IFS="$ac_save_ifs" fi +fi +UNAMEPROG="$ac_cv_prog_UNAMEPROG" +if test -n "$UNAMEPROG"; then + echo "$ac_t""$UNAMEPROG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi -test -n "$UNAMEPROG" && test -n "$verbose" && echo " setting UNAMEPROG to $UNAMEPROG" - -if test -z "$TRPROG"; then - # Extract the first word of `tr', so it can be a program name with args. - set ac_dummy tr; ac_word=$2 - test -n "$silent" || echo "checking for $ac_word" +# Extract the first word of "tr", so it can be a program name with args. +set dummy tr; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_TRPROG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$TRPROG"; then + ac_cv_prog_TRPROG="$TRPROG" # Let the user override the test. +else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - TRPROG="tr" + ac_cv_prog_TRPROG="tr" break fi done IFS="$ac_save_ifs" fi +fi +TRPROG="$ac_cv_prog_TRPROG" +if test -n "$TRPROG"; then + echo "$ac_t""$TRPROG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi -test -n "$TRPROG" && test -n "$verbose" && echo " setting TRPROG to $TRPROG" - -if test -z "$SEDPROG"; then - # Extract the first word of `sed', so it can be a program name with args. - set ac_dummy sed; ac_word=$2 - test -n "$silent" || echo "checking for $ac_word" +# Extract the first word of "sed", so it can be a program name with args. +set dummy sed; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_SEDPROG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$SEDPROG"; then + ac_cv_prog_SEDPROG="$SEDPROG" # Let the user override the test. +else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - SEDPROG="sed" + ac_cv_prog_SEDPROG="sed" break fi done IFS="$ac_save_ifs" fi +fi +SEDPROG="$ac_cv_prog_SEDPROG" +if test -n "$SEDPROG"; then + echo "$ac_t""$SEDPROG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi -test -n "$SEDPROG" && test -n "$verbose" && echo " setting SEDPROG to $SEDPROG" - -if test -z "$NROFFPROG"; then - # Extract the first word of `nroff', so it can be a program name with args. - set ac_dummy nroff; ac_word=$2 - test -n "$silent" || echo "checking for $ac_word" +# Extract the first word of "nroff", so it can be a program name with args. +set dummy nroff; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_NROFFPROG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$NROFFPROG"; then + ac_cv_prog_NROFFPROG="$NROFFPROG" # Let the user override the test. +else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - NROFFPROG="nroff" + ac_cv_prog_NROFFPROG="nroff" break fi done IFS="$ac_save_ifs" fi - -test -n "$NROFFPROG" && test -n "$verbose" && echo " setting NROFFPROG to $NROFFPROG" +fi +NROFFPROG="$ac_cv_prog_NROFFPROG" +if test -n "$NROFFPROG"; then + echo "$ac_t""$NROFFPROG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi if test -z "$NROFFPROG"; then MANTYPE="cat" fi echo trying to figure out what OS you are running +OS="unknown" +OSREV=0 if test -n "$UNAMEPROG"; then echo "checking OS based on uname(1)" OS=`$UNAMEPROG -s` # this is yucky but we want to make sure $OSREV is an int... - OSREV=`$UNAMEPROG -r | $SEDPROG -e 's/^A-z \.0*//' -e 's/\..*//'` + OSREV=`$UNAMEPROG -r | $SEDPROG -e 's/^[ \.0A-z]*//' -e 's/\..*//'` if test "$OS" = "SunOS" -a "$OSREV" -ge 5 ; then OS="solaris" @@ -544,18 +711,18 @@ else if test -z "$OS"; then echo checking for ConvexOS -cat > conftest.${ac_ext} < conftest.$ac_ext < conftest.out 2>&1" -if egrep "yes" conftest.out >/dev/null 2>&1; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then rm -rf conftest* OS="convex" - fi rm -f conftest* @@ -563,7 +730,8 @@ fi if test -z "$OS"; then echo checking for MORE/BSD -cat > conftest.${ac_ext} < conftest.$ac_ext < #ifdef MORE_BSD @@ -571,11 +739,10 @@ #endif EOF -eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" -if egrep "yes" conftest.out >/dev/null 2>&1; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then rm -rf conftest* OS="mtxinu" - fi rm -f conftest* @@ -583,18 +750,18 @@ fi if test -z "$OS"; then echo checking for NeXTstep -cat > conftest.${ac_ext} < conftest.$ac_ext < conftest.out 2>&1" -if egrep "yes" conftest.out >/dev/null 2>&1; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then rm -rf conftest* OS="NeXT" - fi rm -f conftest* @@ -602,7 +769,8 @@ fi if test -z "$OS"; then echo checking for BSD -cat > conftest.${ac_ext} < conftest.$ac_ext < #ifdef BSD @@ -610,11 +778,10 @@ #endif EOF -eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" -if egrep "yes" conftest.out >/dev/null 2>&1; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then rm -rf conftest* OS="bsd" - fi rm -f conftest* @@ -628,62 +795,57 @@ OS=`echo $OS | $TRPROG '[A-Z]' '[a-z]'` case "$OS" in "sunos") echo "Looks like SunOS 4.x" - if test -z "$GCC"; then + if test -n "$GCC"; then + STATIC_FLAGS="-static" + else STATIC_FLAGS="-Bstatic" fi ;; "solaris") echo "Looks like Solaris" - -{ -test -n "$verbose" && \ -echo " defining SVR4" -echo "#define" SVR4 "1" >> confdefs.h -DEFS="$DEFS -DSVR4=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}SVR4\${ac_dB}SVR4\${ac_dC}1\${ac_dD} -\${ac_uA}SVR4\${ac_uB}SVR4\${ac_uC}1\${ac_uD} -\${ac_eA}SVR4\${ac_eB}SVR4\${ac_eC}1\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define SVR4 1 +EOF ;; "aix") echo "Looks like AIX" - -{ -test -n "$verbose" && \ -echo " defining _ALL_SOURCE" -echo "#define" _ALL_SOURCE "1" >> confdefs.h -DEFS="$DEFS -D_ALL_SOURCE=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD} -\${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD} -\${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _ALL_SOURCE 1 +EOF + STATIC_FLAGS="-Wl,-bI:./aixcrypt.exp" ;; "hp-ux") echo "Looks like HP-UX" - if test -z "$GCC"; then - STATIC_FLAGS="-Wl,-a,archive" + if test "$OSREV" -lt 9 ; then + if test -n "$GCC"; then + STATIC_FLAGS="-static" + else + STATIC_FLAGS="-Wl,-a,archive" + fi + fi + if test -n "$AFS" ; then + LIBS="-lBSD ${LIBS}" fi ;; "osf1") echo "Looks like OSF/1" - if test -z "$GCC"; then - STATIC_FLAGS="-non_shared" + STATIC_FLAGS="-Wl,-no_library_replacement" + # C2 security stuff + if test -n "$C2"; then + LIBS="${LIBS} -lsecurity -laud" fi ;; "irix") echo "Looks like IRIX" + # C2 security stuff + if test -n "$C2" ; then + cat >> confdefs.h <<\EOF +#define SVR4 1 +EOF + + fi # configure doesn't think irix has stdc headers # but it's good enough for sudo - -{ -test -n "$verbose" && \ -echo " defining STDC_HEADERS" -echo "#define" STDC_HEADERS "1" >> confdefs.h -DEFS="$DEFS -DSTDC_HEADERS=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD} -\${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD} -\${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF if test -z "$NROFFPROG"; then MAN_POSTINSTALL='/bin/rm -f $(mandir)/sudo.$(mansect).z ; /usr/bin/pack $(mandir)/sudo.$(mansect)' @@ -701,19 +863,14 @@ fi ;; "linux") echo "Looks like linux" + if test -n "$GCC"; then + STATIC_FLAGS="-static" + fi ;; "convex") echo "Looks like ConvexOs" - -{ -test -n "$verbose" && \ -echo " defining _CONVEX_SOURCE" -echo "#define" _CONVEX_SOURCE "1" >> confdefs.h -DEFS="$DEFS -D_CONVEX_SOURCE=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_CONVEX_SOURCE\${ac_dB}_CONVEX_SOURCE\${ac_dC}1\${ac_dD} -\${ac_uA}_CONVEX_SOURCE\${ac_uB}_CONVEX_SOURCE\${ac_uC}1\${ac_uD} -\${ac_eA}_CONVEX_SOURCE\${ac_eB}_CONVEX_SOURCE\${ac_eC}1\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _CONVEX_SOURCE 1 +EOF # C2 security stuff if test -n "$C2"; then @@ -744,54 +901,73 @@ *) echo "Hmmm, I don't recognize $OS offhand, but that's ok" ;; esac -if test -n "$GCC" -a -n "$OS" -a "$OS" != "solaris" -a "$OS" != "aix" ; then - STATIC_FLAGS="-static" -fi if test -n "$AFS" ; then LIBS="${LIBS} -L/usr/lib/afs -lkauth -lprot -lauth -lubik -lrxkad -lsys -ldes -lrx -llwp -lcom_err -laudit -lutil" fi -if test -n "$GCC"; then - test -n "$silent" || echo "checking whether -traditional is needed" - ac_pattern="Autoconf.*'x'" - ac_prog='#include -Autoconf TIOCGETP' - cat > conftest.${ac_ext} <&6 +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 < +Autoconf TIOCGETP EOF -eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" -if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* - ac_need_trad=1 - + ac_cv_prog_gcc_traditional=yes +else + rm -rf conftest* + ac_cv_prog_gcc_traditional=no fi rm -f conftest* - if test -z "$ac_need_trad"; then - ac_prog='#include -Autoconf TCGETA' - cat > conftest.${ac_ext} < conftest.$ac_ext < +Autoconf TCGETA EOF -eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" -if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* - ac_need_trad=1 - + ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi - test -n "$ac_need_trad" && CC="$CC -traditional" fi + echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < conftest.${ac_ext} <> confdefs.h -DEFS="$DEFS -Dconst=" -ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD} -\${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD} -\${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD} -" -} - + ac_cv_c_const=no fi rm -f conftest* +fi +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + for ac_prog in 'bison -y' byacc do -if test -z "$YACC"; then - # Extract the first word of `$ac_prog', so it can be a program name with args. - set ac_dummy $ac_prog; ac_word=$2 - test -n "$silent" || echo "checking for $ac_word" +# 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 +if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - YACC="$ac_prog" + ac_cv_prog_YACC="$ac_prog" break fi done IFS="$ac_save_ifs" fi - -test -n "$YACC" && test -n "$verbose" && echo " setting YACC to $YACC" +fi +YACC="$ac_cv_prog_YACC" +if test -n "$YACC"; then + echo "$ac_t""$YACC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" -if test -z "$LEX"; then - # Extract the first word of `flex', so it can be a program name with args. - set ac_dummy flex; ac_word=$2 - test -n "$silent" || echo "checking for $ac_word" +# Extract the first word of "flex", so it can be a program name with args. +set dummy flex; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - LEX="flex" + ac_cv_prog_LEX="flex" break fi done IFS="$ac_save_ifs" + test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" +fi +fi +LEX="$ac_cv_prog_LEX" +if test -n "$LEX"; then + echo "$ac_t""$LEX" 1>&6 +else + echo "$ac_t""no" 1>&6 fi -test -z "$LEX" && LEX="lex" -test -n "$LEX" && test -n "$verbose" && echo " setting LEX to $LEX" if test -z "$LEXLIB" then case "$LEX" in - flex*) ac_save_LIBS="${LIBS}" -LIBS="${LIBS} -lfl" -ac_have_lib="" -test -n "$silent" || echo "checking for -lfl" -cat > conftest.${ac_ext} <&6 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$ac_lib $LIBS" +cat > conftest.$ac_ext <&6 + LEXLIB="-l$ac_lib" else - :; + echo "$ac_t""no" 1>&6 fi - ;; - *) LEXLIB="-ll" ;; - esac + fi -test -n "$verbose" && echo " setting LEXLIB to $LEXLIB" if test "$LEX" = "flex"; then - -{ -test -n "$verbose" && \ -echo " defining HAVE_FLEX" -echo "#define" HAVE_FLEX "1" >> confdefs.h -DEFS="$DEFS -DHAVE_FLEX=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_FLEX\${ac_dB}HAVE_FLEX\${ac_dC}1\${ac_dD} -\${ac_uA}HAVE_FLEX\${ac_uB}HAVE_FLEX\${ac_uC}1\${ac_uD} -\${ac_eA}HAVE_FLEX\${ac_eB}HAVE_FLEX\${ac_eC}1\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define HAVE_FLEX 1 +EOF fi # Make sure to not get the incompatible SysV /etc/install, /sbin/install @@ -983,742 +1177,845 @@ test -n "$verbose" && echo " setting INSTALL_DATA to $INSTALL_DATA" if test -f "/usr/sbin/sendmail"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_SENDMAIL to be ""/usr/sbin/sendmail"" -echo "#define" _PATH_SENDMAIL ""/usr/sbin/sendmail"" >> confdefs.h -DEFS="$DEFS -D_PATH_SENDMAIL="/usr/sbin/sendmail"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_SENDMAIL\${ac_dB}_PATH_SENDMAIL\${ac_dC}\"/usr/sbin/sendmail\"\${ac_dD} -\${ac_uA}_PATH_SENDMAIL\${ac_uB}_PATH_SENDMAIL\${ac_uC}\"/usr/sbin/sendmail\"\${ac_uD} -\${ac_eA}_PATH_SENDMAIL\${ac_eB}_PATH_SENDMAIL\${ac_eC}\"/usr/sbin/sendmail\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_SENDMAIL "/usr/sbin/sendmail" +EOF elif test -f "/usr/lib/sendmail"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_SENDMAIL to be ""/usr/lib/sendmail"" -echo "#define" _PATH_SENDMAIL ""/usr/lib/sendmail"" >> confdefs.h -DEFS="$DEFS -D_PATH_SENDMAIL="/usr/lib/sendmail"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_SENDMAIL\${ac_dB}_PATH_SENDMAIL\${ac_dC}\"/usr/lib/sendmail\"\${ac_dD} -\${ac_uA}_PATH_SENDMAIL\${ac_uB}_PATH_SENDMAIL\${ac_uC}\"/usr/lib/sendmail\"\${ac_uD} -\${ac_eA}_PATH_SENDMAIL\${ac_eB}_PATH_SENDMAIL\${ac_eC}\"/usr/lib/sendmail\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_SENDMAIL "/usr/lib/sendmail" +EOF elif test -f "/usr/etc/sendmail"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_SENDMAIL to be ""/usr/etc/sendmail"" -echo "#define" _PATH_SENDMAIL ""/usr/etc/sendmail"" >> confdefs.h -DEFS="$DEFS -D_PATH_SENDMAIL="/usr/etc/sendmail"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_SENDMAIL\${ac_dB}_PATH_SENDMAIL\${ac_dC}\"/usr/etc/sendmail\"\${ac_dD} -\${ac_uA}_PATH_SENDMAIL\${ac_uB}_PATH_SENDMAIL\${ac_uC}\"/usr/etc/sendmail\"\${ac_uD} -\${ac_eA}_PATH_SENDMAIL\${ac_eB}_PATH_SENDMAIL\${ac_eC}\"/usr/etc/sendmail\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_SENDMAIL "/usr/etc/sendmail" +EOF elif test -f "/usr/local/lib/sendmail"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_SENDMAIL to be ""/usr/local/lib/sendmail"" -echo "#define" _PATH_SENDMAIL ""/usr/local/lib/sendmail"" >> confdefs.h -DEFS="$DEFS -D_PATH_SENDMAIL="/usr/local/lib/sendmail"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_SENDMAIL\${ac_dB}_PATH_SENDMAIL\${ac_dC}\"/usr/local/lib/sendmail\"\${ac_dD} -\${ac_uA}_PATH_SENDMAIL\${ac_uB}_PATH_SENDMAIL\${ac_uC}\"/usr/local/lib/sendmail\"\${ac_uD} -\${ac_eA}_PATH_SENDMAIL\${ac_eB}_PATH_SENDMAIL\${ac_eC}\"/usr/local/lib/sendmail\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_SENDMAIL "/usr/local/lib/sendmail" +EOF elif test -f "/usr/local/bin/sendmail"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_SENDMAIL to be ""/usr/local/bin/sendmail"" -echo "#define" _PATH_SENDMAIL ""/usr/local/bin/sendmail"" >> confdefs.h -DEFS="$DEFS -D_PATH_SENDMAIL="/usr/local/bin/sendmail"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_SENDMAIL\${ac_dB}_PATH_SENDMAIL\${ac_dC}\"/usr/local/bin/sendmail\"\${ac_dD} -\${ac_uA}_PATH_SENDMAIL\${ac_uB}_PATH_SENDMAIL\${ac_uC}\"/usr/local/bin/sendmail\"\${ac_uD} -\${ac_eA}_PATH_SENDMAIL\${ac_eB}_PATH_SENDMAIL\${ac_eC}\"/usr/local/bin/sendmail\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_SENDMAIL "/usr/local/bin/sendmail" +EOF fi if test -f "/usr/bin/pwd"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_PWD to be ""/usr/bin/pwd"" -echo "#define" _PATH_PWD ""/usr/bin/pwd"" >> confdefs.h -DEFS="$DEFS -D_PATH_PWD="/usr/bin/pwd"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_PWD\${ac_dB}_PATH_PWD\${ac_dC}\"/usr/bin/pwd\"\${ac_dD} -\${ac_uA}_PATH_PWD\${ac_uB}_PATH_PWD\${ac_uC}\"/usr/bin/pwd\"\${ac_uD} -\${ac_eA}_PATH_PWD\${ac_eB}_PATH_PWD\${ac_eC}\"/usr/bin/pwd\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_PWD "/usr/bin/pwd" +EOF elif test -f "/bin/pwd"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_PWD to be ""/bin/pwd"" -echo "#define" _PATH_PWD ""/bin/pwd"" >> confdefs.h -DEFS="$DEFS -D_PATH_PWD="/bin/pwd"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_PWD\${ac_dB}_PATH_PWD\${ac_dC}\"/bin/pwd\"\${ac_dD} -\${ac_uA}_PATH_PWD\${ac_uB}_PATH_PWD\${ac_uC}\"/bin/pwd\"\${ac_uD} -\${ac_eA}_PATH_PWD\${ac_eB}_PATH_PWD\${ac_eC}\"/bin/pwd\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_PWD "/bin/pwd" +EOF elif test -f "/usr/ucb/pwd"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_PWD to be ""/usr/ucb/pwd"" -echo "#define" _PATH_PWD ""/usr/ucb/pwd"" >> confdefs.h -DEFS="$DEFS -D_PATH_PWD="/usr/ucb/pwd"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_PWD\${ac_dB}_PATH_PWD\${ac_dC}\"/usr/ucb/pwd\"\${ac_dD} -\${ac_uA}_PATH_PWD\${ac_uB}_PATH_PWD\${ac_uC}\"/usr/ucb/pwd\"\${ac_uD} -\${ac_eA}_PATH_PWD\${ac_eB}_PATH_PWD\${ac_eC}\"/usr/ucb/pwd\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_PWD "/usr/ucb/pwd" +EOF elif test -f "/usr/sbin/pwd"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_PWD to be ""/usr/sbin/pwd"" -echo "#define" _PATH_PWD ""/usr/sbin/pwd"" >> confdefs.h -DEFS="$DEFS -D_PATH_PWD="/usr/sbin/pwd"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_PWD\${ac_dB}_PATH_PWD\${ac_dC}\"/usr/sbin/pwd\"\${ac_dD} -\${ac_uA}_PATH_PWD\${ac_uB}_PATH_PWD\${ac_uC}\"/usr/sbin/pwd\"\${ac_uD} -\${ac_eA}_PATH_PWD\${ac_eB}_PATH_PWD\${ac_eC}\"/usr/sbin/pwd\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_PWD "/usr/sbin/pwd" +EOF fi if test -f "/usr/bin/vi"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_VI to be ""/usr/bin/vi"" -echo "#define" _PATH_VI ""/usr/bin/vi"" >> confdefs.h -DEFS="$DEFS -D_PATH_VI="/usr/bin/vi"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_VI\${ac_dB}_PATH_VI\${ac_dC}\"/usr/bin/vi\"\${ac_dD} -\${ac_uA}_PATH_VI\${ac_uB}_PATH_VI\${ac_uC}\"/usr/bin/vi\"\${ac_uD} -\${ac_eA}_PATH_VI\${ac_eB}_PATH_VI\${ac_eC}\"/usr/bin/vi\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_VI "/usr/bin/vi" +EOF elif test -f "/usr/ucb/vi"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_VI to be ""/usr/ucb/vi"" -echo "#define" _PATH_VI ""/usr/ucb/vi"" >> confdefs.h -DEFS="$DEFS -D_PATH_VI="/usr/ucb/vi"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_VI\${ac_dB}_PATH_VI\${ac_dC}\"/usr/ucb/vi\"\${ac_dD} -\${ac_uA}_PATH_VI\${ac_uB}_PATH_VI\${ac_uC}\"/usr/ucb/vi\"\${ac_uD} -\${ac_eA}_PATH_VI\${ac_eB}_PATH_VI\${ac_eC}\"/usr/ucb/vi\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_VI "/usr/ucb/vi" +EOF elif test -f "/usr/local/bin/vi"; then - -{ -test -n "$verbose" && \ -echo " defining" _PATH_VI to be ""/usr/local/bin/vi"" -echo "#define" _PATH_VI ""/usr/local/bin/vi"" >> confdefs.h -DEFS="$DEFS -D_PATH_VI="/usr/local/bin/vi"" -ac_sed_defs="${ac_sed_defs}\${ac_dA}_PATH_VI\${ac_dB}_PATH_VI\${ac_dC}\"/usr/local/bin/vi\"\${ac_dD} -\${ac_uA}_PATH_VI\${ac_uB}_PATH_VI\${ac_uC}\"/usr/local/bin/vi\"\${ac_uD} -\${ac_eA}_PATH_VI\${ac_eB}_PATH_VI\${ac_eC}\"/usr/local/bin/vi\"\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define _PATH_VI "/usr/local/bin/vi" +EOF + +fi +# If we cannot run a trivial program, we must be cross compiling. +echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_cross=yes +else +cat > conftest.$ac_ext </dev/null; then + ac_cv_c_cross=no +else + ac_cv_c_cross=yes +fi +fi +rm -fr conftest* fi +cross_compiling=$ac_cv_c_cross +echo "$ac_t""$ac_cv_c_cross" 1>&6 -test -n "$silent" || echo "checking for ANSI C header files" -cat > conftest.${ac_ext} <&6 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < #include #include #include EOF -# Some shells (Coherent) do redirections in the wrong order, so need -# the parens. -ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -echo '#include "confdefs.h" -#include ' > conftest.${ac_ext} -eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" -if egrep "memchr" conftest.out >/dev/null 2>&1; then +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else rm -rf conftest* - # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -cat > conftest.${ac_ext} < conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e,f) (((e) && !(f)) || (!(e) && (f))) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -eval $ac_compile +eval $ac_link if test -s conftest && (./conftest; exit) 2>/dev/null; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -echo '#include "confdefs.h" -#include ' > conftest.${ac_ext} -eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" -if egrep "free" conftest.out >/dev/null 2>&1; then - rm -rf conftest* - -{ -test -n "$verbose" && \ -echo " defining STDC_HEADERS" -echo "#define" STDC_HEADERS "1" >> confdefs.h -DEFS="$DEFS -DSTDC_HEADERS=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD} -\${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD} -\${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD} -" -} - - + : +else + ac_cv_header_stdc=no fi -rm -f conftest* - - fi rm -fr conftest* - fi -rm -f conftest* - +fi +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF fi -rm -f conftest* for ac_hdr in string.h strings.h unistd.h malloc.h paths.h sys/sockio.h do -ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` -test -n "$silent" || echo "checking for ${ac_hdr}" -cat > conftest.${ac_ext} < -EOF -# Some shells (Coherent) do redirections in the wrong order, so need -# the parens. -ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +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 +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* - -{ -test -n "$verbose" && \ -echo " defining ${ac_tr_hdr}" -echo "#define" ${ac_tr_hdr} "1" >> confdefs.h -DEFS="$DEFS -D${ac_tr_hdr}=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD} -\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD} -\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD} -" -} - - + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` + cat >> confdefs.h <&6 +fi done if test "$OS" != "ultrix" ; then for ac_hdr in termio.h termios.h do -ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` -test -n "$silent" || echo "checking for ${ac_hdr}" -cat > conftest.${ac_ext} < -EOF -# Some shells (Coherent) do redirections in the wrong order, so need -# the parens. -ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +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 +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* - -{ -test -n "$verbose" && \ -echo " defining ${ac_tr_hdr}" -echo "#define" ${ac_tr_hdr} "1" >> confdefs.h -DEFS="$DEFS -D${ac_tr_hdr}=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD} -\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD} -\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD} -" -} - - + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` + cat >> confdefs.h <&6 +fi done fi -test -n "$silent" || echo "checking for mode_t in sys/types.h" -echo '#include "confdefs.h" -#include ' > conftest.${ac_ext} -eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" -if egrep "mode_t" conftest.out >/dev/null 2>&1; then - : +echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +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 < +#if STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "mode_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes else rm -rf conftest* - -{ -test -n "$verbose" && \ -echo " defining" mode_t to be "int" -echo "#define" mode_t "int" >> confdefs.h -DEFS="$DEFS -Dmode_t=int" -ac_sed_defs="${ac_sed_defs}\${ac_dA}mode_t\${ac_dB}mode_t\${ac_dC}int\${ac_dD} -\${ac_uA}mode_t\${ac_uB}mode_t\${ac_uC}int\${ac_uD} -\${ac_eA}mode_t\${ac_eB}mode_t\${ac_eC}int\${ac_eD} -" -} - + ac_cv_type_mode_t=no fi rm -f conftest* -test -n "$silent" || echo "checking for uid_t in sys/types.h" -echo '#include "confdefs.h" -#include ' > conftest.${ac_ext} -eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" -if egrep "uid_t" conftest.out >/dev/null 2>&1; then - : +fi +echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.h <<\EOF +#define mode_t int +EOF + +fi + +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +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 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then rm -rf conftest* - -{ -test -n "$verbose" && \ -echo " defining" uid_t to be "int" -echo "#define" uid_t "int" >> confdefs.h -DEFS="$DEFS -Duid_t=int" -ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD} -\${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD} -\${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD} -" -} - -{ -test -n "$verbose" && \ -echo " defining" gid_t to be "int" -echo "#define" gid_t "int" >> confdefs.h -DEFS="$DEFS -Dgid_t=int" -ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD} -\${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD} -\${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD} -" -} + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* fi +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi rm -f conftest* -test -n "$silent" || echo "checking for size_t in sys/types.h" -echo '#include "confdefs.h" -#include ' > conftest.${ac_ext} -eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" -if egrep "size_t" conftest.out >/dev/null 2>&1; then +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +echo "checking for ssize_t in sys/types.h" 1>&6 +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "ssize_t" >/dev/null 2>&1; then : else rm -rf conftest* - -{ -test -n "$verbose" && \ -echo " defining" size_t to be "unsigned" -echo "#define" size_t "unsigned" >> confdefs.h -DEFS="$DEFS -Dsize_t=unsigned" -ac_sed_defs="${ac_sed_defs}\${ac_dA}size_t\${ac_dB}size_t\${ac_dC}unsigned\${ac_dD} -\${ac_uA}size_t\${ac_uB}size_t\${ac_uC}unsigned\${ac_uD} -\${ac_eA}size_t\${ac_eB}size_t\${ac_eC}unsigned\${ac_eD} -" -} + cat >> confdefs.h <<\EOF +#define ssize_t int +EOF fi rm -f conftest* case "$DEFS" in *"RETSIGTYPE"*) ;; - *) test -n "$silent" || echo "checking for return type of signal handlers" -cat > conftest.${ac_ext} <&6 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < #include #ifdef signal #undef signal #endif -extern void (*signal ()) (); +#ifdef __cplusplus +extern "C" +#endif +void (*signal ()) (); int main() { return 0; } -int t() { int i;; return 0; } +int t() { +int i; +; return 0; } EOF if eval $ac_compile; then rm -rf conftest* - -{ -test -n "$verbose" && \ -echo " defining" RETSIGTYPE to be "void" -echo "#define" RETSIGTYPE "void" >> confdefs.h -DEFS="$DEFS -DRETSIGTYPE=void" -ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD} -\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD} -\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD} -" -} - - + ac_cv_type_signal=void else rm -rf conftest* - -{ -test -n "$verbose" && \ -echo " defining" RETSIGTYPE to be "int" -echo "#define" RETSIGTYPE "int" >> confdefs.h -DEFS="$DEFS -DRETSIGTYPE=int" -ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD} -\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD} -\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD} -" -} - + ac_cv_type_signal=int fi rm -f conftest* +fi +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h < conftest.${ac_ext} <&6 +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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + int main() { return 0; } -int t() { +int t() { + /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_${ac_func}) || defined (__stub___${ac_func}) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -/* Override any gcc2 internal prototype to avoid an error. */ -extern char ${ac_func}(); ${ac_func}(); +$ac_func(); #endif + ; return 0; } EOF -if eval $ac_compile; then +if eval $ac_link; then rm -rf conftest* - { -test -n "$verbose" && \ -echo " defining ${ac_tr_func}" -echo "#define" ${ac_tr_func} "1" >> confdefs.h -DEFS="$DEFS -D${ac_tr_func}=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD} -\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD} -\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD} -" -} - - + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'` + cat >> confdefs.h <&6 +fi done -test -n "$silent" || echo "checking for strdup" -cat > conftest.${ac_ext} <&6 +if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strdup(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +char strdup(); + int main() { return 0; } -int t() { +int t() { + /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_strdup) || defined (__stub___strdup) choke me #else -/* Override any gcc2 internal prototype to avoid an error. */ -extern char strdup(); strdup(); +strdup(); #endif + ; return 0; } EOF -if eval $ac_compile; then +if eval $ac_link; then rm -rf conftest* - { -test -n "$verbose" && \ -echo " defining HAVE_STRDUP" -echo "#define" HAVE_STRDUP "1" >> confdefs.h -DEFS="$DEFS -DHAVE_STRDUP=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STRDUP\${ac_dB}HAVE_STRDUP\${ac_dC}1\${ac_dD} -\${ac_uA}HAVE_STRDUP\${ac_uB}HAVE_STRDUP\${ac_uC}1\${ac_uD} -\${ac_eA}HAVE_STRDUP\${ac_eB}HAVE_STRDUP\${ac_eC}1\${ac_eD} -" -} - - + eval "ac_cv_func_strdup=yes" else rm -rf conftest* - LIBOBJS="$LIBOBJS strdup.o" + eval "ac_cv_func_strdup=no" fi rm -f conftest* -test -n "$silent" || echo "checking for getcwd" -cat > conftest.${ac_ext} <&6 + cat >> confdefs.h <<\EOF +#define HAVE_STRDUP 1 +EOF + +else + echo "$ac_t""no" 1>&6 +LIBOBJS="$LIBOBJS strdup.o" +fi + +echo $ac_n "checking for getcwd""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_getcwd'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getcwd(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +char getcwd(); + int main() { return 0; } -int t() { +int t() { + /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getcwd) || defined (__stub___getcwd) choke me #else -/* Override any gcc2 internal prototype to avoid an error. */ -extern char getcwd(); getcwd(); +getcwd(); #endif + ; return 0; } EOF -if eval $ac_compile; then +if eval $ac_link; then rm -rf conftest* - { -test -n "$verbose" && \ -echo " defining HAVE_GETCWD" -echo "#define" HAVE_GETCWD "1" >> confdefs.h -DEFS="$DEFS -DHAVE_GETCWD=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_GETCWD\${ac_dB}HAVE_GETCWD\${ac_dC}1\${ac_dD} -\${ac_uA}HAVE_GETCWD\${ac_uB}HAVE_GETCWD\${ac_uC}1\${ac_uD} -\${ac_eA}HAVE_GETCWD\${ac_eB}HAVE_GETCWD\${ac_eC}1\${ac_eD} -" -} - - + eval "ac_cv_func_getcwd=yes" else rm -rf conftest* - LIBOBJS="$LIBOBJS getcwd.o" + eval "ac_cv_func_getcwd=no" fi rm -f conftest* -test -n "$silent" || echo "checking for setenv" -cat > conftest.${ac_ext} <&6 + cat >> confdefs.h <<\EOF +#define HAVE_GETCWD 1 +EOF + +else + echo "$ac_t""no" 1>&6 +LIBOBJS="$LIBOBJS getcwd.o" +fi + +echo $ac_n "checking for setenv""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_setenv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char setenv(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +char setenv(); + int main() { return 0; } -int t() { +int t() { + /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_setenv) || defined (__stub___setenv) choke me #else -/* Override any gcc2 internal prototype to avoid an error. */ -extern char setenv(); setenv(); +setenv(); #endif + ; return 0; } EOF -if eval $ac_compile; then +if eval $ac_link; then rm -rf conftest* - { -test -n "$verbose" && \ -echo " defining HAVE_SETENV" -echo "#define" HAVE_SETENV "1" >> confdefs.h -DEFS="$DEFS -DHAVE_SETENV=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SETENV\${ac_dB}HAVE_SETENV\${ac_dC}1\${ac_dD} -\${ac_uA}HAVE_SETENV\${ac_uB}HAVE_SETENV\${ac_uC}1\${ac_uD} -\${ac_eA}HAVE_SETENV\${ac_eB}HAVE_SETENV\${ac_eC}1\${ac_eD} -" -} + eval "ac_cv_func_setenv=yes" +else + rm -rf conftest* + eval "ac_cv_func_setenv=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_func_'setenv`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_SETENV 1 +EOF else - rm -rf conftest* - test -n "$silent" || echo "checking for putenv" -cat > conftest.${ac_ext} <&6 +echo $ac_n "checking for putenv""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_putenv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char putenv(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +char putenv(); + int main() { return 0; } -int t() { +int t() { + /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_putenv) || defined (__stub___putenv) choke me #else -/* Override any gcc2 internal prototype to avoid an error. */ -extern char putenv(); putenv(); +putenv(); #endif + ; return 0; } EOF -if eval $ac_compile; then +if eval $ac_link; then rm -rf conftest* - { -test -n "$verbose" && \ -echo " defining HAVE_PUTENV" -echo "#define" HAVE_PUTENV "1" >> confdefs.h -DEFS="$DEFS -DHAVE_PUTENV=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_PUTENV\${ac_dB}HAVE_PUTENV\${ac_dC}1\${ac_dD} -\${ac_uA}HAVE_PUTENV\${ac_uB}HAVE_PUTENV\${ac_uC}1\${ac_uD} -\${ac_eA}HAVE_PUTENV\${ac_eB}HAVE_PUTENV\${ac_eC}1\${ac_eD} -" -} - - + eval "ac_cv_func_putenv=yes" else rm -rf conftest* - LIBOBJS="$LIBOBJS putenv.o" + eval "ac_cv_func_putenv=no" fi rm -f conftest* fi -rm -f conftest* +if eval "test \"`echo '$ac_cv_func_'putenv`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_PUTENV 1 +EOF + +else + echo "$ac_t""no" 1>&6 +LIBOBJS="$LIBOBJS putenv.o" +fi -ac_save_LIBS="${LIBS}" -LIBS="${LIBS} -lnsl" -ac_have_lib="" -test -n "$silent" || echo "checking for -lnsl" -cat > conftest.${ac_ext} <&6 +if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <> confdefs.h -DEFS="$DEFS -DHAVE_LIBNSL=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBNSL\${ac_dB}HAVE_LIBNSL\${ac_dC}1\${ac_dD} -\${ac_uA}HAVE_LIBNSL\${ac_uB}HAVE_LIBNSL\${ac_uC}1\${ac_uD} -\${ac_eA}HAVE_LIBNSL\${ac_eB}HAVE_LIBNSL\${ac_eC}1\${ac_eD} -" -} +LIBS="$ac_save_LIBS" + +fi +echo "$ac_t""$ac_cv_lib_nsl" 1>&6 +if test "$ac_cv_lib_nsl" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBNSL 1 +EOF + + LIBS="-lnsl $LIBS" - LIBS="${LIBS} -lnsl" fi -ac_save_LIBS="${LIBS}" -LIBS="${LIBS} -lsocket" -ac_have_lib="" -test -n "$silent" || echo "checking for -lsocket" -cat > conftest.${ac_ext} <&6 +if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <> confdefs.h -DEFS="$DEFS -DHAVE_LIBSOCKET=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBSOCKET\${ac_dB}HAVE_LIBSOCKET\${ac_dC}1\${ac_dD} -\${ac_uA}HAVE_LIBSOCKET\${ac_uB}HAVE_LIBSOCKET\${ac_uC}1\${ac_uD} -\${ac_eA}HAVE_LIBSOCKET\${ac_eB}HAVE_LIBSOCKET\${ac_eC}1\${ac_eD} -" -} +LIBS="$ac_save_LIBS" - LIBS="${LIBS} -lsocket" fi +echo "$ac_t""$ac_cv_lib_socket" 1>&6 +if test "$ac_cv_lib_socket" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBSOCKET 1 +EOF + + LIBS="-lsocket $LIBS" -ac_save_LIBS="${LIBS}" -LIBS="${LIBS} -lufc" -ac_have_lib="" -test -n "$silent" || echo "checking for -lufc" -cat > conftest.${ac_ext} <&6 +if eval "test \"`echo '$''{'ac_cv_lib_ufc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lufc $LIBS" +cat > conftest.$ac_ext <> confdefs.h -DEFS="$DEFS -DHAVE_LIBUFC=1" -ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBUFC\${ac_dB}HAVE_LIBUFC\${ac_dC}1\${ac_dD} -\${ac_uA}HAVE_LIBUFC\${ac_uB}HAVE_LIBUFC\${ac_uC}1\${ac_uD} -\${ac_eA}HAVE_LIBUFC\${ac_eB}HAVE_LIBUFC\${ac_eC}1\${ac_eD} -" -} +LIBS="$ac_save_LIBS" + +fi +echo "$ac_t""$ac_cv_lib_ufc" 1>&6 +if test "$ac_cv_lib_ufc" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBUFC 1 +EOF + + LIBS="-lufc $LIBS" - LIBS="${LIBS} -lufc" fi -if test -n "$OS" -a "$OS" = "irix" ; then - ac_save_LIBS="${LIBS}" -LIBS="${LIBS} -lsun" -ac_have_lib="" -test -n "$silent" || echo "checking for -lsun" -cat > conftest.${ac_ext} <&6 +if eval "test \"`echo '$''{'ac_cv_lib_sun'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsun $LIBS" +cat > conftest.$ac_ext <&6 + LIBS="-lsun $LIBS" else - :; + echo "$ac_t""no" 1>&6 fi fi -# Set default prefixes. -if test -n "$prefix"; then - test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it. - ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%" -fi -if test -n "$exec_prefix"; then - ac_prsub="$ac_prsub -s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%" +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ + >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. @@ -1726,36 +2023,36 @@ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi -# Quote sed substitution magic chars in DEFS. -cat >conftest.def < config.status < $CONFIG_STATUS </dev/null | sed 1q`: # -# $0 $configure_args +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. -ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]" +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create - exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;; + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "config.status generated by autoconf version 1.10" + echo "$CONFIG_STATUS generated by autoconf version 2.4" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -1763,75 +2060,24 @@ esac done -trap 'rm -fr Makefile visudoers/Makefile config.h pathnames.h conftest*; exit 1' 1 2 15 -PROGS='$PROGS' -STATIC_FLAGS='$STATIC_FLAGS' -INC_FLAGS='$INC_FLAGS' -OSDEFS='$OSDEFS' -OPTIONS='$OPTIONS' -LIBOBJS='$LIBOBJS' -TGETPASS='$TGETPASS' -MAN_PREFIX='$MAN_PREFIX' -MAN_POSTINSTALL='$MAN_POSTINSTALL' -MANTYPE='$MANTYPE' -CC='$CC' -CPP='$CPP' -UNAMEPROG='$UNAMEPROG' -TRPROG='$TRPROG' -SEDPROG='$SEDPROG' -NROFFPROG='$NROFFPROG' -YACC='$YACC' -LEX='$LEX' -LEXLIB='$LEXLIB' -INSTALL='$INSTALL' -INSTALL_PROGRAM='$INSTALL_PROGRAM' -INSTALL_DATA='$INSTALL_DATA' -LIBS='$LIBS' -srcdir='$srcdir' -top_srcdir='$top_srcdir' -prefix='$prefix' -exec_prefix='$exec_prefix' -ac_prsub='$ac_prsub' -ac_vpsub='$ac_vpsub' -extrasub='$extrasub' -EOF -cat >> config.status <<\EOF - ac_given_srcdir=$srcdir -CONFIG_FILES=${CONFIG_FILES-"Makefile visudoers/Makefile"} -for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file"; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/$ac_dir" - else - ac_dir_suffix= - fi - - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - case "$ac_given_srcdir" in - .) srcdir=.; top_srcdir="$ac_dots." ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac +trap 'rm -fr `echo "Makefile visudoers/Makefile config.h pathnames.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 - echo creating "$ac_file" - rm -f "$ac_file" - comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure." - case "$ac_file" in - *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;; - * ) echo "# $comment_str" > "$ac_file" ;; - esac - sed -e " -$ac_prsub +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF $ac_vpsub $extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g s%@PROGS@%$PROGS%g s%@STATIC_FLAGS@%$STATIC_FLAGS%g s%@INC_FLAGS@%$INC_FLAGS%g @@ -1854,105 +2100,150 @@ s%@INSTALL@%$INSTALL%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@LIBS@%$LIBS%g + +CEOF +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust relative srcdir, etc. for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g -s%@prefix@%$prefix%g -s%@exec_prefix@%$exec_prefix%g -s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file +" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file fi; done +rm -f conftest.subs -# These sed commands are put into ac_sed_defs when defining a macro. -# They are broken into pieces to make the sed script easier to manage. -# They are passed to sed as "A NAME B NAME C VALUE D", where NAME -# is the cpp macro being defined and VALUE is the value it is being given. -# Each defining turns into a single global substitution command. -# Hopefully no one uses "!" as a variable value. -# Other candidates for the sed separators, like , and @, do get used. +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*!\1#\2' +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' -ac_dD='!g' +ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)!\1#\2define\3' +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' -ac_uD='\4!g' +ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$!\1#\2define\3' +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' ac_eC=' ' -ac_eD='!g' -rm -f conftest.sed +ac_eD='%g' + +CONFIG_HEADERS=${CONFIG_HEADERS-"config.h pathnames.h"} +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + cp $ac_given_srcdir/$ac_file_in conftest.in + EOF -# Turn off quoting long enough to insert the sed commands. -rm -f conftest.sh -cat > conftest.sh < conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr -# Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit -# on the size of here documents. +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. # Maximum number of lines to put in a single here document. -ac_max_sh_lines=9 +ac_max_here_lines=12 +rm -f conftest.tail while : do - # wc gives bogus results for an empty file on some AIX systems. - ac_lines=`grep -c . conftest.sh` + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - rm -f conftest.s1 conftest.s2 - sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9. - sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10. - # Write a limited-size here document to append to conftest.sed. - echo 'cat >> conftest.sed <> config.status - cat conftest.s1 >> config.status - echo 'CONFEOF' >> config.status - rm -f conftest.s1 conftest.sh - mv conftest.s2 conftest.sh + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals done -rm -f conftest.sh - -# Now back to your regularly scheduled config.status. -cat >> config.status <<\EOF -# This sed command replaces #undef's with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it in -# config.h pathnames.h. -cat >> conftest.sed <<\CONFEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -CONFEOF -rm -f conftest.h -# Break up the sed commands because old seds have small limits. -ac_max_sed_lines=20 +rm -f conftest.vals -CONFIG_HEADERS=${CONFIG_HEADERS-"config.h pathnames.h"} -for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then - echo creating $ac_file - - cp $ac_given_srcdir/$ac_file.in conftest.h1 - cp conftest.sed conftest.stm - while : - do - ac_lines=`grep -c . conftest.stm` - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - rm -f conftest.s1 conftest.s2 conftest.h2 - sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20. - sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21. - sed -f conftest.s1 < conftest.h1 > conftest.h2 - rm -f conftest.s1 conftest.h1 conftest.stm - mv conftest.h2 conftest.h1 - mv conftest.s2 conftest.stm - done - rm -f conftest.stm conftest.h +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.h1 >> conftest.h - rm -f conftest.h1 + cat conftest.in >> conftest.h + rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then - # The file exists and we would not be changing it. echo "$ac_file is unchanged" rm -f conftest.h else @@ -1960,12 +2251,12 @@ mv conftest.h $ac_file fi fi; done -rm -f conftest.sed exit 0 EOF -chmod +x config.status -test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 diff -uN sudo.v1.3.1/configure.in sudo.v1.3.1pl4/configure.in --- sudo.v1.3.1/configure.in Sun Aug 14 19:01:33 1994 +++ sudo.v1.3.1pl4/configure.in Sat Jul 1 18:23:00 1995 @@ -68,7 +68,9 @@ OS=`echo $OS | $TRPROG '[[A-Z]]' '[[a-z]]'` case "$OS" in "sunos") echo "Looks like SunOS 4.x" - if test -z "$GCC"; then + if test -n "$GCC"; then + STATIC_FLAGS="-static" + else STATIC_FLAGS="-Bstatic" fi ;; @@ -77,18 +79,32 @@ ;; "aix") echo "Looks like AIX" AC_DEFINE(_ALL_SOURCE) + STATIC_FLAGS="-Wl,-bI:./aixcrypt.exp" ;; "hp-ux") echo "Looks like HP-UX" - if test -z "$GCC"; then - STATIC_FLAGS="-Wl,-a,archive" + if test "$OSREV" -lt 9 ; then + if test -n "$GCC"; then + STATIC_FLAGS="-static" + else + STATIC_FLAGS="-Wl,-a,archive" + fi + fi + if test -n "$AFS" ; then + LIBS="-lBSD ${LIBS}" fi ;; "osf1") echo "Looks like OSF/1" - if test -z "$GCC"; then - STATIC_FLAGS="-non_shared" + STATIC_FLAGS="-Wl,-no_library_replacement" + # C2 security stuff + if test -n "$C2"; then + LIBS="${LIBS} -lsecurity -laud" fi ;; "irix") echo "Looks like IRIX" + # C2 security stuff + if test -n "$C2" ; then + AC_DEFINE(SVR4) + fi # configure doesn't think irix has stdc headers # but it's good enough for sudo AC_DEFINE(STDC_HEADERS) @@ -108,6 +124,9 @@ fi ;; "linux") echo "Looks like linux" + if test -n "$GCC"; then + STATIC_FLAGS="-static" + fi ;; "convex") echo "Looks like ConvexOs" AC_DEFINE(_CONVEX_SOURCE) @@ -141,12 +160,6 @@ ;; esac dnl -dnl We can't make a static binary on solaris and it causes probs on AIX -dnl -if test -n "$GCC" -a -n "$OS" -a "$OS" != "solaris" -a "$OS" != "aix" ; then - STATIC_FLAGS="-static" -fi -dnl dnl extra AFS libs dnl if test -n "$AFS" ; then @@ -183,6 +196,7 @@ AC_MODE_T AC_UID_T AC_SIZE_T +SUDO_SSIZE_T dnl dnl only set RETSIGTYPE if it is not set already dnl @@ -193,20 +207,24 @@ dnl dnl Function checks dnl -AC_HAVE_FUNCS(getwd strchr strrchr memcpy sysconf sigaction bzero tzset) +AC_HAVE_FUNCS(getwd strchr strrchr memcpy sysconf sigaction bzero tzset tcsetattr) AC_FUNC_CHECK(strdup, AC_DEFINE(HAVE_STRDUP), LIBOBJS="$LIBOBJS strdup.o") AC_FUNC_CHECK(getcwd, AC_DEFINE(HAVE_GETCWD), LIBOBJS="$LIBOBJS getcwd.o") AC_FUNC_CHECK(setenv, AC_DEFINE(HAVE_SETENV), AC_FUNC_CHECK(putenv, AC_DEFINE(HAVE_PUTENV), LIBOBJS="$LIBOBJS putenv.o")) dnl dnl library checks dnl -AC_HAVE_LIBRARY(nsl) -AC_HAVE_LIBRARY(socket) +dnl Irix 5.2 (at least) has bugs in -lnsl and -lsocket +if test "$OS" != "irix" -o $OSREV -ne 5 ; then + AC_HAVE_LIBRARY(nsl) + AC_HAVE_LIBRARY(socket) +fi +dnl For those w/o crypt(3) AC_HAVE_LIBRARY(ufc) dnl dnl OS-dependent libraries dnl -if test -n "$OS" -a "$OS" = "irix" ; then +if test "$OS" = "irix" -a $OSREV -le 4 ; then AC_IRIX_SUN fi dnl diff -uN sudo.v1.3.1/find_path.c sudo.v1.3.1pl4/find_path.c --- sudo.v1.3.1/find_path.c Thu Aug 11 19:58:19 1994 +++ sudo.v1.3.1pl4/find_path.c Mon Sep 19 18:53:49 1994 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * ******************************************************************* * @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: find_path.c,v 1.37 1994/08/12 01:58:03 millert Exp $"; +static char rcsid[] = "$Id: find_path.c,v 1.39 1994/09/20 00:53:34 millert Exp $"; #endif /* lint */ #include "config.h" @@ -63,7 +63,7 @@ extern char *getenv __P((const char *)); extern char *strcpy __P((char *, const char *)); extern int fprintf __P((FILE *, const char *, ...)); -extern int readlink __P((const char *, char *, size_t)); +extern ssize_t readlink __P((const char *, char *, size_t)); extern int stat __P((const char *, struct stat *)); extern int lstat __P((const char *, struct stat *)); #ifdef HAVE_STRDUP diff -uN sudo.v1.3.1/getcwd.c sudo.v1.3.1pl4/getcwd.c --- sudo.v1.3.1/getcwd.c Wed Aug 17 10:36:32 1994 +++ sudo.v1.3.1pl4/getcwd.c Fri Sep 2 13:54:49 1994 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * ******************************************************************* * @@ -27,7 +27,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: getcwd.c,v 1.7 1994/08/12 01:58:03 millert Exp $"; +static char rcsid[] = "$Id: getcwd.c,v 1.8 1994/09/02 19:54:28 millert Exp $"; #endif /* lint */ #include "config.h" diff -uN sudo.v1.3.1/insults.h sudo.v1.3.1pl4/insults.h --- sudo.v1.3.1/insults.h Tue May 24 19:21:17 1994 +++ sudo.v1.3.1pl4/insults.h Fri Sep 2 13:53:46 1994 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu */ #ifdef USE_INSULTS diff -uN sudo.v1.3.1/logging.c sudo.v1.3.1pl4/logging.c --- sudo.v1.3.1/logging.c Thu Aug 11 19:59:16 1994 +++ sudo.v1.3.1pl4/logging.c Fri Sep 2 13:54:50 1994 @@ -3,7 +3,7 @@ * * This software comes with no waranty whatsoever, use at your own risk. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * */ @@ -37,7 +37,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: logging.c,v 1.28 1994/08/12 01:58:58 millert Exp $"; +static char rcsid[] = "$Id: logging.c,v 1.31 1994/09/02 19:54:28 millert Exp $"; #endif /* lint */ #include "config.h" @@ -91,9 +91,9 @@ mode_t oldmask; register char *p; register int count; + time_t now; #ifdef _PATH_SUDO_LOGFILE register FILE *fp; - time_t now; #endif /* _PATH_SUDO_LOGFILE */ #ifdef SYSLOG register int pri; /* syslog priority */ @@ -101,12 +101,11 @@ #endif /* SYSLOG */ /* - * there is no need to log the date and time twice if using syslog + * we will skip this stuff when using syslog(3) but it is + * necesary for mail and file logs. */ -#ifdef _PATH_SUDO_LOGFILE now = time((time_t) 0); (void) sprintf(logline, "%19.19s : %8.8s : ", ctime(&now), user); -#endif /* _PATH_SUDO_LOGFILE */ /* * we need a pointer to the end of logline @@ -242,7 +241,7 @@ /* * Log the full line, breaking into multiple syslog(3) calls if necesary */ - p = (char *)logline; + p = &logline[33]; /* skip past the date and user */ for (count=0; count < (strlen(logline) / MAXSYSLOGLEN) + 1; count++) { if (strlen(p) > MAXSYSLOGLEN) { /* @@ -432,8 +431,8 @@ (void) close(0); /* feed the data to sendmail */ - (void) sprintf(buf, "To: %s\nSubject: %s\n\n%s\n\n", - ALERTMAIL, subject, logline); + (void) sprintf(buf, "To: %s\nSubject: %s\n\n%s : %s\n\n", + ALERTMAIL, subject, host, logline); write(1, buf, strlen(buf)); close(1); diff -uN sudo.v1.3.1/parse.c sudo.v1.3.1pl4/parse.c --- sudo.v1.3.1/parse.c Sat Aug 13 15:09:03 1994 +++ sudo.v1.3.1pl4/parse.c Tue Sep 20 15:53:05 1994 @@ -3,7 +3,7 @@ * * This software comes with no waranty whatsoever, use at your own risk. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * */ @@ -35,7 +35,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: parse.c,v 1.15 1994/08/13 21:08:53 millert Exp $"; +static char rcsid[] = "$Id: parse.c,v 1.17 1994/09/20 21:52:47 millert Exp $"; #endif /* lint */ #include "config.h" @@ -82,6 +82,7 @@ */ static int hostcmp __P((char *)); static int cmndcmp __P((char *, char *)); +static void print_cmnds __P((void)); /* @@ -384,6 +385,69 @@ /* + * this routine is called from cmnd_list() to print the actual commands + * that a user is allowed or forbidden to run on the already. + * established host. + */ + +static void print_cmnds() +{ + /* + * If we have a command or special keyword "ALL", print it out + */ + if (list_ptr[USER_LIST] -> data[0] == '/' || + !strcmp(list_ptr[USER_LIST]->data, "ALL")) { + /* + * print the allowed/forbidden command + */ + if (list_ptr[USER_LIST] -> op == '!') + (void) printf("forbidden: "); + else + (void) printf(" allowed: "); + (void) printf("%s\n", list_ptr[USER_LIST] -> data); + } + /* + * by now we have a Cmnd_Alias that will have to be expanded + */ + else { + save_ptr = list_ptr[CMND_LIST]; + while (list_ptr[CMND_LIST] != NULL) { + if ((list_ptr[CMND_LIST] -> type == TYPE2) && + (strcmp(list_ptr[CMND_LIST] -> data, + list_ptr[USER_LIST] -> data) == 0)) { + next_type = list_ptr[CMND_LIST] -> next -> type; + tmp_ptr = list_ptr[CMND_LIST]; + list_ptr[CMND_LIST] = tmp_ptr -> next; + while (next_type == TYPE3) { + /* + * print the allowed/forbidden command + */ + if (list_ptr[USER_LIST] -> op == '!') + (void) printf("forbidden: "); + else + (void) printf(" allowed: "); + (void) printf("%s\n", list_ptr[CMND_LIST] -> data); + + if (list_ptr[CMND_LIST] -> next != NULL) { + next_type = list_ptr[CMND_LIST] -> next -> type; + tmp_ptr = list_ptr[CMND_LIST]; + list_ptr[CMND_LIST] = tmp_ptr -> next; + } else { + next_type = ~TYPE3; + } + } + } else { + tmp_ptr = list_ptr[CMND_LIST]; + list_ptr[CMND_LIST] = tmp_ptr -> next; + } + } + list_ptr[CMND_LIST] = save_ptr; + } +} + + + +/* * this routine is called from validate() after the call_back() routine * has built all the possible lists. this routine steps thru the user list * calling on host_type_ok() and cmnd_type_ok() trying to resolve whether @@ -425,6 +489,39 @@ /* + * list commands for a user if got -l + */ + +int cmnd_list() +{ + + while (list_ptr[USER_LIST] != NULL) { + if ((list_ptr[USER_LIST] -> type == TYPE2) && host_type_ok()) { + next_type = list_ptr[USER_LIST] -> next -> type; + tmp_ptr = list_ptr[USER_LIST]; + list_ptr[USER_LIST] = tmp_ptr -> next; + while (next_type == TYPE3) { + /* print out the available commands */ + print_cmnds(); + if (list_ptr[USER_LIST] -> next != NULL) { + next_type = list_ptr[USER_LIST] -> next -> type; + tmp_ptr = list_ptr[USER_LIST]; + list_ptr[USER_LIST] = tmp_ptr -> next; + } else { + next_type = ~TYPE3; + } + } + } else { + tmp_ptr = list_ptr[USER_LIST]; + list_ptr[USER_LIST] = tmp_ptr -> next; + } + } + return (VALIDATE_NOT_OK); +} + + + +/* * this routine is called from the sudo.c module and tries to validate * the user, host and command triplet. */ @@ -480,7 +577,11 @@ */ switch (return_code) { case FOUND_USER: - return_code = cmnd_check(); + /* do we want to list available commands or check a given command? */ + if (strcmp(cmnd, "list") == 0) + return_code = cmnd_list(); + else + return_code = cmnd_check(); delete_list(USER_LIST); delete_list(HOST_LIST); delete_list(CMND_LIST); diff -uN sudo.v1.3.1/parse.lex sudo.v1.3.1pl4/parse.lex --- sudo.v1.3.1/parse.lex Tue Aug 30 16:29:52 1994 +++ sudo.v1.3.1pl4/parse.lex Thu Sep 22 11:30:27 1994 @@ -4,7 +4,7 @@ * * This software comes with no waranty whatsoever, use at your own risk. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * */ @@ -36,13 +36,19 @@ *******************************************************************************/ #ifndef lint -static char rcsid[] = "$Id: parse.lex,v 1.11 1994/08/30 22:29:48 millert Exp $"; +static char rcsid[] = "$Id: parse.lex,v 1.15 1994/09/22 17:30:19 millert Exp $"; #endif /* lint */ #include "config.h" -#ifdef HAVE_UNISTD_H +#if defined(HAVE_UNISTD_H) && defined(linux) #include -#endif /* HAVE_UNISTD_H */ +#endif /* HAVE_UNISTD_H && linux */ +#ifdef HAVE_STRING_H +#include +#endif /* HAVE_STRING_H */ +#ifdef HAVE_STRINGS_H +#include +#endif /* HAVE_STRINGS_H */ #include #include #include @@ -50,26 +56,17 @@ #include "y.tab.h" extern YYSTYPE yylval; -#ifdef FLEX_SCANNER -int yylineno = 0; -#endif /* flex */ +int sudolineno = 0; %} %% [ \t]+ { ; } /* throw away space/tabs */ -\\\n { -#ifdef FLEX_SCANNER - ++yylineno -#endif /* flex */ - ; } /* throw away EOL after \ */ +\\\n { ++sudolineno ; } /* throw away EOL after \ */ \, { return ','; } /* return ',' */ \! { return '!'; } /* return '!' */ = { return '='; } /* return '=' */ : { return ':'; } /* return ':' */ -\n { -#ifdef FLEX_SCANNER - ++yylineno; -#endif /* flex */ +\n { ++sudolineno; return COMMENT; } /* return newline */ #.*\n { return COMMENT; } /* return comments */ [@$%^&*()"'`/_+]* { return ERROR; } /* return error */ @@ -79,5 +76,5 @@ (\/[a-zA-Z0-9_.+-]+)+\/? { fill(); return IDENT3;} /* absolute command path */ %% fill() { -strcpy(yylval.char_val, yytext); +(void) strcpy(yylval.char_val, yytext); } diff -uN sudo.v1.3.1/parse.yacc sudo.v1.3.1pl4/parse.yacc --- sudo.v1.3.1/parse.yacc Tue Aug 30 16:30:04 1994 +++ sudo.v1.3.1pl4/parse.yacc Tue Sep 20 17:38:11 1994 @@ -4,7 +4,7 @@ * * This software comes with no waranty whatsoever, use at your own risk. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * */ @@ -36,7 +36,7 @@ *******************************************************************************/ #ifndef lint -static char rcsid[] = "$Id: parse.yacc,v 1.8 1994/08/30 22:30:00 millert Exp $"; +static char rcsid[] = "$Id: parse.yacc,v 1.10 1994/09/20 23:37:53 millert Exp $"; #endif /* lint */ #include "config.h" @@ -49,13 +49,13 @@ #include #include "sudo.h" -extern int yylineno; +extern int sudolineno; extern int parse_error, found_user; yyerror(s) char *s; { -fprintf(stderr, ">>> sudoers file: %s, line %d <<<\n", s, yylineno); +fprintf(stderr, ">>> sudoers file: %s, line %d <<<\n", s, sudolineno); parse_error = TRUE; } @@ -78,6 +78,7 @@ ; entry : COMMENT + { ; } | error COMMENT { yyerrok; } | IDENT1 access_series COMMENT diff -uN sudo.v1.3.1/pathnames.h.in sudo.v1.3.1pl4/pathnames.h.in --- sudo.v1.3.1/pathnames.h.in Sun Jun 5 15:17:16 1994 +++ sudo.v1.3.1pl4/pathnames.h.in Fri Sep 2 13:55:43 1994 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu */ /* diff -uN sudo.v1.3.1/putenv.c sudo.v1.3.1pl4/putenv.c --- sudo.v1.3.1/putenv.c Wed Aug 17 10:36:34 1994 +++ sudo.v1.3.1pl4/putenv.c Fri Sep 2 13:54:53 1994 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * ******************************************************************* * @@ -25,7 +25,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: putenv.c,v 1.3 1994/08/08 17:05:22 millert Exp $"; +static char rcsid[] = "$Id: putenv.c,v 1.4 1994/09/02 19:54:28 millert Exp $"; #endif /* lint */ #include "config.h" diff -uN sudo.v1.3.1/strdup.c sudo.v1.3.1pl4/strdup.c --- sudo.v1.3.1/strdup.c Wed Aug 17 10:36:34 1994 +++ sudo.v1.3.1pl4/strdup.c Fri Sep 2 13:54:53 1994 @@ -3,7 +3,7 @@ * * This software comes with no waranty whatsoever, use at your own risk. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * */ @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: strdup.c,v 1.5 1994/08/08 17:05:22 millert Exp $"; +static char rcsid[] = "$Id: strdup.c,v 1.6 1994/09/02 19:54:28 millert Exp $"; #endif /* lint */ #include "config.h" diff -uN sudo.v1.3.1/sudo.c sudo.v1.3.1pl4/sudo.c --- sudo.v1.3.1/sudo.c Tue Aug 30 16:30:26 1994 +++ sudo.v1.3.1pl4/sudo.c Tue Oct 4 10:56:50 1994 @@ -3,7 +3,7 @@ * * This software comes with no waranty whatsoever, use at your own risk. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * */ @@ -51,7 +51,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sudo.c,v 1.61 1994/08/30 22:30:17 millert Exp $"; +static char rcsid[] = "$Id: sudo.c,v 1.66 1994/10/04 16:56:40 millert Exp $"; #endif /* lint */ #define MAIN @@ -91,6 +91,10 @@ #ifdef _AIX #include #endif /* _AIX */ +#if defined(__osf__) && defined(HAVE_C2_SECURITY) +#include +#include +#endif /* __osf__ && HAVE_C2_SECURITY */ #include "sudo.h" #include "version.h" @@ -129,7 +133,7 @@ struct interface *interfaces; int num_interfaces; char cwd[MAXPATHLEN + 1]; -uid_t uid = -2; +uid_t uid = (uid_t)-2; /******************************************************************** @@ -147,6 +151,10 @@ int sudo_mode = MODE_RUN; extern char ** environ; +#if defined(__osf__) && defined(HAVE_C2_SECURITY) + (void) set_auth_parameters(); +#endif /* __osf__ && HAVE_C2_SECURITY */ + Argv = argv; Argc = argc; @@ -167,6 +175,9 @@ case MODE_VALIDATE : cmnd = "validate"; break; + case MODE_LIST : + cmnd = "list"; + break; } /* @@ -190,6 +201,9 @@ } else if (sudo_mode == MODE_KILL) { remove_timestamp(); /* remove the timestamp ticket file */ exit(0); + } else if (sudo_mode == MODE_LIST) { + (void) validate(); /* list the user's available commands */ + exit(0); } add_env(); /* add in SUDO_* envariables */ @@ -351,6 +365,9 @@ case 'k': ret = MODE_KILL; break; + case 'l': + ret = MODE_LIST; + break; case 'V': ret = MODE_VERSION; break; @@ -381,7 +398,7 @@ static void usage(exit_val) int exit_val; { - (void) fprintf(stderr, "usage: %s -V | -h | -v | -k | \n", Argv[0]); + (void) fprintf(stderr, "usage: %s -V | -h | -l | -v | -k | \n", Argv[0]); exit(exit_val); } @@ -413,7 +430,7 @@ #endif /* __alpha */ #ifdef SECURE_PATH - setenv("PATH", SECURE_PATH); + sudo_setenv("PATH", SECURE_PATH); #endif /* SECURE_PATH */ } @@ -537,7 +554,7 @@ } /* add the SUDO_UID envariable */ - for (len = 1 + (uid < 0), n = (int)uid; (n = n / 10) != 0; ) + for (len = 1 + ((int)uid < 0), n = (int)uid; (n = n / 10) != 0; ) ++len; uidstr = (char *) malloc(len+1); @@ -569,7 +586,12 @@ { char path[MAXPATHLEN + 1]; - strncpy(path, Argv[1], MAXPATHLEN)[MAXPATHLEN] = 0; + if (strlen(Argv[1]) >= sizeof(path)) { + (void) fprintf(stderr, "%s: %s: Pathname too long\n", Argv[0], Argv[1]); + exit(1); + } + + (void) strcpy(path, Argv[1]); cmnd = find_path(path); /* get the absolute path */ if (cmnd == NULL) { diff -uN sudo.v1.3.1/sudo.cat sudo.v1.3.1pl4/sudo.cat --- sudo.v1.3.1/sudo.cat Tue Aug 30 16:33:25 1994 +++ sudo.v1.3.1pl4/sudo.cat Wed Sep 21 17:35:11 1994 @@ -1,292 +1,299 @@ - SSSSUUUUDDDDOOOO((((8888)))) SSSSUUUUDDDDOOOO((((8888)))) +SUDO(8) MAINTENANCE COMMANDS SUDO(8) -9 - NNNNAAAAMMMMEEEE - sudo, visudo - execute a command as the superuser and edit the sudoers - file +NAME + sudo, visudo - execute a command as the superuser and edit + the sudoers file - SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS - ssssuuuuddddoooo -V | -h | -v | -k | <_c_o_m_m_a_n_d> +SYNOPSIS + sudo -V | -h | -l | -v | -k | <_c_o_m_m_a_n_d> - vvvviiiissssuuuuddddoooo [-V] + visudo [-V] - DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN - _S_u_d_o allows a permitted user to execute a _c_o_m_m_a_n_d as the superuser. - _S_u_d_o determines who is an authorized user by consulting the file - /_e_t_c/_s_u_d_o_e_r_s. By giving _s_u_d_o the -_v flag a user can update the time - stamp without running a command. The password prompt itself will also - time out if the password is not entered with N minutes (again, this is - defined at installation time and defaults to 5 minutes). +DESCRIPTION + _S_u_d_o allows a permitted user to execute a _c_o_m_m_a_n_d as the + superuser. _S_u_d_o determines who is an authorized user by + consulting the file /_e_t_c/_s_u_d_o_e_r_s. By giving _s_u_d_o the -_v flag + a user can update the time stamp without running a command. + The password prompt itself will also time out if the pass- + word is not entered with N minutes (again, this is defined + at installation time and defaults to 5 minutes). - The _s_u_d_o_e_r_s file is composed of an optional host alias section, an - optional command alias section and the user specification section. All - command or host aliases need to start with their respective keywords - (Host_Alias/Cmnd_Alias). Note that only the first occurrance of a - user name will be significant in the user specification section. + The _s_u_d_o_e_r_s file is composed of an optional host alias sec- + tion, an optional command alias section and the user specif- + ication section. All command or host aliases need to start + with their respective keywords (Host_Alias/Cmnd_Alias). + Note that only the first occurrance of a user name will be + significant in the user specification section. - user specification format: - user access_group [: access_group] ... + user specification format: + user access_group [: access_group] ... - access_group ::= host_type = [op]cmnd_type [,[op]cmnd_type] ... - host_type ::= a lower-case host name OR a host alias. - cmnd_type ::= an command OR a command alias. - op ::= the logical '!' NOT operator. + access_group ::= host_type = [op]cmnd_type [,[op]cmnd_type] ... + host_type ::= a lower-case host name OR a host alias. + cmnd_type ::= an command OR a command alias. + op ::= the logical '!' NOT operator. - host alias section format: - Host_Alias HOSTALIAS = host-list + host alias section format: + Host_Alias HOSTALIAS = host-list - Host_Alias ::= a keyword. - HOSTALIAS ::= an upper-case alias name. - host-list ::= a comma separated list of hosts/addresses/networks. + Host_Alias ::= a keyword. + HOSTALIAS ::= an upper-case alias name. + host-list ::= a comma separated list of hosts/addresses/networks. - command alias section format: - Cmnd_Alias CMNDALIAS = cmnd-list + command alias section format: + Cmnd_Alias CMNDALIAS = cmnd-list - Cmnd_Alias ::= a keyword. - CMNDALIAS ::= an upper-case alias name. - cmnd-list ::= a comma separated list commands. + Cmnd_Alias ::= a keyword. + CMNDALIAS ::= an upper-case alias name. + cmnd-list ::= a comma separated list commands. - Text after a pound sign '#' is considered a comment. - Long lines can be newline escaped with the backslash '\' character. - The reserved alias 'ALL' can be used for both {Host,Cmnd}_Alias'. - DO NOT define an alias of 'ALL', it will NOT be used. + Text after a pound sign '#' is considered a comment. + Long lines can be newline escaped with the backslash '\' character. + The reserved alias 'ALL' can be used for both {Host,Cmnd}_Alias'. -9 - 1 - Formatted: August 30, 1994 +Sun Release 4.1 Last change: 1 - SSSSUUUUDDDDOOOO((((8888)))) SSSSUUUUDDDDOOOO((((8888)))) -9 +SUDO(8) MAINTENANCE COMMANDS SUDO(8) - Note that 'ALL' implies the entire universe of hosts/commands. - You can subtract elements from the universe by using the syntax: - user host=ALL,!ALIAS1,!/etc/halt... - Examples + DO NOT define an alias of 'ALL', it will NOT be used. + Note that 'ALL' implies the entire universe of hosts/commands. + You can subtract elements from the universe by using the syntax: + user host=ALL,!ALIAS1,!/etc/halt... - # Host alias specification - Host_Alias HUB=houdini.rootgroup.com:\ - REMOTE=merlin,kodiakthorn,spirit - Host_Alias MACHINES=kalkan,alpo,milkbones,128.138.199.1 - Host_Alias SERVERS=houdini,merlin,kodiakthorn,spirit - Host_Alias CSNETS=128.138.243.0,128.138.204.0,128.138.242.0 + Examples - # Command alias specification - Cmnd_Alias LPCS=/usr/etc/lpc,/usr/ucb/lprm - Cmnd_Alias SHELLS=/bin/sh,/bin/csh,/bin/tcsh - Cmnd_Alias MISC=/bin/rm,/bin/cat:\ - SHUTDOWN=/etc/halt,/etc/shutdown + # Host alias specification + Host_Alias HUB=houdini.rootgroup.com:\ + REMOTE=merlin,kodiakthorn,spirit + Host_Alias MACHINES=kalkan,alpo,milkbones,128.138.199.1 + Host_Alias SERVERS=houdini,merlin,kodiakthorn,spirit + Host_Alias + CSNETS=128.138.243.0,128.138.204.0,128.138.242.0 - # User specification - britt REMOTE=SHUTDOWN:ALL=LPCS - robh ALL=ALL,!SHELLS - nieusma SERVERS=SHUTDOWN,/etc/reboot:\ - HUB=ALL,!SHELLS - jill houdini.rootgroup.com=/etc/shutdown,MISC - markm HUB=ALL,!MISC,!/etc/shutdown,!/etc/halt - billp ALL=/usr/local/bin/top:MACHINES=SHELLS - davehieb merlin=ALL:SERVERS=/etc/halt:\ - kodiakthorn=ALL - steve CSNETS=/usr/su_commands/ + # Command alias specification + Cmnd_Alias LPCS=/usr/etc/lpc,/usr/ucb/lprm + Cmnd_Alias SHELLS=/bin/sh,/bin/csh,/bin/tcsh + Cmnd_Alias MISC=/bin/rm,/bin/cat:\ + SHUTDOWN=/etc/halt,/etc/shutdown - The above _s_u_d_o_e_r_s file specification is composed of 4 host alias - specifications, 3 command alias specifications and 8 user - specifications. Britt is permitted to execute /etc/halt, - /etc/shutdown, /usr/etc/lpc and /usr/ucb/lprm on the REMOTE machines - (merlin, kodiakthorn, and spirit). Robh is permitted to execute any - command except for the group of SHELL commands on any machine. Jill - is permitted to execute /etc/shutdown, /bin/rm, and /bin/cat on - houdini. Davehieb can execute any command on machines merlin and - kodiakthorn and can halt the SERVERS. Steve can run any command - located in the directory /usr/su_commands on all machines on the - subnets listed in OURNETS. + # User specification + britt REMOTE=SHUTDOWN:ALL=LPCS + robh ALL=ALL,!SHELLS + nieusma SERVERS=SHUTDOWN,/etc/reboot:\ + HUB=ALL,!SHELLS + jill houdini.rootgroup.com=/etc/shutdown,MISC + markm HUB=ALL,!MISC,!/etc/shutdown,!/etc/halt + billp ALL=/usr/local/bin/top:MACHINES=SHELLS + davehieb merlin=ALL:SERVERS=/etc/halt:\ + kodiakthorn=ALL + steve CSNETS=/usr/su_commands/ - The _s_u_d_o_e_r_s file SHOULD be edited by the _v_i_s_u_d_o command which locks - the file and does gramatical checking. This provides a mechanism for - the prevention of stupid syntax errors. + The above _s_u_d_o_e_r_s file specification is composed of 4 host + alias specifications, 3 command alias specifications and 8 + user specifications. Britt is permitted to execute + /etc/halt, /etc/shutdown, /usr/etc/lpc and /usr/ucb/lprm on + the REMOTE machines (merlin, kodiakthorn, and spirit). Robh + is permitted to execute any command except for the group of + SHELL commands on any machine. Jill is permitted to execute + /etc/shutdown, /bin/rm, and /bin/cat on houdini. Davehieb + can execute any command on machines merlin and kodiakthorn + and can halt the SERVERS. Steve can run any command located + in the directory /usr/su_commands on all machines on the + subnets listed in CSNETS. - Sudo was designed to log via the 4.3 BSD syslogging facility but can - log to a file instead if so desired. + The _s_u_d_o_e_r_s file SHOULD be edited by the _v_i_s_u_d_o command + which locks the file and does gramatical checking. This pro- + vides a mechanism for the prevention of stupid syntax + errors. - If an unauthorized user executes sudo, mail will be sent from the user + Sudo was designed to log via the 4.3 BSD syslogging facility -9 - 2 - Formatted: August 30, 1994 +Sun Release 4.1 Last change: 2 - SSSSUUUUDDDDOOOO((((8888)))) SSSSUUUUDDDDOOOO((((8888)))) -9 +SUDO(8) MAINTENANCE COMMANDS SUDO(8) - to the local authorities (defined at installation time). - All preferences are defined at installation time and are derived from - the sudo.h include file and the Makefile. + but can log to a file instead if so desired. + If an unauthorized user executes sudo, mail will be sent + from the user to the local authorities (defined at installa- + tion time). - OOOOPPPPTTTTIIIIOOOONNNNSSSS - _s_u_d_o accepts the following command line options: + All preferences are defined at installation time and are + derived from the sudo.h include file and the Makefile. - -V The -V (version) option causes sudo (or visudo) to print the - version number and exit. - -h The -h (help) option causes sudo to print the version of sudo and - a usage message before exiting. +OPTIONS + _s_u_d_o accepts the following command line options: - -v If given the -v (validate) option, sudo will update the user's - timestamp file, prompting for a password if necesary. This - extends the sudo timeout to for another N minutes (where N is - defined at installation time and defaults to 5 minutes) but does - not run a command. + -V The -V (version) option causes sudo (or visudo) to + print the version number and exit. - -k The -k (kill) option to sudo removes the user's timestamp file, - thus requiring a password the next time _s_u_d_o is run. This option - does not require and password and was added to allow a user to - revoke sudo permissions from a .logout file. + -l The -l (list) option will list out the allowed and for- + bidden commands for the user on the current host. + -h The -h (help) option causes sudo to print the version + of sudo and a usage message before exiting. - RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS - _s_u_d_o quits with an exit value of 1 if there is a - configuration/permission problem or if _s_u_d_o cannot execute the given - command. In the latter case the error string is printed to stdout via - _p_e_r_r_o_r(_3). If sudo cannot _s_t_a_t(_3) one or more entries in the user's - PATH the error is printed on stdout via _p_e_r_r_o_r(_3). (If the directory - does not exist or if it is not really a directory, the entry is - ignored and no error is printed.) This should not happen under normal - circumstances. The most common reason for _s_t_a_t(_3) to return - "permission denied" is if you are running an automounter and one of - the directories in your PATH is on a machine that is currently - unreachable. + -v If given the -v (validate) option, sudo will update the + user's timestamp file, prompting for a password if + necesary. This extends the sudo timeout to for another + N minutes (where N is defined at installation time and + defaults to 5 minutes) but does not run a command. + -k The -k (kill) option to sudo removes the user's times- + tamp file, thus requiring a password the next time _s_u_d_o + is run. This option does not require and password and + was added to allow a user to revoke sudo permissions + from a .logout file. - SSSSEEEECCCCUUUURRRRIIIITTTTYYYY NNNNOOOOTTTTEEEESSSS - _s_u_d_o tries to be safe when executing external commands. To this end - LD_* and SHLIB_PATH (on hpux only) environmental variables are removed - from the environment passed on to all commands executed. - Also, _s_u_d_o checks '.' and '' (both denoting current directory) last - when searching for a command in the user's PATH (if one or both are in - the PATH). Note, however, that the actual PATH environmental variable - is _n_o_t modified and is passed unchanged to the program that _s_u_d_o - executes. +RETURN VALUES + _s_u_d_o quits with an exit value of 1 if there is a + configuration/permission problem or if _s_u_d_o cannot execute + the given command. In the latter case the error string is + printed to stdout via _p_e_r_r_o_r(_3). If sudo cannot _s_t_a_t(_3) one + or more entries in the user's PATH the error is printed on + stdout via _p_e_r_r_o_r(_3). (If the directory does not exist or if + it is not really a directory, the entry is ignored and no + error is printed.) This should not happen under normal cir- + cumstances. The most common reason for _s_t_a_t(_3) to return + "permission denied" is if you are running an automounter and + one of the directories in your PATH is on a machine that is + currently unreachable. -9 - 3 - Formatted: August 30, 1994 +SECURITY NOTES + _s_u_d_o tries to be safe when executing external commands. To +Sun Release 4.1 Last change: 3 - SSSSUUUUDDDDOOOO((((8888)))) SSSSUUUUDDDDOOOO((((8888)))) -9 - For security reasons, if your OS supports shared libraries, sudo - should always be statically linked. +SUDO(8) MAINTENANCE COMMANDS SUDO(8) - FFFFUUUUTTTTUUUURRRREEEE EEEENNNNHHHHAAAANNNNCCCCEEEEMMMMEEEENNNNTTTTSSSS - Allow nesting of host and command aliases. - Allow the host specifier in the sudoers file - to use universe notation (user ALL,!SERVERS, ... = commands). - Allow user aliases in the sudoers file (like host/command aliases). - Allow alias nesting. - Have visudo do more extensive checking on the sudoers file. - FFFFIIIILLLLEEEESSSS - /etc/sudoers file of authorized users. - /etc/stmp lock file for visudo. - /usr/local/bin/sudo the executable itself. - /usr/local/etc/visudo utility for modifying the sudoers file. + this end LD_* and SHLIB_PATH (on hpux only) environmental + variables are removed from the environment passed on to all + commands executed. + Also, _s_u_d_o checks '.' and '' (both denoting current direc- + tory) last when searching for a command in the user's PATH + (if one or both are in the PATH). Note, however, that the + actual PATH environmental variable is _n_o_t modified and is + passed unchanged to the program that _s_u_d_o executes. - EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS - SUDO_USER Set to the login of the user who invoked sudo - SUDO_UID Set to the uid of the user who invoked sudo + For security reasons, if your OS supports shared libraries, + sudo should always be statically linked. - The following are used only if _v_i_s_u_d_o was compiled with the ENV_EDITOR - option: +FUTURE ENHANCEMENTS + Allow nesting of host and command aliases. + Allow the host specifier in the sudoers file + to use universe notation (user ALL,!SERVERS, ... = commands). + Allow user aliases in the sudoers file (like host/command aliases). + Allow alias nesting. + Have visudo do more extensive checking on the sudoers file. - EDITOR Used by visudo as the editor to use. - VISUAL Used by visudo if EDITOR is not set. +FILES + /etc/sudoers file of authorized users. + /etc/stmp lock file for visudo. + /usr/local/bin/sudo the executable itself. + /usr/local/etc/visudo utility for modifying the sudoers file. - AAAAUUUUTTTTHHHHOOOORRRRSSSS - Many people have worked on _s_u_d_o over the years, this version is done - by: - Jeff Nieusma - David Hieb +ENVIRONMENT VARIABLES + SUDO_USER Set to the login of the user who invoked sudo + SUDO_UID Set to the uid of the user who invoked sudo - See the HISTORY file in the sudo distribution for more details. + The following are used only if _v_i_s_u_d_o was compiled with the + ENV_EDITOR option: - Please send all bugs, comments, and changes to sudo- - bugs@cs.colorado.edu. + EDITOR Used by visudo as the editor to use. + VISUAL Used by visudo if EDITOR is not set. - DDDDIIIISSSSCCCCLLLLAAAAIIIIMMMMEEEERRRR - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. +AUTHORS + Many people have worked on _s_u_d_o over the years, this version + is done by: - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software + Jeff Nieusma + David Hieb + See the HISTORY file in the sudo distribution for more details. -9 - 4 - Formatted: August 30, 1994 + Please send all bugs, comments, and changes to sudo- + bugs@cs.colorado.edu. +Sun Release 4.1 Last change: 4 - SSSSUUUUDDDDOOOO((((8888)))) SSSSUUUUDDDDOOOO((((8888)))) -9 - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +SUDO(8) MAINTENANCE COMMANDS SUDO(8) - CCCCAAAAVVVVEEEEAAAATTTTSSSS - There is no easy way to prevent a user from gaining a root shell if - that user has access to commands that are shell scripts or that allow - shell escapes. - BBBBUUUUGGGGSSSS - The -_V flag gives the version of the _s_u_d_o package rather than the - individual _s_u_d_o or _v_i_s_u_d_o program. +DISCLAIMER + This program is distributed in the hope that it will be use- + ful, but WITHOUT ANY WARRANTY; without even the implied war- + ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR- + POSE. See the GNU General Public License for more details. + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA + 02139, USA. - SSSSEEEEEEEE AAAALLLLSSSSOOOO - su(1) +CAVEATS + There is no easy way to prevent a user from gaining a root + shell if that user has access to commands that are shell + scripts or that allow shell escapes. +BUGS + The -_V flag gives the version of the _s_u_d_o package rather + than the individual _s_u_d_o or _v_i_s_u_d_o program. +SEE ALSO + su(1) @@ -316,10 +323,8 @@ -9 - - - 5 - Formatted: August 30, 1994 +Sun Release 4.1 Last change: 5 diff -uN sudo.v1.3.1/sudo.h sudo.v1.3.1pl4/sudo.h --- sudo.v1.3.1/sudo.h Thu Aug 11 18:39:21 1994 +++ sudo.v1.3.1pl4/sudo.h Fri Sep 2 14:45:13 1994 @@ -3,7 +3,7 @@ * * This software comes with no waranty whatsoever, use at your own risk. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * */ @@ -335,6 +335,7 @@ #define MODE_KILL 0x02 #define MODE_VERSION 0x03 #define MODE_HELP 0x04 +#define MODE_LIST 0x05 /* * Prototypes diff -uN sudo.v1.3.1/sudo.man sudo.v1.3.1pl4/sudo.man --- sudo.v1.3.1/sudo.man Tue Aug 30 16:16:10 1994 +++ sudo.v1.3.1pl4/sudo.man Tue Sep 20 15:13:31 1994 @@ -4,7 +4,7 @@ .SH SYNOPSIS .B sudo --V | -h | -v | -k | +-V | -h | -l | -v | -k | .I .sp .B visudo @@ -105,7 +105,7 @@ /etc/shutdown, /bin/rm, and /bin/cat on houdini. Davehieb can execute any command on machines merlin and kodiakthorn and can halt the SERVERS. Steve can run any command located in the directory -/usr/su_commands on all machines on the subnets listed in OURNETS. +/usr/su_commands on all machines on the subnets listed in CSNETS. The .I sudoers @@ -129,6 +129,9 @@ .IP -V The -V (version) option causes sudo (or visudo) to print the version number and exit. +.IP -l +The -l (list) option will list out the allowed and forbidden commands +for the user on the current host. .IP -h The -h (help) option causes sudo to print the version of sudo and a usage message before exiting. diff -uN sudo.v1.3.1/sudo_realpath.c sudo.v1.3.1pl4/sudo_realpath.c --- sudo.v1.3.1/sudo_realpath.c Thu Aug 11 19:59:17 1994 +++ sudo.v1.3.1pl4/sudo_realpath.c Mon Sep 19 18:55:35 1994 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * ******************************************************************* * @@ -30,7 +30,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sudo_realpath.c,v 1.14 1994/08/12 01:58:58 millert Exp $"; +static char rcsid[] = "$Id: sudo_realpath.c,v 1.16 1994/09/20 00:53:34 millert Exp $"; #endif /* lint */ #include "config.h" @@ -55,7 +55,7 @@ #ifndef STDC_HEADERS extern char *strcpy __P((char *, const char *)); -extern int readlink __P((const char *, char *, size_t)); +extern ssize_t readlink __P((const char *, char *, size_t)); extern int lstat __P((const char *, struct stat *)); #endif /* !STDC_HEADERS */ diff -uN sudo.v1.3.1/sudo_setenv.c sudo.v1.3.1pl4/sudo_setenv.c --- sudo.v1.3.1/sudo_setenv.c Wed Aug 17 10:36:45 1994 +++ sudo.v1.3.1pl4/sudo_setenv.c Fri Sep 2 13:54:56 1994 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * ******************************************************************* * @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sudo_setenv.c,v 1.5 1994/08/17 16:36:31 millert Exp $"; +static char rcsid[] = "$Id: sudo_setenv.c,v 1.6 1994/09/02 19:54:28 millert Exp $"; #endif /* lint */ #include "config.h" diff -uN sudo.v1.3.1/tgetpass.c sudo.v1.3.1pl4/tgetpass.c --- sudo.v1.3.1/tgetpass.c Thu Aug 11 18:40:10 1994 +++ sudo.v1.3.1pl4/tgetpass.c Tue Oct 4 10:53:04 1994 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu * ******************************************************************* * @@ -33,6 +33,12 @@ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ +#ifdef HAVE_STRING_H +#include +#endif /* HAVE_STRING_H */ +#ifdef HAVE_STRINGS_H +#include +#endif /* HAVE_STRINGS_H */ #include #ifdef _AIX #include diff -uN sudo.v1.3.1/version.h sudo.v1.3.1pl4/version.h --- sudo.v1.3.1/version.h Tue Aug 30 16:31:32 1994 +++ sudo.v1.3.1pl4/version.h Tue Oct 4 10:57:08 1994 @@ -15,12 +15,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Please send bugs, changes, problems to sudo-bugs.cs.colorado.edu + * Please send bugs, changes, problems to sudo-bugs@cs.colorado.edu */ #ifndef _SUDO_VERSION_H #define _SUDO_VERSION_H -static char version[] = "1.3.1"; +static char version[] = "1.3.1pl4"; #endif /* _SUDO_VERSION_H */ Common subdirectories: sudo.v1.3.1/visudoers and sudo.v1.3.1pl4/visudoers