]> granicus.if.org Git - sudo/commitdiff
Add support for "Defaults" line in sudoers to make configuration variables
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 8 Sep 1999 08:06:28 +0000 (08:06 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 8 Sep 1999 08:06:28 +0000 (08:06 +0000)
changable at runtime (and on a global, per-host and per-user basis).
Both the names and the internal representation are still subject to change.
It was necessary to make sudo_user.runas but a char ** instead of a
char * since this value can be changed by a Defaults line.  There is a
similar (but more complicated) issue with sudo_user.prompt but it
is handled differently at the moment.

Add a "-L" flag to list the name of options with their descriptions.  This
may only be temporary.

Move some prototypes to parse.h

Be much less restrictive on what is allowed for a username.

31 files changed:
BUGS
INSTALL
Makefile.in
TODO
aclocal.m4
auth/aix_auth.c
auth/fwtk.c
auth/kerb5.c
auth/pam.c
auth/rfc1938.c
auth/sia.c
auth/sudo_auth.c
check.c
config.h.in
configure
configure.in
defaults.c [new file with mode: 0644]
defaults.h [new file with mode: 0644]
find_path.c
lex.yy.c
logging.c
parse.h
parse.lex
parse.yacc
sudo.c
sudo.h
sudo.tab.c
sudo.tab.h
testsudoers.c
version.c [deleted file]
visudo.c

diff --git a/BUGS b/BUGS
index 5515aa6ee256ebd66cb9a2fa58f687f9d013ac11..a7c381f4f165d59f73de692bd9cd247ac647ab59 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -11,3 +11,7 @@ Known bugs in sudo version 1.6
    given.  This is a flaw in GNU autoconf.
 
 4) On DUNIX in sia mode, hitting return at the prompt does not quit.
+
+5) In parse.lex, '@" should not need to be a special character.
+   For some reason, if it is not excluded from WORD, Defaults@ doesn't
+   match.
diff --git a/INSTALL b/INSTALL
index 62bc6eaef150c796a6bf9f0d207335529e9747cd..b4e7081b0cd166f17781ccd6599073f095e65458 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -55,6 +55,10 @@ For most systems and configurations it is possible simply to:
        site.  You will probably want to refer the sample.sudoers
        file and sudoers man page included with the sudo package.
 
+    8) If you want to use syslogd(8) to do the logging, you'll need
+       to update your /etc/syslog.conf file.  See the sample.syslog.conf
+       file included in the distribution for an example.
+
 Available configure options
 ===========================
 
@@ -208,7 +212,8 @@ Special features/options:
   --with-loglen
        Number of characters per line for the file log.  This is only used if
        you are to "file" or "both".  This value is used to decide when to wrap
-       lines for nicer log files.  The default is 80.
+       lines for nicer log files.  The default is 80.  Setting this to 0
+       will disable the wrapping.
 
   --with-ignore-dot
        If set, sudo will ignore '.' or '' (current dir) in $PATH.
@@ -404,9 +409,6 @@ Special features/options:
   --enable-log-host
        Log the hostname in the log file.
 
-  --disable-log-wrap
-       Do not wrap long lines in the log file.
-
   --enable-noargs-shell
        If sudo is invoked with no arguments it acts as if the "-s" flag had
        been given.  That is, it runs a shell as root (the shell is determined
index 96dabbba368630009e7ab7221ec5f909497bf3e4..9fe7f3c0088c43454260e5c86a8975e3640fdbae 100644 (file)
@@ -110,26 +110,26 @@ SHELL = /bin/sh
 
 PROGS = @PROGS@
 
-SRCS = alloc.c alloca.c check.c fileops.c find_path.c fnmatch.c getcwd.c \
-       getspwuid.c goodpath.c interfaces.c lex.yy.c lsearch.c logging.c \
-       parse.c parse.lex parse.yacc putenv.c snprintf.c strcasecmp.c \
+SRCS = alloc.c alloca.c check.c defaults.c fileops.c find_path.c fnmatch.c \
+       getcwd.c getspwuid.c goodpath.c interfaces.c lex.yy.c lsearch.c \
+       logging.c parse.c parse.lex parse.yacc putenv.c snprintf.c strcasecmp.c \
        strerror.c sudo.c sudo.tab.c sudo_setenv.c testsudoers.c tgetpass.c \
-       utime.c version.c visudo.c $(AUTH_SRCS)
+       utime.c visudo.c $(AUTH_SRCS)
 
 AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/dce.c auth/fwtk.c auth/kerb4.c \
            auth/kerb5.c auth/pam.c auth/passwd.c auth/rfc1938.c \
            auth/secureware.c auth/securid.c auth/sia.c auth/sudo_auth.c
 
-HDRS = compat.h ins_2001.h ins_classic.h ins_csops.h ins_goons.h insults.h \
-       interfaces.h logging.h parse.h sudo.h sudo.tab.h version.h \
+HDRS = compat.h defaults.h ins_2001.h ins_classic.h ins_csops.h ins_goons.h \
+       insults.h interfaces.h logging.h parse.h sudo.h sudo.tab.h version.h \
        auth/sudo_auth.h emul/fnmatch.h emul/search.h emul/utime.h
 
 AUTH_OBJS = sudo_auth.o @AUTH_OBJS@
 
-PARSEOBJS = sudo.tab.o lex.yy.o alloc.o
+PARSEOBJS = sudo.tab.o lex.yy.o alloc.o defaults.o
 
 SUDOBJS = check.o getspwuid.o goodpath.o fileops.o find_path.o interfaces.o \
-         logging.o parse.o sudo.o sudo_setenv.o tgetpass.o version.o \
+         logging.o parse.o sudo.o sudo_setenv.o tgetpass.o \
          $(AUTH_OBJS) $(PARSEOBJS)
 
 VISUDOBJS = visudo.o fileops.o $(PARSEOBJS)
@@ -148,8 +148,8 @@ DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES FAQ HISTORY INSTALL INSTALL.configure \
            sudo.man sudo.pod sudoers sudoers.cat sudoers.man sudoers.pod \
            visudo.cat visudo.man visudo.pod auth/API
 
-SUDODEP = $(srcdir)/sudo.h $(srcdir)/compat.h $(srcdir)/logging.h \
-         config.h pathnames.h
+SUDODEP = $(srcdir)/sudo.h $(srcdir)/compat.h $(srcdir)/defaults.h \
+         $(srcdir)/logging.h config.h pathnames.h
 
 AUTHDEP = $(SUDODEP) $(authdir)/sudo_auth.h
 
@@ -200,13 +200,13 @@ logging.o: logging.c $(SUDODEP)
 sudo_setenv.o: sudo_setenv.c $(SUDODEP)
 tgetpass.o: tgetpass.c $(SUDODEP)
 visudo.o: visudo.c $(SUDODEP) version.h
-sudo.o: sudo.c $(SUDODEP) interfaces.h
+sudo.o: sudo.c $(SUDODEP) interfaces.h version.h
 interfaces.o: interfaces.c $(SUDODEP) interfaces.h
 testsudoers.o: testsudoers.c $(SUDODEP) parse.h interfaces.h
 parse.o: parse.c $(SUDODEP) parse.h interfaces.h
 lex.yy.o: lex.yy.c $(SUDODEP) parse.h sudo.tab.h
 sudo.tab.o: sudo.tab.c $(SUDODEP) parse.h
-version.o: version.c $(SUDODEP) version.h auth/sudo_auth.h
+defaults.o: defaults.c $(SUDODEP) auth/sudo_auth.h
 fnmatch.o: fnmatch.c config.h compat.h emul/fnmatch.h
 getcwd.o: getcwd.c config.h compat.h
 lsearch.o: lsearch.c config.h compat.h emul/search.h
diff --git a/TODO b/TODO
index 89a2855eb430ae1d0991b54a84939653a8f41e3f..d41146eee8dc8565e34dcd3dcdd249ad98890515 100644 (file)
--- a/TODO
+++ b/TODO
@@ -68,3 +68,7 @@ TODO list (most will be addressed in sudo 2.0)
     user.
 
 24) Use strtol() and strtoul(), not atoi()?
+
+25) In parse.yacc get rid on unneeded '{ ; }'
+
+26) Look into %e, %p, %k in parse.lex
index fc6f3f052a0a9b388af2f53a80d0bfe7e3e338a4..f10e261601d19723a3c4d1eee5d0ab3b16f90e3d 100644 (file)
@@ -304,26 +304,6 @@ AC_MSG_RESULT($sudo_cv_uid_t_len)
 AC_DEFINE_UNQUOTED(MAX_UID_T_LEN, $sudo_cv_uid_t_len)
 ])
 
-dnl
-dnl check for facilitynames and prioritynames in syslog.h
-dnl 4.4BSD has these but most others do not.
-dnl
-AC_DEFUN(SUDO_SYSLOG_NAMES,
-[AC_MSG_CHECKING(for facilitynames and prioritynames in syslog.h)
-AC_CACHE_VAL(sudo_cv_syslog_names,
-[
-AC_TRY_COMPILE([
-#define SYSLOG_NAMES
-#include <stdio.h>
-#include <syslog.h>
-], [ CODE *p=&prioritynames[0]; CODE *f=&facilitynames[0]; ],
-sudo_cv_syslog_names=yes, sudo_cv_syslog_names=no)])dnl
-AC_MSG_RESULT($sudo_cv_syslog_names)
-if test $sudo_cv_syslog_names = yes; then
-    AC_DEFINE(HAVE_SYSLOG_NAMES)
-fi
-])
-
 dnl
 dnl check for "long long"
 dnl XXX hard to cache since it includes 2 tests
index 1e53fa6385e5c9f4620e91bd667fda59e6ab0d87..b82ab060d82eeac36155f520fb3f59d0d2846bc3 100644 (file)
@@ -67,7 +67,7 @@ aixauth_verify(pw, prompt, auth)
     char *message, *pass;
     int reenter = 1;
 
-    pass = tgetpass(prompt, PASSWORD_TIMEOUT * 60, 1);
+    pass = tgetpass(prompt, sudo_inttable[I_PW_TIMEOUT] * 60, 1);
     if (authenticate(pw->pw_name, pass, &reenter, &message) == 0)
        return(AUTH_SUCCESS);
     else
index f002af97ae1884a522f464abeba2dbf2136c1a60..0649cd640bf831421b0694294eeb512f29f09a40 100644 (file)
@@ -117,9 +117,9 @@ fwtk_verify(pw, prompt, auth)
     /* Get the password/response from the user. */
     if (strncmp(resp, "challenge ", 10) == 0) {
        (void) snprintf(buf, sizeof(buf), "%s\nResponse: ", &resp[10]);
-       pass = tgetpass(buf, PASSWORD_TIMEOUT * 60, 0);
+       pass = tgetpass(buf, sudo_inttable[I_PW_TIMEOUT] * 60, 0);
     } else if (strncmp(resp, "password", 8) == 0) {
-       pass = tgetpass(prompt, PASSWORD_TIMEOUT * 60, 1);
+       pass = tgetpass(prompt, sudo_inttable[I_PW_TIMEOUT] * 60, 1);
     } else {
        (void) fprintf(stderr, "%s: %s\n", Argv[0], resp);
        return(AUTH_FATAL);
index 94d296cfe776f4570013affe3219db24e3e42f6a..130a6c54dc7962d17f7426afd6cb3e35b7ee2f8e 100644 (file)
@@ -103,7 +103,7 @@ kerb5_init(pw, promptp, auth)
        realm = lrealm;
 
     /* Only rewrite prompt if user didn't specify their own. */
-    if (!strcmp(prompt, PASSPROMPT))
+    if (user_prompt == NULL)
        easprintf(promptp, "Password for %s@%s: ", pw->pw_name, realm);
     return(AUTH_SUCCESS);
 }
index 4228b5b346a799087a70f6cf5e5449343950e9c7..de002215be29df5908e0691c943277e74ddc865a 100644 (file)
@@ -143,7 +143,7 @@ sudo_conv(num_msg, msg, response, appdata_ptr)
                if (strcmp(p, "Password: ") && strcmp(p, "Password:"))
                    p = (char *) pm->msg;
                pr->resp = estrdup((char *) tgetpass(p,
-                   PASSWORD_TIMEOUT * 60, !echo));
+                   sudo_inttable[I_PW_TIMEOUT] * 60, !echo));
                if (*pr->resp == '\0')
                    nil_pw = 1;         /* empty password */
                break;
index 210ad6d315f4a554cb4380c15985364d7160c20f..cc86a5843c134f4426815b3adeb648e18ef47f75 100644 (file)
@@ -93,6 +93,9 @@ rfc1938_setup(pw, promptp, auth)
        /* Ignore trailing colon (we will add our own) */
        if (orig_prompt[op_len - 1] == ':')
            op_len--;
+       else if (op_len >= 2 && orig_prompt[op_len - 1] == ' '
+           && orig_prompt[op_len - 2] == ':')
+           op_len -= 2;
     }
 
 #ifdef HAVE_SKEY
@@ -123,11 +126,11 @@ rfc1938_setup(pw, promptp, auth)
        new_prompt = (char *) erealloc(new_prompt, np_size);
     }
 
-#ifdef LONG_OTP_PROMPT
-    (void) sprintf(new_prompt, "%s\n%s", challenge, orig_prompt);
-#else
-    (void) sprintf(new_prompt, "%.*s [ %s ]:", op_len, orig_prompt, challenge);
-#endif /* LONG_OTP_PROMPT */
+    if (sudo_flag_set(FL_LONG_OTP_PROMPT))
+       (void) sprintf(new_prompt, "%s\n%s", challenge, orig_prompt);
+    else
+       (void) sprintf(new_prompt, "%.*s [ %s ]:", op_len, orig_prompt,
+           challenge);
 
     *promptp = new_prompt;
     return(AUTH_SUCCESS);
index e399822b46c25403d4304c16959ecb7ef3566bc2..35fd6e371acfcacbf724176e579fecd6bb2ddebc 100644 (file)
@@ -80,8 +80,8 @@ sudo_collect(timeout, rendition, title, nprompts, prompts)
     switch (rendition) {
        case SIAFORM:
        case SIAONELINER:
-           if (timeout <= 0 || timeout > PASSWORD_TIMEOUT * 60)
-               timeout = PASSWORD_TIMEOUT * 60;
+           if (timeout <= 0 || timeout > sudo_inttable[I_PW_TIMEOUT] * 60)
+               timeout = sudo_inttable[I_PW_TIMEOUT] * 60;
            /*
             * Substitute custom prompt if a) the sudo prompt is not "Password:"
             * and b) the SIA prompt is "Password:" (so we know it is safe).
index 5775534caf06bbdd203a2ce5b8ac4b1bd737a296..b8548cbde220727d92060128de0b0b743e7066a6 100644 (file)
@@ -95,9 +95,10 @@ sudo_auth auth_switch[] = {
 int nil_pw;            /* I hate resorting to globals like this... */
 
 void
-verify_user()
+verify_user(prompt)
+    char *prompt;
 {
-    short counter = TRIES_FOR_PASSWORD + 1;
+    short counter = sudo_inttable[I_PW_TRIES] + 1;
     short success = AUTH_FAILURE;
     short status;
     char *p;
@@ -120,7 +121,7 @@ verify_user()
            if (NEEDS_USER(auth))
                set_perms(PERM_USER, 0);
 
-           status = (auth->init)(sudo_user.pw, &user_prompt, auth);
+           status = (auth->init)(sudo_user.pw, &prompt, auth);
            if (status == AUTH_FAILURE)
                auth->flags &= ~FLAG_CONFIGURED;
            else if (status == AUTH_FATAL)      /* XXX log */
@@ -138,7 +139,7 @@ verify_user()
                if (NEEDS_USER(auth))
                    set_perms(PERM_USER, 0);
 
-               status = (auth->setup)(sudo_user.pw, &user_prompt, auth);
+               status = (auth->setup)(sudo_user.pw, &prompt, auth);
                if (status == AUTH_FAILURE)
                    auth->flags &= ~FLAG_CONFIGURED;
                else if (status == AUTH_FATAL)  /* XXX log */
@@ -152,9 +153,9 @@ verify_user()
        /* Get the password unless the auth function will do it for us */
        nil_pw = 0;
 #ifdef AUTH_STANDALONE
-       p = user_prompt;
+       p = prompt;
 #else
-       p = (char *) tgetpass(user_prompt, PASSWORD_TIMEOUT * 60, 1);
+       p = (char *) tgetpass(prompt, sudo_inttable[I_PW_TIMEOUT] * 60, 1);
        if (!p || *p == '\0')
            nil_pw = 1;
 #endif /* AUTH_STANDALONE */
@@ -181,7 +182,7 @@ verify_user()
 
        /* Exit loop on nil password, but give it a chance to match first. */
        if (nil_pw) {
-           if (counter == TRIES_FOR_PASSWORD)
+           if (counter == sudo_inttable[I_PW_TRIES])
                exit(1);
            else
                break;
@@ -211,8 +212,8 @@ cleanup:
            return;
        case AUTH_FAILURE:
            log_error(NO_MAIL, "%d incorrect password attempt%s",
-               TRIES_FOR_PASSWORD - counter,
-               (TRIES_FOR_PASSWORD - counter == 1) ? "" : "s");
+               sudo_inttable[I_PW_TRIES] - counter,
+               (sudo_inttable[I_PW_TRIES] - counter == 1) ? "" : "s");
        case AUTH_FATAL:
            exit(1);
     }
@@ -226,6 +227,17 @@ pass_warn(fp)
 #ifdef USE_INSULTS
     (void) fprintf(fp, "%s\n", INSULT);
 #else
-    (void) fprintf(fp, "%s\n", INCORRECT_PASSWORD);
+    (void) fprintf(fp, "%s\n", sudo_strtable[I_BADPASS_MSG]);
 #endif /* USE_INSULTS */
 }
+
+void
+dump_auth_methods()
+{
+    sudo_auth *auth;
+
+    (void) fputs("Authentication methods:", stdout);
+    for (auth = auth_switch; auth->name; auth++)
+        (void) printf(" '%s'", auth->name);
+    (void) putchar('\n');
+}
diff --git a/check.c b/check.c
index 170f029916063ccf35622bb98114585eac4f4859..9047166497600ac4c3ccb6dce17ad5f92253092f 100644 (file)
--- a/check.c
+++ b/check.c
@@ -87,6 +87,7 @@ check_user()
 {
     char *timestampdir = NULL;
     char *timestampfile = NULL;
+    char *prompt;
     int status;
 
     if (user_uid == 0 || user_is_exempt())
@@ -99,9 +100,9 @@ check_user()
            lecture();          /* first time through they get a lecture */
 
        /* Expand any escapes in the prompt. */
-       user_prompt = expand_prompt(user_prompt, user_name, user_shost);
+       prompt = expand_prompt(user_prompt ? user_prompt : sudo_strtable[I_PASSPROMPT], user_name, user_shost);
 
-       verify_user();
+       verify_user(prompt);
     }
     if (status != TS_ERROR)
        update_timestamp(timestampdir, timestampfile);
@@ -112,20 +113,21 @@ check_user()
 
 /*
  * Standard sudo lecture.
- * TODO: allow the user to specify a file name instead at compile time.
+ * TODO: allow the user to specify a file name instead.
  */
 static void
 lecture()
 {
-#ifndef NO_LECTURE
-    (void) fputs("\n\
+
+    if (sudo_flag_set(FL_LECTURE)) {
+       (void) fputs("\n\
 We trust you have received the usual lecture from the local System\n\
 Administrator. It usually boils down to these two things:\n\
 \n\
        #1) Respect the privacy of others.\n\
        #2) Think before you type.\n\n",
        stderr);
-#endif /* NO_LECTURE */
+    }
 }
 
 /*
@@ -188,7 +190,7 @@ expand_prompt(old_prompt, user, host)
 
     if (subst) {
        new_prompt = (char *) emalloc(len + 1);
-       for (p = user_prompt, np = new_prompt; *p; p++) {
+       for (p = old_prompt, np = new_prompt; *p; p++) {
            if (lastchar == '%' && (*p == 'h' || *p == 'u' || *p == '%')) {
                /* substiture user/host name */
                if (*p == 'h') {
@@ -210,7 +212,7 @@ expand_prompt(old_prompt, user, host)
        }
        *np = '\0';
     } else
-       new_prompt = user_prompt;
+       new_prompt = old_prompt;
 
     return(new_prompt);
 }
@@ -221,11 +223,13 @@ expand_prompt(old_prompt, user, host)
 int
 user_is_exempt()
 {
-#ifdef EXEMPTGROUP
     struct group *grp;
     char **gr_mem;
 
-    if (!(grp = getgrnam(EXEMPTGROUP)))
+    if (!sudo_strtable[I_EXEMPT_GRP])
+       return(FALSE);
+
+    if (!(grp = getgrnam(sudo_strtable[I_EXEMPT_GRP])))
        return(FALSE);
 
     if (getgid() == grp->gr_gid)
@@ -235,7 +239,6 @@ user_is_exempt()
        if (strcmp(user_name, *gr_mem) == 0)
            return(TRUE);
     }
-#endif
 
     return(FALSE);
 }
@@ -248,26 +251,26 @@ build_timestamp(timestampdir, timestampfile)
     char **timestampdir;
     char **timestampfile;
 {
-#ifdef USE_TTY_TICKETS
-    char *p;
-
-    if ((p = strrchr(user_tty, '/')))
-       p++;
-    else
-       p = user_tty;
-    if (sizeof(_PATH_SUDO_TIMEDIR) + strlen(user_name) + strlen(p) + 2 >
-       MAXPATHLEN)
-       log_error(0, "timestamp path too long: %s/%s/%s", _PATH_SUDO_TIMEDIR,
-           user_name, p);
-    easprintf(timestampdir, "%s/%s", _PATH_SUDO_TIMEDIR, user_name);
-    easprintf(timestampfile, "%s/%s/%s", _PATH_SUDO_TIMEDIR, user_name, p);
-#else
-    if (sizeof(_PATH_SUDO_TIMEDIR) + strlen(user_name) + 1 > MAXPATHLEN)
-       log_error(0, "timestamp path too long: %s/%s", _PATH_SUDO_TIMEDIR,
-           user_name);
-    easprintf(timestampdir, "%s/%s", _PATH_SUDO_TIMEDIR, user_name);
-    *timestampfile = NULL;
-#endif /* USE_TTY_TICKETS */
+    char *dirparent = sudo_strtable[I_TIMESTAMPDIR];
+
+    if (sudo_flag_set(FL_TTY_TICKETS)) {
+       char *p;
+
+       if ((p = strrchr(user_tty, '/')))
+           p++;
+       else
+           p = user_tty;
+       if (strlen(dirparent) + strlen(user_name) + strlen(p) + 3 > MAXPATHLEN)
+           log_error(0, "timestamp path too long: %s/%s/%s", dirparent,
+               user_name, p);
+       easprintf(timestampdir, "%s/%s", dirparent, user_name);
+       easprintf(timestampfile, "%s/%s/%s", dirparent, user_name, p);
+    } else {
+       if (strlen(dirparent) + strlen(user_name) + 2 > MAXPATHLEN)
+           log_error(0, "timestamp path too long: %s/%s", dirparent, user_name);
+       easprintf(timestampdir, "%s/%s", dirparent, user_name);
+       *timestampfile = NULL;
+    }
 }
 
 /*
@@ -282,39 +285,40 @@ timestamp_status(timestampdir, timestampfile, user, make_dirs)
 {
     struct stat sb;
     time_t now;
+    char *dirparent = sudo_strtable[I_TIMESTAMPDIR];
     int status = TS_ERROR;             /* assume the worst */
 
     /*
-     * Sanity check _PATH_SUDO_TIMEDIR and make it if it doesn't already exist.
+     * Sanity check dirparent and make it if it doesn't already exist.
      * We start out assuming the worst (that the dir is not sane) and
      * if it is ok upgrade the status to ``no timestamp file''.
-     * Note that we don't check the parent(s) of _PATH_SUDO_TIMEDIR for
+     * Note that we don't check the parent(s) of dirparent for
      * sanity since the sudo dir is often just located in /tmp.
      */
-    if (lstat(_PATH_SUDO_TIMEDIR, &sb) == 0) {
+    if (lstat(dirparent, &sb) == 0) {
        if (!S_ISDIR(sb.st_mode))
            log_error(NO_EXIT, "%s exists but is not a directory (0%o)",
-               _PATH_SUDO_TIMEDIR, sb.st_mode);
+               dirparent, sb.st_mode);
        else if (sb.st_uid != 0)
            log_error(NO_EXIT, "%s owned by uid %ld, should be owned by root",
-               _PATH_SUDO_TIMEDIR, (long) sb.st_uid);
+               dirparent, (long) sb.st_uid);
        else if ((sb.st_mode & 0000022))
            log_error(NO_EXIT,
                "%s writable by non-owner (0%o), should be mode 0700",
-               _PATH_SUDO_TIMEDIR, sb.st_mode);
+               dirparent, sb.st_mode);
        else {
            if ((sb.st_mode & 0000777) != 0700)
-               (void) chmod(_PATH_SUDO_TIMEDIR, 0700);
+               (void) chmod(dirparent, 0700);
            status = TS_MISSING;
        }
     } else if (errno != ENOENT) {
-       log_error(NO_EXIT|USE_ERRNO, "can't stat %s", _PATH_SUDO_TIMEDIR);
+       log_error(NO_EXIT|USE_ERRNO, "can't stat %s", dirparent);
     } else {
-       /* No _PATH_SUDO_TIMEDIR, try to make one. */
+       /* No dirparent, try to make one. */
        if (make_dirs) {
-           if (mkdir(_PATH_SUDO_TIMEDIR, S_IRWXU))
+           if (mkdir(dirparent, S_IRWXU))
                log_error(NO_EXIT|USE_ERRNO, "can't mkdir %s",
-                   _PATH_SUDO_TIMEDIR);
+                   dirparent);
            else
                status = TS_MISSING;
        }
@@ -408,12 +412,13 @@ timestamp_status(timestampdir, timestampfile, user, make_dirs)
      */
     if (status == TS_OLD) {
        now = time(NULL);
-       if (TIMEOUT && now - sb.st_mtime < 60 * TIMEOUT) {
+       if (sudo_inttable[I_TS_TIMEOUT] && 
+           now - sb.st_mtime < 60 * sudo_inttable[I_TS_TIMEOUT]) {
            /*
             * Check for bogus time on the stampfile.  The clock may
             * have been set back or someone could be trying to spoof us.
             */
-           if (sb.st_mtime > now + 60 * TIMEOUT * 2) {
+           if (sb.st_mtime > now + 60 * sudo_inttable[I_TS_TIMEOUT] * 2) {
                log_error(NO_EXIT,
                    "timestamp too far in the future: %20.20s",
                    4 + ctime(&sb.st_mtime));
index 383c9952a3b2a197fbdede57605fc71c7f8e5de8..c52de6822b24fcb24b00e8d0e21c4356e700013a 100644 (file)
 /* Define if you want the hostname to be entered into the log file */
 #undef HOST_IN_LOG
 
-/* Define if you want the log file line to be wrapped */
-#undef WRAP_LOG
-
 /* Define to be the number of minutes before sudo asks for passwd again.  */
 #undef TIMEOUT
 
 /* Define to be the max chars per log line (for line wrapping).  */
 #undef MAXLOGFILELEN
 
-/* Define if your syslog.h has the prioritynames and facilitynames tables.  */
-#undef HAVE_SYSLOG_NAMES
-
 /* Define if you want to ignore '.' and '' in $PATH */
 #undef IGNORE_DOT_PATH
 
index 3f9a337b25712baa28c761510b808dc445afe66c..a493de8f248ffb8a6adc76ec602806472fd7d7e8 100755 (executable)
--- a/configure
+++ b/configure
@@ -137,8 +137,6 @@ ac_help="$ac_help
   --disable-root-sudo     don't allow root to run sudo"
 ac_help="$ac_help
   --enable-log-host       Log the hostname in the log file"
-ac_help="$ac_help
-  --disable-log-wrap      Do not wrap long lines in the log file"
 ac_help="$ac_help
   --enable-noargs-shell   If sudo is given no arguments run a shell"
 ac_help="$ac_help
@@ -823,7 +821,7 @@ if test "${with_passwd+set}" = set; then
 EOF
 
                echo $ac_n "checking whether to use shadow/passwd file authentication""... $ac_c" 1>&6
-echo "configure:827: checking whether to use shadow/passwd file authentication" >&5
+echo "configure:825: checking whether to use shadow/passwd file authentication" >&5
                echo "$ac_t""no" 1>&6
                ;;
     *)         echo "Sorry, --with-passwd does not take an argument."
@@ -846,7 +844,7 @@ if test "${with_skey+set}" = set; then
 EOF
 
                echo $ac_n "checking whether to try S/Key authentication""... $ac_c" 1>&6
-echo "configure:850: checking whether to try S/Key authentication" >&5
+echo "configure:848: checking whether to try S/Key authentication" >&5
                echo "$ac_t""yes" 1>&6
                AUTH_OBJS="${AUTH_OBJS} rfc1938.o"
                ;;
@@ -870,7 +868,7 @@ if test "${with_opie+set}" = set; then
 EOF
 
                echo $ac_n "checking whether to try NRL OPIE authentication""... $ac_c" 1>&6
-echo "configure:874: checking whether to try NRL OPIE authentication" >&5
+echo "configure:872: checking whether to try NRL OPIE authentication" >&5
                echo "$ac_t""yes" 1>&6
                AUTH_OBJS="${AUTH_OBJS} rfc1938.o"
                ;;
@@ -890,7 +888,7 @@ if test "${with_long_otp_prompt+set}" = set; then
 EOF
 
                echo $ac_n "checking whether to use a two line prompt for OTP authentication""... $ac_c" 1>&6
-echo "configure:894: checking whether to use a two line prompt for OTP authentication" >&5
+echo "configure:892: checking whether to use a two line prompt for OTP authentication" >&5
                echo "$ac_t""yes" 1>&6
                ;;
     no)                ;;
@@ -911,7 +909,7 @@ if test "${with_SecurID+set}" = set; then
 EOF
 
                echo $ac_n "checking whether to use SecurID for authentication""... $ac_c" 1>&6
-echo "configure:915: checking whether to use SecurID for authentication" >&5
+echo "configure:913: checking whether to use SecurID for authentication" >&5
                echo "$ac_t""yes" 1>&6
                with_passwd=no
                AUTH_OBJS="securid.o"
@@ -929,7 +927,7 @@ if test "${with_fwtk+set}" = set; then
 EOF
 
                echo $ac_n "checking whether to use FWTK AuthSRV for authentication""... $ac_c" 1>&6
-echo "configure:933: checking whether to use FWTK AuthSRV for authentication" >&5
+echo "configure:931: checking whether to use FWTK AuthSRV for authentication" >&5
                echo "$ac_t""yes" 1>&6
                with_passwd=no
                AUTH_OBJS="fwtk.o"
@@ -940,7 +938,7 @@ echo "configure:933: checking whether to use FWTK AuthSRV for authentication" >&
 EOF
 
                echo $ac_n "checking whether to use FWTK AuthSRV for authentication""... $ac_c" 1>&6
-echo "configure:944: checking whether to use FWTK AuthSRV for authentication" >&5
+echo "configure:942: checking whether to use FWTK AuthSRV for authentication" >&5
                echo "$ac_t""yes" 1>&6
                SUDO_LDFLAGS="${SUDO_LDFLAGS} -L${with_fwtk}"
                CPPFLAGS="${CPPFLAGS} -I${with_fwtk}"
@@ -957,7 +955,7 @@ if test "${with_kerb4+set}" = set; then
   withval="$with_kerb4"
   case $with_kerb4 in
     yes)       echo $ac_n "checking whether to try Kerberos 4 authentication""... $ac_c" 1>&6
-echo "configure:961: checking whether to try Kerberos 4 authentication" >&5
+echo "configure:959: checking whether to try Kerberos 4 authentication" >&5
                echo "$ac_t""yes" 1>&6
                ;;
     no)                ;;
@@ -973,7 +971,7 @@ if test "${with_kerb5+set}" = set; then
   withval="$with_kerb5"
   case $with_kerb5 in
     yes)       echo $ac_n "checking whether to try Kerberos 5 authentication""... $ac_c" 1>&6
-echo "configure:977: checking whether to try Kerberos 5 authentication" >&5
+echo "configure:975: checking whether to try Kerberos 5 authentication" >&5
                echo "$ac_t""yes" 1>&6
                ;;
     no)                ;;
@@ -993,7 +991,7 @@ if test "${with_authenticate+set}" = set; then
 EOF
 
                echo $ac_n "checking whether to use AIX general authentication""... $ac_c" 1>&6
-echo "configure:997: checking whether to use AIX general authentication" >&5
+echo "configure:995: checking whether to use AIX general authentication" >&5
                echo "$ac_t""yes" 1>&6
                with_passwd=no
                AUTH_OBJS="aix_auth.o"
@@ -1015,7 +1013,7 @@ if test "${with_pam+set}" = set; then
 EOF
 
                echo $ac_n "checking whether to use PAM authentication""... $ac_c" 1>&6
-echo "configure:1019: checking whether to use PAM authentication" >&5
+echo "configure:1017: checking whether to use PAM authentication" >&5
                echo "$ac_t""yes" 1>&6
                with_passwd=no
                AUTH_OBJS="pam.o"
@@ -1037,7 +1035,7 @@ if test "${with_AFS+set}" = set; then
 EOF
 
                echo $ac_n "checking whether to try AFS (kerberos) authentication""... $ac_c" 1>&6
-echo "configure:1041: checking whether to try AFS (kerberos) authentication" >&5
+echo "configure:1039: checking whether to try AFS (kerberos) authentication" >&5
                echo "$ac_t""yes" 1>&6
                AUTH_OBJS="${AUTH_OBJS} afs.o"
                ;;
@@ -1058,7 +1056,7 @@ if test "${with_DCE+set}" = set; then
 EOF
 
                echo $ac_n "checking whether to try DCE (kerberos) authentication""... $ac_c" 1>&6
-echo "configure:1062: checking whether to try DCE (kerberos) authentication" >&5
+echo "configure:1060: checking whether to try DCE (kerberos) authentication" >&5
                echo "$ac_t""yes" 1>&6
                AUTH_OBJS="${AUTH_OBJS} dce.o"
                ;;
@@ -1071,7 +1069,7 @@ fi
 
 
 echo $ac_n "checking whether to lecture users the first time they run sudo""... $ac_c" 1>&6
-echo "configure:1075: checking whether to lecture users the first time they run sudo" >&5
+echo "configure:1073: checking whether to lecture users the first time they run sudo" >&5
 # Check whether --with-lecture or --without-lecture was given.
 if test "${with_lecture+set}" = set; then
   withval="$with_lecture"
@@ -1094,7 +1092,7 @@ fi
 
 
 echo $ac_n "checking whether sudo should log via syslog or to a file""... $ac_c" 1>&6
-echo "configure:1098: checking whether sudo should log via syslog or to a file" >&5
+echo "configure:1096: checking whether sudo should log via syslog or to a file" >&5
 # Check whether --with-logging or --without-logging was given.
 if test "${with_logging+set}" = set; then
   withval="$with_logging"
@@ -1136,7 +1134,7 @@ fi
 
 
 echo $ac_n "checking which syslog facility sudo should log with""... $ac_c" 1>&6
-echo "configure:1140: checking which syslog facility sudo should log with" >&5
+echo "configure:1138: checking which syslog facility sudo should log with" >&5
 # Check whether --with-logfac or --without-logfac was given.
 if test "${with_logfac+set}" = set; then
   withval="$with_logfac"
@@ -1163,7 +1161,7 @@ fi
 
 
 echo $ac_n "checking at which syslog priority to log commands""... $ac_c" 1>&6
-echo "configure:1167: checking at which syslog priority to log commands" >&5
+echo "configure:1165: checking at which syslog priority to log commands" >&5
 # Check whether --with-goodpri or --without-goodpri was given.
 if test "${with_goodpri+set}" = set; then
   withval="$with_goodpri"
@@ -1190,7 +1188,7 @@ fi
 
 
 echo $ac_n "checking at which syslog priority to log failures""... $ac_c" 1>&6
-echo "configure:1194: checking at which syslog priority to log failures" >&5
+echo "configure:1192: checking at which syslog priority to log failures" >&5
 # Check whether --with-badpri or --without-badpri was given.
 if test "${with_badpri+set}" = set; then
   withval="$with_badpri"
@@ -1231,7 +1229,7 @@ fi
 
 
 echo $ac_n "checking how long a line in the log file should be""... $ac_c" 1>&6
-echo "configure:1235: checking how long a line in the log file should be" >&5
+echo "configure:1233: checking how long a line in the log file should be" >&5
 # Check whether --with-loglen or --without-loglen was given.
 if test "${with_loglen+set}" = set; then
   withval="$with_loglen"
@@ -1261,7 +1259,7 @@ fi
 
 
 echo $ac_n "checking whether sudo should ignore '.' or '' in \$PATH""... $ac_c" 1>&6
-echo "configure:1265: checking whether sudo should ignore '.' or '' in \$PATH" >&5
+echo "configure:1263: checking whether sudo should ignore '.' or '' in \$PATH" >&5
 # Check whether --with-ignore-dot or --without-ignore-dot was given.
 if test "${with_ignore_dot+set}" = set; then
   withval="$with_ignore_dot"
@@ -1284,7 +1282,7 @@ fi
 
 
 echo $ac_n "checking who should get the mail that sudo sends""... $ac_c" 1>&6
-echo "configure:1288: checking who should get the mail that sudo sends" >&5
+echo "configure:1286: checking who should get the mail that sudo sends" >&5
 # Check whether --with-alertmail or --without-alertmail was given.
 if test "${with_alertmail+set}" = set; then
   withval="$with_alertmail"
@@ -1323,7 +1321,7 @@ if test "${with_mailsubject+set}" = set; then
 EOF
 
                echo $ac_n "checking sudo mail subject""... $ac_c" 1>&6
-echo "configure:1327: checking sudo mail subject" >&5
+echo "configure:1325: checking sudo mail subject" >&5
                echo "$ac_t""Using alert mail subject: $with_mailsubject" 1>&6
                ;;
 esac
@@ -1336,7 +1334,7 @@ fi
 
 
 echo $ac_n "checking whether to send mail when a user is not in sudoers""... $ac_c" 1>&6
-echo "configure:1340: checking whether to send mail when a user is not in sudoers" >&5
+echo "configure:1338: checking whether to send mail when a user is not in sudoers" >&5
 # Check whether --with-mail-if-no-user or --without-mail-if-no-user was given.
 if test "${with_mail_if_no_user+set}" = set; then
   withval="$with_mail_if_no_user"
@@ -1362,7 +1360,7 @@ fi
 
 
 echo $ac_n "checking whether to send mail when user listed but not for this host""... $ac_c" 1>&6
-echo "configure:1366: checking whether to send mail when user listed but not for this host" >&5
+echo "configure:1364: checking whether to send mail when user listed but not for this host" >&5
 # Check whether --with-mail-if-no-host or --without-mail-if-no-host was given.
 if test "${with_mail_if_no_host+set}" = set; then
   withval="$with_mail_if_no_host"
@@ -1385,7 +1383,7 @@ fi
 
 
 echo $ac_n "checking whether to send mail when a user tries a disallowed command""... $ac_c" 1>&6
-echo "configure:1389: checking whether to send mail when a user tries a disallowed command" >&5
+echo "configure:1387: checking whether to send mail when a user tries a disallowed command" >&5
 # Check whether --with-mail-if-noperms or --without-mail-if-noperms was given.
 if test "${with_mail_if_noperms+set}" = set; then
   withval="$with_mail_if_noperms"
@@ -1408,7 +1406,7 @@ fi
 
 
 echo $ac_n "checking for bad password prompt""... $ac_c" 1>&6
-echo "configure:1412: checking for bad password prompt" >&5
+echo "configure:1410: checking for bad password prompt" >&5
 # Check whether --with-passprompt or --without-passprompt was given.
 if test "${with_passprompt+set}" = set; then
   withval="$with_passprompt"
@@ -1434,7 +1432,7 @@ fi
 
 
 echo $ac_n "checking for bad password message""... $ac_c" 1>&6
-echo "configure:1438: checking for bad password message" >&5
+echo "configure:1436: checking for bad password message" >&5
 # Check whether --with-badpass-message or --without-badpass-message was given.
 if test "${with_badpass_message+set}" = set; then
   withval="$with_badpass_message"
@@ -1460,7 +1458,7 @@ fi
 
 
 echo $ac_n "checking whether to expect fully qualified hosts in sudoers""... $ac_c" 1>&6
-echo "configure:1464: checking whether to expect fully qualified hosts in sudoers" >&5
+echo "configure:1462: checking whether to expect fully qualified hosts in sudoers" >&5
 # Check whether --with-fqdn or --without-fqdn was given.
 if test "${with_fqdn+set}" = set; then
   withval="$with_fqdn"
@@ -1570,7 +1568,7 @@ fi
 
 
 echo $ac_n "checking for umask programs should be run with""... $ac_c" 1>&6
-echo "configure:1574: checking for umask programs should be run with" >&5
+echo "configure:1572: checking for umask programs should be run with" >&5
 # Check whether --with-umask or --without-umask was given.
 if test "${with_umask+set}" = set; then
   withval="$with_umask"
@@ -1599,7 +1597,7 @@ fi
 
 
 echo $ac_n "checking for default user to run commands as""... $ac_c" 1>&6
-echo "configure:1603: checking for default user to run commands as" >&5
+echo "configure:1601: checking for default user to run commands as" >&5
 # Check whether --with-runas-default or --without-runas-default was given.
 if test "${with_runas_default+set}" = set; then
   withval="$with_runas_default"
@@ -1640,7 +1638,7 @@ if test "${with_exempt+set}" = set; then
 EOF
 
                echo $ac_n "checking for group to be exempt from password""... $ac_c" 1>&6
-echo "configure:1644: checking for group to be exempt from password" >&5
+echo "configure:1642: checking for group to be exempt from password" >&5
                echo "$ac_t""$with_exempt" 1>&6
                ;;
 esac
@@ -1648,7 +1646,7 @@ fi
 
 
 echo $ac_n "checking for editor that visudo should use""... $ac_c" 1>&6
-echo "configure:1652: checking for editor that visudo should use" >&5
+echo "configure:1650: checking for editor that visudo should use" >&5
 # Check whether --with-editor or --without-editor was given.
 if test "${with_editor+set}" = set; then
   withval="$with_editor"
@@ -1675,7 +1673,7 @@ fi
 
 
 echo $ac_n "checking whether to obey EDITOR and VISUAL environment variables""... $ac_c" 1>&6
-echo "configure:1679: checking whether to obey EDITOR and VISUAL environment variables" >&5
+echo "configure:1677: checking whether to obey EDITOR and VISUAL environment variables" >&5
 # Check whether --with-env-editor or --without-env-editor was given.
 if test "${with_env_editor+set}" = set; then
   withval="$with_env_editor"
@@ -1698,7 +1696,7 @@ fi
 
 
 echo $ac_n "checking number of tries a user gets to enter their password""... $ac_c" 1>&6
-echo "configure:1702: checking number of tries a user gets to enter their password" >&5
+echo "configure:1700: checking number of tries a user gets to enter their password" >&5
 # Check whether --with-passwd-tries or --without-passwd-tries was given.
 if test "${with_passwd_tries+set}" = set; then
   withval="$with_passwd_tries"
@@ -1731,7 +1729,7 @@ fi
 
 
 echo $ac_n "checking time in minutes after which sudo will ask for a password again""... $ac_c" 1>&6
-echo "configure:1735: checking time in minutes after which sudo will ask for a password again" >&5
+echo "configure:1733: checking time in minutes after which sudo will ask for a password again" >&5
 # Check whether --with-timeout or --without-timeout was given.
 if test "${with_timeout+set}" = set; then
   withval="$with_timeout"
@@ -1767,7 +1765,7 @@ fi
 
 
 echo $ac_n "checking time in minutes after the password prompt will time out""... $ac_c" 1>&6
-echo "configure:1771: checking time in minutes after the password prompt will time out" >&5
+echo "configure:1769: checking time in minutes after the password prompt will time out" >&5
 # Check whether --with-password-timeout or --without-password-timeout was given.
 if test "${with_password_timeout+set}" = set; then
   withval="$with_password_timeout"
@@ -1803,7 +1801,7 @@ fi
 
 
 echo $ac_n "checking whether to use execvp or execv""... $ac_c" 1>&6
-echo "configure:1807: checking whether to use execvp or execv" >&5
+echo "configure:1805: checking whether to use execvp or execv" >&5
 # Check whether --with-execv or --without-execv was given.
 if test "${with_execv+set}" = set; then
   withval="$with_execv"
@@ -1826,7 +1824,7 @@ fi
 
 
 echo $ac_n "checking whether to use per-tty ticket files""... $ac_c" 1>&6
-echo "configure:1830: checking whether to use per-tty ticket files" >&5
+echo "configure:1828: checking whether to use per-tty ticket files" >&5
 # Check whether --with-tty-tickets or --without-tty-tickets was given.
 if test "${with_tty_tickets+set}" = set; then
   withval="$with_tty_tickets"
@@ -1849,7 +1847,7 @@ fi
 
 
 echo $ac_n "checking whether to include insults""... $ac_c" 1>&6
-echo "configure:1853: checking whether to include insults" >&5
+echo "configure:1851: checking whether to include insults" >&5
 # Check whether --with-insults or --without-insults was given.
 if test "${with_insults+set}" = set; then
   withval="$with_insults"
@@ -1960,7 +1958,7 @@ fi
 
 if test "$with_insults" = "yes"; then
     echo $ac_n "checking which insult sets to include""... $ac_c" 1>&6
-echo "configure:1964: checking which insult sets to include" >&5
+echo "configure:1962: checking which insult sets to include" >&5
     i=""
     test "$with_goons_insults" = "yes" && i="goons ${i}"
     test "$with_hal_insults" = "yes" && i="hal ${i}"
@@ -1970,7 +1968,7 @@ echo "configure:1964: checking which insult sets to include" >&5
 fi
 
 echo $ac_n "checking whether to override the user's path""... $ac_c" 1>&6
-echo "configure:1974: checking whether to override the user's path" >&5
+echo "configure:1972: checking whether to override the user's path" >&5
 # Check whether --with-secure-path or --without-secure-path was given.
 if test "${with_secure_path+set}" = set; then
   withval="$with_secure_path"
@@ -1996,7 +1994,7 @@ fi
 
 
 echo $ac_n "checking whether to get ip addresses from the network interfaces""... $ac_c" 1>&6
-echo "configure:2000: checking whether to get ip addresses from the network interfaces" >&5
+echo "configure:1998: checking whether to get ip addresses from the network interfaces" >&5
 # Check whether --with-interfaces or --without-interfaces was given.
 if test "${with_interfaces+set}" = set; then
   withval="$with_interfaces"
@@ -2020,7 +2018,7 @@ fi
 
 
 echo $ac_n "checking whether to do user authentication by default""... $ac_c" 1>&6
-echo "configure:2024: checking whether to do user authentication by default" >&5
+echo "configure:2022: checking whether to do user authentication by default" >&5
 # Check whether --enable-authentication or --disable-authentication was given.
 if test "${enable_authentication+set}" = set; then
   enableval="$enable_authentication"
@@ -2044,7 +2042,7 @@ fi
 
 
 echo $ac_n "checking whether to disable shadow password support""... $ac_c" 1>&6
-echo "configure:2048: checking whether to disable shadow password support" >&5
+echo "configure:2046: checking whether to disable shadow password support" >&5
 # Check whether --enable-shadow or --disable-shadow was given.
 if test "${enable_shadow+set}" = set; then
   enableval="$enable_shadow"
@@ -2065,7 +2063,7 @@ fi
 
 
 echo $ac_n "checking whether root should be allowed to use sudo""... $ac_c" 1>&6
-echo "configure:2069: checking whether root should be allowed to use sudo" >&5
+echo "configure:2067: checking whether root should be allowed to use sudo" >&5
 # Check whether --enable-root-sudo or --disable-root-sudo was given.
 if test "${enable_root_sudo+set}" = set; then
   enableval="$enable_root_sudo"
@@ -2089,7 +2087,7 @@ fi
 
 
 echo $ac_n "checking whether to log the hostname in the log file""... $ac_c" 1>&6
-echo "configure:2093: checking whether to log the hostname in the log file" >&5
+echo "configure:2091: checking whether to log the hostname in the log file" >&5
 # Check whether --enable-log-host or --disable-log-host was given.
 if test "${enable_log_host+set}" = set; then
   enableval="$enable_log_host"
@@ -2112,41 +2110,8 @@ else
 fi
 
 
-echo $ac_n "checking whether to wrap long lines in the log file""... $ac_c" 1>&6
-echo "configure:2117: checking whether to wrap long lines in the log file" >&5
-# Check whether --enable-log-wrap or --disable-log-wrap was given.
-if test "${enable_log_wrap+set}" = set; then
-  enableval="$enable_log_wrap"
-   case "$enableval" in
-    yes)       echo "$ac_t""yes" 1>&6
-               cat >> confdefs.h <<\EOF
-#define WRAP_LOG 1
-EOF
-
-               ;;
-    no)                echo "$ac_t""no" 1>&6
-               ;;
-    *)         echo "$ac_t""yes" 1>&6
-               cat >> confdefs.h <<\EOF
-#define WRAP_LOG 1
-EOF
-
-               echo "Ignoring unknown argument to --enable-log-wrap: $enableval"
-               ;;
-  esac
-
-else
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define WRAP_LOG 1
-EOF
-
-
-fi
-
-
 echo $ac_n "checking whether to invoke a shell if sudo is given no arguments""... $ac_c" 1>&6
-echo "configure:2150: checking whether to invoke a shell if sudo is given no arguments" >&5
+echo "configure:2115: checking whether to invoke a shell if sudo is given no arguments" >&5
 # Check whether --enable-noargs-shell or --disable-noargs-shell was given.
 if test "${enable_noargs_shell+set}" = set; then
   enableval="$enable_noargs_shell"
@@ -2170,7 +2135,7 @@ fi
 
 
 echo $ac_n "checking whether to set \$HOME to target user in shell mode""... $ac_c" 1>&6
-echo "configure:2174: checking whether to set \$HOME to target user in shell mode" >&5
+echo "configure:2139: checking whether to set \$HOME to target user in shell mode" >&5
 # Check whether --enable-shell-sets-home or --disable-shell-sets-home was given.
 if test "${enable_shell_sets_home+set}" = set; then
   enableval="$enable_shell_sets_home"
@@ -2194,7 +2159,7 @@ fi
 
 
 echo $ac_n "checking whether to disable 'command not found' messages""... $ac_c" 1>&6
-echo "configure:2198: checking whether to disable 'command not found' messages" >&5
+echo "configure:2163: checking whether to disable 'command not found' messages" >&5
 # Check whether --enable-path_info or --disable-path_info was given.
 if test "${enable_path_info+set}" = set; then
   enableval="$enable_path_info"
@@ -2220,7 +2185,7 @@ fi
 # Extract the first word of "egrep", so it can be a program name with args.
 set dummy egrep; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2224: checking for $ac_word" >&5
+echo "configure:2189: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_EGREPPROG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2255,7 +2220,7 @@ cross_compiling="no"
 # 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
-echo "configure:2259: checking for $ac_word" >&5
+echo "configure:2224: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2284,7 +2249,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2288: checking for $ac_word" >&5
+echo "configure:2253: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2332,7 +2297,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2336: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2301: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2342,11 +2307,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 2346 "configure"
+#line 2311 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -2366,12 +2331,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2370: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2335: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2375: checking whether we are using GNU C" >&5
+echo "configure:2340: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2380,7 +2345,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -2395,7 +2360,7 @@ if test $ac_cv_prog_gcc = yes; then
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2399: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2364: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2425,7 +2390,7 @@ fi
 ac_cv_prog_cc_cross="no"
 cross_compiling="no"
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2429: checking how to run the C preprocessor" >&5
+echo "configure:2394: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2440,13 +2405,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 2444 "configure"
+#line 2409 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -2457,13 +2422,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2461 "configure"
+#line 2426 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -2486,7 +2451,7 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:2490: checking for POSIXized ISC" >&5
+echo "configure:2455: checking for POSIXized ISC" >&5
 if test -d /etc/conf/kconfig.d &&
   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
 then
@@ -2514,7 +2479,7 @@ fi
 # 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
-echo "configure:2518: checking for $ac_word" >&5
+echo "configure:2483: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_UNAMEPROG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2542,7 +2507,7 @@ fi
 # 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
-echo "configure:2546: checking for $ac_word" >&5
+echo "configure:2511: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_TRPROG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2570,7 +2535,7 @@ fi
 # 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
-echo "configure:2574: checking for $ac_word" >&5
+echo "configure:2539: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_SEDPROG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2598,7 +2563,7 @@ fi
 # 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
-echo "configure:2602: checking for $ac_word" >&5
+echo "configure:2567: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_NROFFPROG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2653,7 +2618,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:2657: checking host system type" >&5
+echo "configure:2622: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -2682,7 +2647,7 @@ if test -n "$sudo_cv_prev_host"; then
        exit 1
     else
        echo $ac_n "checking previous host type""... $ac_c" 1>&6
-echo "configure:2686: checking previous host type" >&5
+echo "configure:2651: checking previous host type" >&5
        if eval "test \"`echo '$''{'sudo_cv_prev_host'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2722,12 +2687,12 @@ case "$host" in
                # check for password adjunct functions (shadow passwords)
                if test "$CHECKSHADOW" = "true"; then
                    echo $ac_n "checking for getpwanam""... $ac_c" 1>&6
-echo "configure:2726: checking for getpwanam" >&5
+echo "configure:2691: checking for getpwanam" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getpwanam'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2731 "configure"
+#line 2696 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getpwanam(); below.  */
@@ -2750,7 +2715,7 @@ getpwanam();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_getpwanam=yes"
 else
@@ -2770,12 +2735,12 @@ EOF
  for ac_func in issecure
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2774: checking for $ac_func" >&5
+echo "configure:2739: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2779 "configure"
+#line 2744 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2798,7 +2763,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2849,7 +2814,7 @@ EOF
     *-*-hiuxmpp*)
                if test "$CHECKSHADOW" = "true"; then
                    echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
-echo "configure:2853: checking for getprpwnam in -lsec" >&5
+echo "configure:2818: checking for getprpwnam in -lsec" >&5
 if test -n ""; then
   ac_lib_var=`echo sec'_'getprpwnam | sed 'y% ./+-%___p_%'`
 else
@@ -2861,7 +2826,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2865 "configure"
+#line 2830 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2872,7 +2837,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:2876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2894,7 +2859,7 @@ EOF
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:2898: checking for getprpwnam in -lsecurity" >&5
+echo "configure:2863: checking for getprpwnam in -lsecurity" >&5
 if test -n ""; then
   ac_lib_var=`echo security'_'getprpwnam | sed 'y% ./+-%___p_%'`
 else
@@ -2906,7 +2871,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2910 "configure"
+#line 2875 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2917,7 +2882,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2952,7 +2917,7 @@ fi
 
                if test "$CHECKSHADOW" = "true"; then
                    echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
-echo "configure:2956: checking for getprpwnam in -lsec" >&5
+echo "configure:2921: checking for getprpwnam in -lsec" >&5
 if test -n ""; then
   ac_lib_var=`echo sec'_'getprpwnam | sed 'y% ./+-%___p_%'`
 else
@@ -2964,7 +2929,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2968 "configure"
+#line 2933 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2975,7 +2940,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:2979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2994,7 +2959,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 #define HAVE_GETPRPWNAM 1
 EOF
  echo $ac_n "checking for iscomsec in -lsec""... $ac_c" 1>&6
-echo "configure:2998: checking for iscomsec in -lsec" >&5
+echo "configure:2963: checking for iscomsec in -lsec" >&5
 if test -n ""; then
   ac_lib_var=`echo sec'_'iscomsec | sed 'y% ./+-%___p_%'`
 else
@@ -3006,7 +2971,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3010 "configure"
+#line 2975 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3017,7 +2982,7 @@ int main() {
 iscomsec()
 ; return 0; }
 EOF
-if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3083,12 +3048,12 @@ EOF
                    for ac_func in getspwuid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3087: checking for $ac_func" >&5
+echo "configure:3052: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3092 "configure"
+#line 3057 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3111,7 +3076,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3188,7 +3153,7 @@ EOF
                SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-no_library_replacement"
 
                echo $ac_n "checking whether to disable sia support on Digital UNIX""... $ac_c" 1>&6
-echo "configure:3192: checking whether to disable sia support on Digital UNIX" >&5
+echo "configure:3157: checking whether to disable sia support on Digital UNIX" >&5
                # Check whether --enable-sia or --disable-sia was given.
 if test "${enable_sia+set}" = set; then
   enableval="$enable_sia"
@@ -3212,12 +3177,12 @@ fi
                # unless overridden on the command line
                if test "$CHECKSIA" = "true"; then
                    echo $ac_n "checking for sia_ses_init""... $ac_c" 1>&6
-echo "configure:3216: checking for sia_ses_init" >&5
+echo "configure:3181: checking for sia_ses_init" >&5
 if eval "test \"`echo '$''{'ac_cv_func_sia_ses_init'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3221 "configure"
+#line 3186 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char sia_ses_init(); below.  */
@@ -3240,7 +3205,7 @@ sia_ses_init();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_sia_ses_init=yes"
 else
@@ -3269,7 +3234,7 @@ fi
                fi
                if test "$CHECKSHADOW" = "true"; then
                    echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:3273: checking for getprpwnam in -lsecurity" >&5
+echo "configure:3238: checking for getprpwnam in -lsecurity" >&5
 if test -n ""; then
   ac_lib_var=`echo security'_'getprpwnam | sed 'y% ./+-%___p_%'`
 else
@@ -3281,7 +3246,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3285 "configure"
+#line 3250 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3292,7 +3257,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:3296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3322,12 +3287,12 @@ EOF
 
                    # -ldb includes bogus versions of snprintf/vsnprintf
                    echo $ac_n "checking for snprintf""... $ac_c" 1>&6
-echo "configure:3326: checking for snprintf" >&5
+echo "configure:3291: checking for snprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3331 "configure"
+#line 3296 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char snprintf(); below.  */
@@ -3350,7 +3315,7 @@ snprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_snprintf=yes"
 else
@@ -3374,12 +3339,12 @@ NEED_SNPRINTF=1
 fi
 
                    echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
-echo "configure:3378: checking for vsnprintf" >&5
+echo "configure:3343: checking for vsnprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3383 "configure"
+#line 3348 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vsnprintf(); below.  */
@@ -3402,7 +3367,7 @@ vsnprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_vsnprintf=yes"
 else
@@ -3427,7 +3392,7 @@ fi
 
                    # 4.x and higher need -ldb too...
                    echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
-echo "configure:3431: checking for dbopen in -ldb" >&5
+echo "configure:3396: checking for dbopen in -ldb" >&5
 if test -n ""; then
   ac_lib_var=`echo db'_'dbopen | sed 'y% ./+-%___p_%'`
 else
@@ -3439,7 +3404,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldb  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3443 "configure"
+#line 3408 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3450,7 +3415,7 @@ int main() {
 dbopen()
 ; return 0; }
 EOF
-if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3474,12 +3439,12 @@ fi
                    for ac_func in dispcrypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3478: checking for $ac_func" >&5
+echo "configure:3443: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3483 "configure"
+#line 3448 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3502,7 +3467,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3527,9 +3492,9 @@ fi
 done
 
                    echo $ac_n "checking for broken /usr/include/prot.h""... $ac_c" 1>&6
-echo "configure:3531: checking for broken /usr/include/prot.h" >&5
+echo "configure:3496: checking for broken /usr/include/prot.h" >&5
                    cat > conftest.$ac_ext <<EOF
-#line 3533 "configure"
+#line 3498 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -3540,7 +3505,7 @@ int main() {
 exit(0);
 ; return 0; }
 EOF
-if { (eval echo configure:3544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""no" 1>&6
 else
@@ -3586,7 +3551,7 @@ EOF
                # IRIX <= 4 needs -lsun
                if test "$OSREV" -le 4; then
                    echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
-echo "configure:3590: checking for getpwnam in -lsun" >&5
+echo "configure:3555: checking for getpwnam in -lsun" >&5
 if test -n ""; then
   ac_lib_var=`echo sun'_'getpwnam | sed 'y% ./+-%___p_%'`
 else
@@ -3598,7 +3563,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsun  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3602 "configure"
+#line 3567 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3609,7 +3574,7 @@ int main() {
 getpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3641,12 +3606,12 @@ EOF
                # Some Linux versions need to link with -lshadow
                if test "$CHECKSHADOW" = "true"; then
                    echo $ac_n "checking for getspnam""... $ac_c" 1>&6
-echo "configure:3645: checking for getspnam" >&5
+echo "configure:3610: checking for getspnam" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getspnam'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3650 "configure"
+#line 3615 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getspnam(); below.  */
@@ -3669,7 +3634,7 @@ getspnam();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_getspnam=yes"
 else
@@ -3690,7 +3655,7 @@ EOF
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for getspnam in -lshadow""... $ac_c" 1>&6
-echo "configure:3694: checking for getspnam in -lshadow" >&5
+echo "configure:3659: checking for getspnam in -lshadow" >&5
 if test -n ""; then
   ac_lib_var=`echo shadow'_'getspnam | sed 'y% ./+-%___p_%'`
 else
@@ -3702,7 +3667,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lshadow  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3706 "configure"
+#line 3671 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3713,7 +3678,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:3717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3752,7 +3717,7 @@ EOF
 
                if test "$CHECKSHADOW" = "true"; then
                    echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
-echo "configure:3756: checking for getprpwnam in -lsec" >&5
+echo "configure:3721: checking for getprpwnam in -lsec" >&5
 if test -n ""; then
   ac_lib_var=`echo sec'_'getprpwnam | sed 'y% ./+-%___p_%'`
 else
@@ -3764,7 +3729,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3768 "configure"
+#line 3733 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3775,7 +3740,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3805,7 +3770,7 @@ fi
                OS="ultrix"
                if test "$CHECKSHADOW" = "true"; then
                    echo $ac_n "checking for getauthuid in -lauth""... $ac_c" 1>&6
-echo "configure:3809: checking for getauthuid in -lauth" >&5
+echo "configure:3774: checking for getauthuid in -lauth" >&5
 if test -n ""; then
   ac_lib_var=`echo auth'_'getauthuid | sed 'y% ./+-%___p_%'`
 else
@@ -3817,7 +3782,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lauth  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3821 "configure"
+#line 3786 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3828,7 +3793,7 @@ int main() {
 getauthuid()
 ; return 0; }
 EOF
-if { (eval echo configure:3832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3867,7 +3832,7 @@ fi
 
                if test "$CHECKSHADOW" = "true"; then
                    echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
-echo "configure:3871: checking for getspnam in -lsec" >&5
+echo "configure:3836: checking for getspnam in -lsec" >&5
 if test -n ""; then
   ac_lib_var=`echo sec'_'getspnam | sed 'y% ./+-%___p_%'`
 else
@@ -3879,7 +3844,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3883 "configure"
+#line 3848 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3890,7 +3855,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:3894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3919,7 +3884,7 @@ fi
     *-*-sco*)
                if test "$CHECKSHADOW" = "true"; then
                    echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
-echo "configure:3923: checking for getprpwnam in -lprot" >&5
+echo "configure:3888: checking for getprpwnam in -lprot" >&5
 if test -n "-lx"; then
   ac_lib_var=`echo prot'_'getprpwnam-lx | sed 'y% ./+-%___p_%'`
 else
@@ -3931,7 +3896,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lprot -lx $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3935 "configure"
+#line 3900 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3942,7 +3907,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:3946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3966,7 +3931,7 @@ else
 fi
 
                    echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:3970: checking for getspnam in -lgen" >&5
+echo "configure:3935: checking for getspnam in -lgen" >&5
 if test -n ""; then
   ac_lib_var=`echo gen'_'getspnam | sed 'y% ./+-%___p_%'`
 else
@@ -3978,7 +3943,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3982 "configure"
+#line 3947 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3989,7 +3954,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4018,7 +3983,7 @@ fi
     *-sequent-sysv*)
                if test "$CHECKSHADOW" = "true"; then
                    echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
-echo "configure:4022: checking for getspnam in -lsec" >&5
+echo "configure:3987: checking for getspnam in -lsec" >&5
 if test -n ""; then
   ac_lib_var=`echo sec'_'getspnam | sed 'y% ./+-%___p_%'`
 else
@@ -4030,7 +3995,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4034 "configure"
+#line 3999 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4041,7 +4006,7 @@ int main() {
 getspnam()
 ; return 0; }
 EOF
-if { (eval echo configure:4045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4089,12 +4054,12 @@ esac
 
 if test "$CHECKSHADOW" = "true"; then
     echo $ac_n "checking for getspnam""... $ac_c" 1>&6
-echo "configure:4093: checking for getspnam" >&5
+echo "configure:4058: checking for getspnam" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getspnam'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4098 "configure"
+#line 4063 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getspnam(); below.  */
@@ -4117,7 +4082,7 @@ getspnam();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_getspnam=yes"
 else
@@ -4142,12 +4107,12 @@ fi
 fi
 if test "$CHECKSHADOW" = "true"; then
     echo $ac_n "checking for getprpwnam""... $ac_c" 1>&6
-echo "configure:4146: checking for getprpwnam" >&5
+echo "configure:4111: checking for getprpwnam" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getprpwnam'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4151 "configure"
+#line 4116 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getprpwnam(); below.  */
@@ -4170,7 +4135,7 @@ getprpwnam();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_getprpwnam=yes"
 else
@@ -4191,7 +4156,7 @@ EOF
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
-echo "configure:4195: checking for getprpwnam in -lsec" >&5
+echo "configure:4160: checking for getprpwnam in -lsec" >&5
 if test -n ""; then
   ac_lib_var=`echo sec'_'getprpwnam | sed 'y% ./+-%___p_%'`
 else
@@ -4203,7 +4168,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4207 "configure"
+#line 4172 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4214,7 +4179,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4236,7 +4201,7 @@ EOF
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:4240: checking for getprpwnam in -lsecurity" >&5
+echo "configure:4205: checking for getprpwnam in -lsecurity" >&5
 if test -n ""; then
   ac_lib_var=`echo security'_'getprpwnam | sed 'y% ./+-%___p_%'`
 else
@@ -4248,7 +4213,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsecurity  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4252 "configure"
+#line 4217 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4259,7 +4224,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:4263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4281,7 +4246,7 @@ EOF
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
-echo "configure:4285: checking for getprpwnam in -lprot" >&5
+echo "configure:4250: checking for getprpwnam in -lprot" >&5
 if test -n ""; then
   ac_lib_var=`echo prot'_'getprpwnam | sed 'y% ./+-%___p_%'`
 else
@@ -4293,7 +4258,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lprot  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4297 "configure"
+#line 4262 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4304,7 +4269,7 @@ int main() {
 getprpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4337,13 +4302,13 @@ fi
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:4341: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4306: checking whether ${CC-cc} needs -traditional" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     ac_pattern="Autoconf.*'x'"
   cat > conftest.$ac_ext <<EOF
-#line 4347 "configure"
+#line 4312 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
@@ -4361,7 +4326,7 @@ rm -f conftest*
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 4365 "configure"
+#line 4330 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
@@ -4383,12 +4348,12 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:4387: checking for working const" >&5
+echo "configure:4352: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4392 "configure"
+#line 4357 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -4437,7 +4402,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:4441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -4462,7 +4427,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4466: checking for $ac_word" >&5
+echo "configure:4431: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4493,7 +4458,7 @@ test -n "$YACC" || YACC="yacc"
 
 if test -z "$with_sendmail"; then
     echo $ac_n "checking for sendmail""... $ac_c" 1>&6
-echo "configure:4497: checking for sendmail" >&5
+echo "configure:4462: checking for sendmail" >&5
 if test -f "/usr/sbin/sendmail"; then
     echo "$ac_t""/usr/sbin/sendmail" 1>&6
     cat >> confdefs.h <<\EOF
@@ -4536,7 +4501,7 @@ fi
 
 fi
 echo $ac_n "checking for mv""... $ac_c" 1>&6
-echo "configure:4540: checking for mv" >&5
+echo "configure:4505: checking for mv" >&5
 if test -f "/usr/bin/mv"; then
     echo "$ac_t""/usr/bin/mv" 1>&6
     cat >> confdefs.h <<\EOF
@@ -4566,7 +4531,7 @@ else
 fi
 
 echo $ac_n "checking for bourne shell""... $ac_c" 1>&6
-echo "configure:4570: checking for bourne shell" >&5
+echo "configure:4535: checking for bourne shell" >&5
 if test -f "/bin/sh"; then
     echo "$ac_t""/bin/sh" 1>&6
     cat >> confdefs.h <<\EOF
@@ -4620,7 +4585,7 @@ else
 fi
 
 echo $ac_n "checking for vi""... $ac_c" 1>&6
-echo "configure:4624: checking for vi" >&5
+echo "configure:4589: checking for vi" >&5
 if test -f "/usr/bin/vi"; then
     echo "$ac_t""/usr/bin/vi" 1>&6
     cat >> confdefs.h <<\EOF
@@ -4656,12 +4621,12 @@ else
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:4660: checking for ANSI C header files" >&5
+echo "configure:4625: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4665 "configure"
+#line 4630 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -4669,7 +4634,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4686,7 +4651,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
+#line 4655 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -4704,7 +4669,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 4708 "configure"
+#line 4673 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -4725,7 +4690,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 4729 "configure"
+#line 4694 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -4736,7 +4701,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -4764,12 +4729,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4768: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4733: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4773 "configure"
+#line 4738 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -4777,7 +4742,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:4781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -4802,7 +4767,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4806: checking for opendir in -ldir" >&5
+echo "configure:4771: checking for opendir in -ldir" >&5
 if test -n ""; then
   ac_lib_var=`echo dir'_'opendir | sed 'y% ./+-%___p_%'`
 else
@@ -4814,7 +4779,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4818 "configure"
+#line 4783 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4825,7 +4790,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4847,7 +4812,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4851: checking for opendir in -lx" >&5
+echo "configure:4816: checking for opendir in -lx" >&5
 if test -n ""; then
   ac_lib_var=`echo x'_'opendir | sed 'y% ./+-%___p_%'`
 else
@@ -4859,7 +4824,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4863 "configure"
+#line 4828 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4870,7 +4835,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:4874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4896,17 +4861,17 @@ for ac_hdr in string.h strings.h unistd.h malloc.h paths.h utime.h fnmatch.h net
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4900: checking for $ac_hdr" >&5
+echo "configure:4865: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4905 "configure"
+#line 4870 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4937,17 +4902,17 @@ if test "$OS" != "ultrix"; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4941: checking for $ac_hdr" >&5
+echo "configure:4906: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4946 "configure"
+#line 4911 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4977,17 +4942,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4981: checking for $ac_hdr" >&5
+echo "configure:4946: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4986 "configure"
+#line 4951 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5010,12 +4975,12 @@ EOF
  for ac_func in tcgetattr
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5014: checking for $ac_func" >&5
+echo "configure:4979: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5019 "configure"
+#line 4984 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5038,7 +5003,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5069,12 +5034,12 @@ done
 
 fi
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:5073: checking for mode_t" >&5
+echo "configure:5038: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5078 "configure"
+#line 5043 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -5102,12 +5067,12 @@ EOF
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5106: checking for uid_t in sys/types.h" >&5
+echo "configure:5071: checking for uid_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5111 "configure"
+#line 5076 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -5136,12 +5101,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:5140: checking for size_t" >&5
+echo "configure:5105: checking for size_t" >&5
 if eval "test \"`echo '$''{'sudo_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5145 "configure"
+#line 5110 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -5171,12 +5136,12 @@ EOF
 fi
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:5175: checking for ssize_t" >&5
+echo "configure:5140: checking for ssize_t" >&5
 if eval "test \"`echo '$''{'sudo_cv_type_ssize_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5180 "configure"
+#line 5145 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -5206,12 +5171,12 @@ EOF
 fi
 
 echo $ac_n "checking for dev_t""... $ac_c" 1>&6
-echo "configure:5210: checking for dev_t" >&5
+echo "configure:5175: checking for dev_t" >&5
 if eval "test \"`echo '$''{'sudo_cv_type_dev_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5215 "configure"
+#line 5180 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -5241,12 +5206,12 @@ EOF
 fi
 
 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
-echo "configure:5245: checking for ino_t" >&5
+echo "configure:5210: checking for ino_t" >&5
 if eval "test \"`echo '$''{'sudo_cv_type_ino_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5250 "configure"
+#line 5215 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -5276,9 +5241,9 @@ EOF
 fi
 
 echo $ac_n "checking for full void implementation""... $ac_c" 1>&6
-echo "configure:5280: checking for full void implementation" >&5
+echo "configure:5245: checking for full void implementation" >&5
 cat > conftest.$ac_ext <<EOF
-#line 5282 "configure"
+#line 5247 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -5286,7 +5251,7 @@ void *foo;
 foo = (void *)0; (void *)"test";
 ; return 0; }
 EOF
-if { (eval echo configure:5290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define VOID void
@@ -5306,7 +5271,7 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking max length of uid_t""... $ac_c" 1>&6
-echo "configure:5310: checking max length of uid_t" >&5
+echo "configure:5275: checking max length of uid_t" >&5
 if eval "test \"`echo '$''{'sudo_cv_uid_t_len'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5315,7 +5280,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 5319 "configure"
+#line 5284 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <pwd.h>
@@ -5336,7 +5301,7 @@ main() {
   exit(0);
 }
 EOF
-if { (eval echo configure:5340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   sudo_cv_uid_t_len=`cat conftestdata`
 else
@@ -5359,16 +5324,16 @@ EOF
 
 
 echo $ac_n "checking for long long support""... $ac_c" 1>&6
-echo "configure:5363: checking for long long support" >&5
+echo "configure:5328: checking for long long support" >&5
 cat > conftest.$ac_ext <<EOF
-#line 5365 "configure"
+#line 5330 "configure"
 #include "confdefs.h"
 
 int main() {
 long long foo = 1000; foo /= 10;
 ; return 0; }
 EOF
-if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define HAVE_LONG_LONG 1
@@ -5378,11 +5343,11 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 5382 "configure"
+#line 5347 "configure"
 #include "confdefs.h"
 main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);}
 EOF
-if { (eval echo configure:5386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   cat >> confdefs.h <<\EOF
 #define LONG_IS_QUAD 1
@@ -5404,7 +5369,7 @@ else
 fi
 rm -f conftest*
 echo $ac_n "checking for sa_len field in struct sockaddr""... $ac_c" 1>&6
-echo "configure:5408: checking for sa_len field in struct sockaddr" >&5
+echo "configure:5373: checking for sa_len field in struct sockaddr" >&5
 if eval "test \"`echo '$''{'sudo_cv_sock_sa_len'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5412,7 +5377,7 @@ else
   sudo_cv_sock_sa_len=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 5416 "configure"
+#line 5381 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -5422,7 +5387,7 @@ s.sa_len = 0;
 exit(0);
 }
 EOF
-if { (eval echo configure:5426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   sudo_cv_sock_sa_len=yes
 else
@@ -5447,12 +5412,12 @@ fi
 case "$DEFS" in
     *"RETSIGTYPE"*)    ;;
     *)                 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:5451: checking return type of signal handlers" >&5
+echo "configure:5416: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5456 "configure"
+#line 5421 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -5469,7 +5434,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:5473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -5491,12 +5456,12 @@ esac
 for ac_func in strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid ftruncate
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5495: checking for $ac_func" >&5
+echo "configure:5460: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5500 "configure"
+#line 5465 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5519,7 +5484,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5547,12 +5512,12 @@ if test -n "$SECUREWARE"; then
     for ac_func in bigcrypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5551: checking for $ac_func" >&5
+echo "configure:5516: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5556 "configure"
+#line 5521 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5575,7 +5540,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5602,12 +5567,12 @@ done
     for ac_func in set_auth_parameters
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5606: checking for $ac_func" >&5
+echo "configure:5571: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5611 "configure"
+#line 5576 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5630,7 +5595,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5657,12 +5622,12 @@ done
     for ac_func in initprivs
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5661: checking for $ac_func" >&5
+echo "configure:5626: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5666 "configure"
+#line 5631 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5685,7 +5650,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5712,12 +5677,12 @@ done
 fi
 if test -z "$BROKEN_GETCWD"; then
     echo $ac_n "checking for getcwd""... $ac_c" 1>&6
-echo "configure:5716: checking for getcwd" >&5
+echo "configure:5681: checking for getcwd" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getcwd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5721 "configure"
+#line 5686 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getcwd(); below.  */
@@ -5740,7 +5705,7 @@ getcwd();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_getcwd=yes"
 else
@@ -5765,12 +5730,12 @@ fi
 
 fi
 echo $ac_n "checking for lockf""... $ac_c" 1>&6
-echo "configure:5769: checking for lockf" >&5
+echo "configure:5734: checking for lockf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_lockf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5774 "configure"
+#line 5739 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char lockf(); below.  */
@@ -5793,7 +5758,7 @@ lockf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_lockf=yes"
 else
@@ -5816,12 +5781,12 @@ else
 for ac_func in flock
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5820: checking for $ac_func" >&5
+echo "configure:5785: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5825 "configure"
+#line 5790 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5844,7 +5809,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5871,12 +5836,12 @@ done
 fi
 
 echo $ac_n "checking for waitpid""... $ac_c" 1>&6
-echo "configure:5875: checking for waitpid" >&5
+echo "configure:5840: checking for waitpid" >&5
 if eval "test \"`echo '$''{'ac_cv_func_waitpid'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5880 "configure"
+#line 5845 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char waitpid(); below.  */
@@ -5899,7 +5864,7 @@ waitpid();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_waitpid=yes"
 else
@@ -5922,12 +5887,12 @@ else
 for ac_func in wait3
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5926: checking for $ac_func" >&5
+echo "configure:5891: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5931 "configure"
+#line 5896 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5950,7 +5915,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5977,12 +5942,12 @@ done
 fi
 
 echo $ac_n "checking for innetgr""... $ac_c" 1>&6
-echo "configure:5981: checking for innetgr" >&5
+echo "configure:5946: checking for innetgr" >&5
 if eval "test \"`echo '$''{'ac_cv_func_innetgr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5986 "configure"
+#line 5951 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char innetgr(); below.  */
@@ -6005,7 +5970,7 @@ innetgr();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_innetgr=yes"
 else
@@ -6025,12 +5990,12 @@ EOF
  for ac_func in getdomainname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6029: checking for $ac_func" >&5
+echo "configure:5994: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6034 "configure"
+#line 5999 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6053,7 +6018,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6082,12 +6047,12 @@ else
 fi
 
 echo $ac_n "checking for lsearch""... $ac_c" 1>&6
-echo "configure:6086: checking for lsearch" >&5
+echo "configure:6051: checking for lsearch" >&5
 if eval "test \"`echo '$''{'ac_cv_func_lsearch'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6091 "configure"
+#line 6056 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char lsearch(); below.  */
@@ -6110,7 +6075,7 @@ lsearch();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_lsearch=yes"
 else
@@ -6131,7 +6096,7 @@ EOF
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for lsearch in -lcompat""... $ac_c" 1>&6
-echo "configure:6135: checking for lsearch in -lcompat" >&5
+echo "configure:6100: checking for lsearch in -lcompat" >&5
 if test -n ""; then
   ac_lib_var=`echo compat'_'lsearch | sed 'y% ./+-%___p_%'`
 else
@@ -6143,7 +6108,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcompat  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6147 "configure"
+#line 6112 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6154,7 +6119,7 @@ int main() {
 lsearch()
 ; return 0; }
 EOF
-if { (eval echo configure:6158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6171,17 +6136,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   ac_safe=`echo "search.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for search.h""... $ac_c" 1>&6
-echo "configure:6175: checking for search.h" >&5
+echo "configure:6140: checking for search.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6180 "configure"
+#line 6145 "configure"
 #include "confdefs.h"
 #include <search.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6214,12 +6179,12 @@ fi
 fi
 
 echo $ac_n "checking for setenv""... $ac_c" 1>&6
-echo "configure:6218: checking for setenv" >&5
+echo "configure:6183: checking for setenv" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setenv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6223 "configure"
+#line 6188 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char setenv(); below.  */
@@ -6242,7 +6207,7 @@ setenv();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_setenv=yes"
 else
@@ -6263,12 +6228,12 @@ EOF
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for putenv""... $ac_c" 1>&6
-echo "configure:6267: checking for putenv" >&5
+echo "configure:6232: checking for putenv" >&5
 if eval "test \"`echo '$''{'ac_cv_func_putenv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6272 "configure"
+#line 6237 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char putenv(); below.  */
@@ -6291,7 +6256,7 @@ putenv();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_putenv=yes"
 else
@@ -6317,12 +6282,12 @@ fi
 fi
 
 echo $ac_n "checking for utime""... $ac_c" 1>&6
-echo "configure:6321: checking for utime" >&5
+echo "configure:6286: checking for utime" >&5
 if eval "test \"`echo '$''{'ac_cv_func_utime'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6326 "configure"
+#line 6291 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char utime(); below.  */
@@ -6345,7 +6310,7 @@ utime();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_utime=yes"
 else
@@ -6364,7 +6329,7 @@ if eval "test \"`echo '$ac_cv_func_'utime`\" = yes"; then
 EOF
 
 echo $ac_n "checking for POSIX utime""... $ac_c" 1>&6
-echo "configure:6368: checking for POSIX utime" >&5
+echo "configure:6333: checking for POSIX utime" >&5
 if eval "test \"`echo '$''{'sudo_cv_func_utime_posix'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6373,7 +6338,7 @@ if test "$cross_compiling" = yes; then
   sudo_cv_func_utime_posix=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 6377 "configure"
+#line 6342 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -6385,7 +6350,7 @@ utime("conftestdata", &ut);
 exit(0);
 }
 EOF
-if { (eval echo configure:6389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   sudo_cv_func_utime_posix=yes
 else
@@ -6413,7 +6378,7 @@ LIBOBJS="$LIBOBJS utime.o"
 fi
 
 echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
-echo "configure:6417: checking for working fnmatch" >&5
+echo "configure:6382: checking for working fnmatch" >&5
 if eval "test \"`echo '$''{'sudo_cv_func_fnmatch'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6422,13 +6387,13 @@ if test "$cross_compiling" = yes; then
   sudo_cv_func_fnmatch=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 6426 "configure"
+#line 6391 "configure"
 #include "confdefs.h"
 main() {
 exit(fnmatch("/*/bin/echo *", "/usr/bin/echo just a test", 0));
 }
 EOF
-if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   sudo_cv_func_fnmatch=yes
 else
@@ -6455,12 +6420,12 @@ fi
 for ac_func in strerror strcasecmp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6459: checking for $ac_func" >&5
+echo "configure:6424: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6464 "configure"
+#line 6429 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6483,7 +6448,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6510,12 +6475,12 @@ done
 
 
 echo $ac_n "checking for snprintf""... $ac_c" 1>&6
-echo "configure:6514: checking for snprintf" >&5
+echo "configure:6479: checking for snprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6519 "configure"
+#line 6484 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char snprintf(); below.  */
@@ -6538,7 +6503,7 @@ snprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_snprintf=yes"
 else
@@ -6562,12 +6527,12 @@ NEED_SNPRINTF=1
 fi
 
 echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
-echo "configure:6566: checking for vsnprintf" >&5
+echo "configure:6531: checking for vsnprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6571 "configure"
+#line 6536 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vsnprintf(); below.  */
@@ -6590,7 +6555,7 @@ vsnprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_vsnprintf=yes"
 else
@@ -6614,12 +6579,12 @@ NEED_SNPRINTF=1
 fi
 
 echo $ac_n "checking for asprintf""... $ac_c" 1>&6
-echo "configure:6618: checking for asprintf" >&5
+echo "configure:6583: checking for asprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_asprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6623 "configure"
+#line 6588 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char asprintf(); below.  */
@@ -6642,7 +6607,7 @@ asprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_asprintf=yes"
 else
@@ -6666,12 +6631,12 @@ NEED_SNPRINTF=1
 fi
 
 echo $ac_n "checking for vasprintf""... $ac_c" 1>&6
-echo "configure:6670: checking for vasprintf" >&5
+echo "configure:6635: checking for vasprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vasprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6675 "configure"
+#line 6640 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vasprintf(); below.  */
@@ -6694,7 +6659,7 @@ vasprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_vasprintf=yes"
 else
@@ -6722,12 +6687,12 @@ if test -n "$NEED_SNPRINTF"; then
 fi
 if test -z "$LIB_CRYPT"; then
     echo $ac_n "checking for crypt""... $ac_c" 1>&6
-echo "configure:6726: checking for crypt" >&5
+echo "configure:6691: checking for crypt" >&5
 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6731 "configure"
+#line 6696 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char crypt(); below.  */
@@ -6750,7 +6715,7 @@ crypt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_crypt=yes"
 else
@@ -6768,7 +6733,7 @@ if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:6772: checking for crypt in -lcrypt" >&5
+echo "configure:6737: checking for crypt in -lcrypt" >&5
 if test -n ""; then
   ac_lib_var=`echo crypt'_'crypt | sed 'y% ./+-%___p_%'`
 else
@@ -6780,7 +6745,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6784 "configure"
+#line 6749 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6791,7 +6756,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6810,7 +6775,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for crypt in -lcrypt_d""... $ac_c" 1>&6
-echo "configure:6814: checking for crypt in -lcrypt_d" >&5
+echo "configure:6779: checking for crypt in -lcrypt_d" >&5
 if test -n ""; then
   ac_lib_var=`echo crypt_d'_'crypt | sed 'y% ./+-%___p_%'`
 else
@@ -6822,7 +6787,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt_d  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6826 "configure"
+#line 6791 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6833,7 +6798,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:6837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6852,7 +6817,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for crypt in -lufc""... $ac_c" 1>&6
-echo "configure:6856: checking for crypt in -lufc" >&5
+echo "configure:6821: checking for crypt in -lufc" >&5
 if test -n ""; then
   ac_lib_var=`echo ufc'_'crypt | sed 'y% ./+-%___p_%'`
 else
@@ -6864,7 +6829,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lufc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6868 "configure"
+#line 6833 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6875,7 +6840,7 @@ int main() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:6879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6903,12 +6868,12 @@ fi
 
 fi
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:6907: checking for socket" >&5
+echo "configure:6872: checking for socket" >&5
 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6912 "configure"
+#line 6877 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -6931,7 +6896,7 @@ socket();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -6949,7 +6914,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:6953: checking for socket in -lsocket" >&5
+echo "configure:6918: checking for socket in -lsocket" >&5
 if test -n ""; then
   ac_lib_var=`echo socket'_'socket | sed 'y% ./+-%___p_%'`
 else
@@ -6961,7 +6926,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6965 "configure"
+#line 6930 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6972,7 +6937,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:6976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6991,7 +6956,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
-echo "configure:6995: checking for socket in -linet" >&5
+echo "configure:6960: checking for socket in -linet" >&5
 if test -n ""; then
   ac_lib_var=`echo inet'_'socket | sed 'y% ./+-%___p_%'`
 else
@@ -7003,7 +6968,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-linet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7007 "configure"
+#line 6972 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7014,7 +6979,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:7018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7034,7 +6999,7 @@ else
   echo "$ac_t""no" 1>&6
 echo "configure: warning: unable to find socket() trying -lsocket -lnsl" 1>&2
 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:7038: checking for socket in -lsocket" >&5
+echo "configure:7003: checking for socket in -lsocket" >&5
 if test -n "-lnsl"; then
   ac_lib_var=`echo socket'_'socket-lnsl | sed 'y% ./+-%___p_%'`
 else
@@ -7046,7 +7011,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket -lnsl $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7050 "configure"
+#line 7015 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7057,7 +7022,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:7061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7084,12 +7049,12 @@ fi
 fi
 
 echo $ac_n "checking for inet_addr""... $ac_c" 1>&6
-echo "configure:7088: checking for inet_addr" >&5
+echo "configure:7053: checking for inet_addr" >&5
 if eval "test \"`echo '$''{'ac_cv_func_inet_addr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7093 "configure"
+#line 7058 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char inet_addr(); below.  */
@@ -7112,7 +7077,7 @@ inet_addr();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_inet_addr=yes"
 else
@@ -7130,7 +7095,7 @@ if eval "test \"`echo '$ac_cv_func_'inet_addr`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6
-echo "configure:7134: checking for inet_addr in -lnsl" >&5
+echo "configure:7099: checking for inet_addr in -lnsl" >&5
 if test -n ""; then
   ac_lib_var=`echo nsl'_'inet_addr | sed 'y% ./+-%___p_%'`
 else
@@ -7142,7 +7107,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7146 "configure"
+#line 7111 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7153,7 +7118,7 @@ int main() {
 inet_addr()
 ; return 0; }
 EOF
-if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7172,7 +7137,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for inet_addr in -linet""... $ac_c" 1>&6
-echo "configure:7176: checking for inet_addr in -linet" >&5
+echo "configure:7141: checking for inet_addr in -linet" >&5
 if test -n ""; then
   ac_lib_var=`echo inet'_'inet_addr | sed 'y% ./+-%___p_%'`
 else
@@ -7184,7 +7149,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-linet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7188 "configure"
+#line 7153 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7195,7 +7160,7 @@ int main() {
 inet_addr()
 ; return 0; }
 EOF
-if { (eval echo configure:7199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7215,7 +7180,7 @@ else
   echo "$ac_t""no" 1>&6
 echo "configure: warning: unable to find socket() trying -lsocket -lnsl" 1>&2
 echo $ac_n "checking for inet_addr in -lsocket""... $ac_c" 1>&6
-echo "configure:7219: checking for inet_addr in -lsocket" >&5
+echo "configure:7184: checking for inet_addr in -lsocket" >&5
 if test -n "-lnsl"; then
   ac_lib_var=`echo socket'_'inet_addr-lnsl | sed 'y% ./+-%___p_%'`
 else
@@ -7227,7 +7192,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket -lnsl $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7231 "configure"
+#line 7196 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7238,7 +7203,7 @@ int main() {
 inet_addr()
 ; return 0; }
 EOF
-if { (eval echo configure:7242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7265,12 +7230,12 @@ fi
 fi
 
 echo $ac_n "checking for syslog""... $ac_c" 1>&6
-echo "configure:7269: checking for syslog" >&5
+echo "configure:7234: checking for syslog" >&5
 if eval "test \"`echo '$''{'ac_cv_func_syslog'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7274 "configure"
+#line 7239 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char syslog(); below.  */
@@ -7293,7 +7258,7 @@ syslog();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_syslog=yes"
 else
@@ -7311,7 +7276,7 @@ if eval "test \"`echo '$ac_cv_func_'syslog`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for syslog in -lsocket""... $ac_c" 1>&6
-echo "configure:7315: checking for syslog in -lsocket" >&5
+echo "configure:7280: checking for syslog in -lsocket" >&5
 if test -n ""; then
   ac_lib_var=`echo socket'_'syslog | sed 'y% ./+-%___p_%'`
 else
@@ -7323,7 +7288,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7327 "configure"
+#line 7292 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7334,7 +7299,7 @@ int main() {
 syslog()
 ; return 0; }
 EOF
-if { (eval echo configure:7338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7353,7 +7318,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for syslog in -lnsl""... $ac_c" 1>&6
-echo "configure:7357: checking for syslog in -lnsl" >&5
+echo "configure:7322: checking for syslog in -lnsl" >&5
 if test -n ""; then
   ac_lib_var=`echo nsl'_'syslog | sed 'y% ./+-%___p_%'`
 else
@@ -7365,7 +7330,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7369 "configure"
+#line 7334 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7376,7 +7341,7 @@ int main() {
 syslog()
 ; return 0; }
 EOF
-if { (eval echo configure:7380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7395,7 +7360,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for syslog in -linet""... $ac_c" 1>&6
-echo "configure:7399: checking for syslog in -linet" >&5
+echo "configure:7364: checking for syslog in -linet" >&5
 if test -n ""; then
   ac_lib_var=`echo inet'_'syslog | sed 'y% ./+-%___p_%'`
 else
@@ -7407,7 +7372,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-linet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7411 "configure"
+#line 7376 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7418,7 +7383,7 @@ int main() {
 syslog()
 ; return 0; }
 EOF
-if { (eval echo configure:7422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7448,19 +7413,19 @@ if test "$with_DCE" = "yes" -o "$ac_cv_prog_YACC" = "bison -y"; then
     # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:7452: checking for working alloca.h" >&5
+echo "configure:7417: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7457 "configure"
+#line 7422 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:7464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -7481,12 +7446,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:7485: checking for alloca" >&5
+echo "configure:7450: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7490 "configure"
+#line 7455 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -7509,7 +7474,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:7513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -7541,12 +7506,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:7545: checking whether alloca needs Cray hooks" >&5
+echo "configure:7510: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7550 "configure"
+#line 7515 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -7571,12 +7536,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7575: checking for $ac_func" >&5
+echo "configure:7540: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7580 "configure"
+#line 7545 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7599,7 +7564,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7626,7 +7591,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:7630: checking stack direction for C alloca" >&5
+echo "configure:7595: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7634,7 +7599,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 7638 "configure"
+#line 7603 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -7653,7 +7618,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:7657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -7676,47 +7641,9 @@ fi
 
 fi
 
-echo $ac_n "checking for facilitynames and prioritynames in syslog.h""... $ac_c" 1>&6
-echo "configure:7681: checking for facilitynames and prioritynames in syslog.h" >&5
-if eval "test \"`echo '$''{'sudo_cv_syslog_names'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-cat > conftest.$ac_ext <<EOF
-#line 7687 "configure"
-#include "confdefs.h"
-
-#define SYSLOG_NAMES
-#include <stdio.h>
-#include <syslog.h>
-
-int main() {
- CODE *p=&prioritynames[0]; CODE *f=&facilitynames[0]; 
-; return 0; }
-EOF
-if { (eval echo configure:7698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  sudo_cv_syslog_names=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  sudo_cv_syslog_names=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$sudo_cv_syslog_names" 1>&6
-if test $sudo_cv_syslog_names = yes; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_SYSLOG_NAMES 1
-EOF
-
-fi
-
-
 if test "$with_kerb5" = "yes"; then
                     echo $ac_n "checking for krb5_get_init_creds_opt in -lkrb5""... $ac_c" 1>&6
-echo "configure:7720: checking for krb5_get_init_creds_opt in -lkrb5" >&5
+echo "configure:7647: checking for krb5_get_init_creds_opt in -lkrb5" >&5
 if test -n ""; then
   ac_lib_var=`echo krb5'_'krb5_get_init_creds_opt | sed 'y% ./+-%___p_%'`
 else
@@ -7728,7 +7655,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb5  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7732 "configure"
+#line 7659 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7739,7 +7666,7 @@ int main() {
 krb5_get_init_creds_opt()
 ; return 0; }
 EOF
-if { (eval echo configure:7743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7798,21 +7725,21 @@ EOF
 
     if test "$with_kerb5" = "yes"; then
        echo $ac_n "checking for -lkrb4""... $ac_c" 1>&6
-echo "configure:7802: checking for -lkrb4" >&5
+echo "configure:7729: checking for -lkrb4" >&5
 if eval "test \"`echo '$''{'ac_cv_lib_krb4'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lkrb4  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7809 "configure"
+#line 7736 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_lib_krb4=yes
 else
@@ -7833,21 +7760,21 @@ else
 fi
 
        echo $ac_n "checking for -ldes""... $ac_c" 1>&6
-echo "configure:7837: checking for -ldes" >&5
+echo "configure:7764: checking for -ldes" >&5
 if eval "test \"`echo '$''{'ac_cv_lib_des'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-ldes  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7844 "configure"
+#line 7771 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_lib_des=yes
 else
@@ -7868,21 +7795,21 @@ fi
        SUDO_LIBS="${SUDO_LIBS} -ldes425 -lkrb5 -lcrypto -lcom_err"
     else
        echo $ac_n "checking for -ldes""... $ac_c" 1>&6
-echo "configure:7872: checking for -ldes" >&5
+echo "configure:7799: checking for -ldes" >&5
 if eval "test \"`echo '$''{'ac_cv_lib_des'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-ldes  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7879 "configure"
+#line 7806 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_lib_des=yes
 else
@@ -8006,7 +7933,7 @@ if test "$with_authenticate" = "yes"; then
 fi
 
 echo $ac_n "checking for log file location""... $ac_c" 1>&6
-echo "configure:8010: checking for log file location" >&5
+echo "configure:7937: checking for log file location" >&5
 if test -n "$with_logpath"; then
     echo "$ac_t""$with_logpath" 1>&6
     cat >> confdefs.h <<EOF
@@ -8036,7 +7963,7 @@ else
 fi
 
 echo $ac_n "checking for timestamp file location""... $ac_c" 1>&6
-echo "configure:8040: checking for timestamp file location" >&5
+echo "configure:7967: checking for timestamp file location" >&5
 if test -n "$with_timedir"; then
     echo "$ac_t""$with_timedir" 1>&6
     cat >> confdefs.h <<EOF
index df03c2d3801c0819aba396fcce1964318c71f952..317f5465c0cee7b8408cba024c6c1c9987151891 100644 (file)
@@ -932,24 +932,6 @@ AC_ARG_ENABLE(log-host,
   esac
 ], AC_MSG_RESULT(no))
 
-AC_MSG_CHECKING(whether to wrap long lines in the log file)
-AC_ARG_ENABLE(log-wrap,
-[  --disable-log-wrap      Do not wrap long lines in the log file],
-[ case "$enableval" in
-    yes)       AC_MSG_RESULT(yes)
-               AC_DEFINE(WRAP_LOG)
-               ;;
-    no)                AC_MSG_RESULT(no)
-               ;;
-    *)         AC_MSG_RESULT(yes)
-               AC_DEFINE(WRAP_LOG)
-               echo "Ignoring unknown argument to --enable-log-wrap: $enableval"
-               ;;
-  esac
-], AC_MSG_RESULT(yes)
-  AC_DEFINE(WRAP_LOG)
-)
-
 AC_MSG_CHECKING(whether to invoke a shell if sudo is given no arguments)
 AC_ARG_ENABLE(noargs-shell,
 [  --enable-noargs-shell   If sudo is given no arguments run a shell],
@@ -1470,11 +1452,6 @@ if test "$with_DCE" = "yes" -o "$ac_cv_prog_YACC" = "bison -y"; then
     AC_FUNC_ALLOCA
 fi
 
-dnl
-dnl Check to see if the facility and priority names live in syslog.h
-dnl
-SUDO_SYSLOG_NAMES
-
 dnl
 dnl Kerberos 5
 dnl
diff --git a/defaults.c b/defaults.c
new file mode 100644 (file)
index 0000000..f174de9
--- /dev/null
@@ -0,0 +1,613 @@
+/*
+ * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * 4. Products derived from this software may not be called "Sudo" nor
+ *    may "Sudo" appear in their names without specific prior written
+ *    permission from the author.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include <stdio.h>
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif /* STDC_HEADERS */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif /* HAVE_STRINGS_H */
+#include <sys/types.h>
+#include <sys/param.h>
+
+#include "sudo.h"
+
+#ifndef lint
+static const char rcsid[] = "$Sudo$";
+#endif /* lint */
+
+/*
+ * For converting between syslog numbers and strings.
+ */
+struct strmap {
+    char *name;
+    int num;
+};
+
+static struct strmap facilities[] = {
+#ifdef LOG_AUTHPRIV
+       { "authpriv",   LOG_AUTHPRIV },
+#endif
+       { "auth",       LOG_AUTH },
+       { "daemon",     LOG_DAEMON },
+       { "user",       LOG_USER },
+       { "local0",     LOG_LOCAL0 },
+       { "local1",     LOG_LOCAL1 },
+       { "local2",     LOG_LOCAL2 },
+       { "local3",     LOG_LOCAL3 },
+       { "local4",     LOG_LOCAL4 },
+       { "local5",     LOG_LOCAL5 },
+       { "local6",     LOG_LOCAL6 },
+       { "local7",     LOG_LOCAL7 },
+       { NULL,         -1 }
+};
+
+static struct strmap priorities[] = {
+       { "alert",      LOG_ALERT },
+       { "crit",       LOG_CRIT },
+       { "debug",      LOG_DEBUG },
+       { "emerg",      LOG_EMERG },
+       { "err",        LOG_ERR },
+       { "info",       LOG_INFO },
+       { "notice",     LOG_NOTICE },
+       { "warning",    LOG_WARNING },
+       { NULL,         -1 }
+};
+
+/*
+ * Local prototypes.
+ */
+static int store_int __P((char *, int, int));
+static int store_str __P((char *, int, int));
+static int store_syslogfac __P((char *, int, int));
+static int store_syslogpri __P((char *, int, int));
+static int store_umask __P((char *, int, int));
+static char *num_to_name __P((int, struct strmap *));
+
+/*
+ * Structure describing compile-time and run-time options.
+ * Index for T_INT starts at one since index 0 is for flags.
+ * XXX - syslog things should be strings (and !facility should turn off)
+ * XXX - some of these names are pretty lame.
+ */
+struct sudo_defs_types {
+    char *name;
+    unsigned int type;
+    unsigned int index;
+    int (*store) __P((char *, int, int));
+    char *desc;
+} sudo_defs_table[] = {
+    {
+       "long_otp_prompt", T_FLAG, FL_LONG_OTP_PROMPT, NULL,
+       "Put OTP prompt on its own line"
+    }, {
+       "ignore_dot", T_FLAG, FL_IGNORE_DOT, NULL,
+       "Ignore '.' in $PATH"
+    }, {
+       "mail_if_no_user", T_FLAG, FL_MAIL_IF_NOUSER, NULL,
+       "Send mail if the user is not in sudoers"
+    }, {
+       "mail_if_no_host", T_FLAG, FL_MAIL_IF_NOHOST, NULL,
+       "Send mail if the user is not in sudoers for this host"
+    }, {
+       "mail_if_no_perms", T_FLAG, FL_MAIL_IF_NOPERMS, NULL,
+       "Send mail if the user is not allowed to run a command"
+    }, { 
+       "tty_tickets", T_FLAG, FL_TTY_TICKETS, NULL,
+       "Use a separate timestamp for each user/tty combo"
+    }, { 
+       "lecture", T_FLAG, FL_LECTURE, NULL,
+       "Lecture user the first time they run sudo"
+    }, { 
+       "authenticate", T_FLAG, FL_AUTHENTICATE, NULL,
+       "Require users to authenticate by default"
+    }, { 
+       "root_sudo", T_FLAG, FL_ROOT_SUDO, NULL,
+       "Root may run sudo"
+    }, { 
+       "log_host", T_FLAG, FL_LOG_HOST, NULL,
+       "Log the hostname in the (non-syslog) log file"
+    }, { 
+       "shell_noargs", T_FLAG, FL_SHELL_NOARGS, NULL,
+       "If sudo is invoked with no arguments, start a shell"
+    }, { 
+       "set_home", T_FLAG, FL_SET_HOME, NULL,
+       "Set $HOME to the target user when starting a shell with -s"
+    }, { 
+       "path_info", T_FLAG, FL_PATH_INFO, NULL,
+       "Allow some information gathering to give useful error messages"
+    }, { 
+       "fqdn", T_FLAG, FL_FQDN, NULL,
+       "Require fully-qualified hsotnames in the sudoers file"
+    }, { 
+       "insults", T_FLAG, FL_INSULTS, NULL,
+       "Insult the user when they enter an incorrect password"
+    }, { 
+       "syslog", T_INT|T_BOOL, I_LOGFAC, store_syslogfac,
+       "Syslog facility: %s"
+    }, { 
+       "syslog_goodpri", T_INT, I_GOODPRI, store_syslogpri,
+       "Syslog priority to use when user authenticates successfully: %s"
+    }, { 
+       "syslog_badpri", T_INT, I_BADPRI, store_syslogpri,
+       "Syslog priority to use when user authenticates unsuccessfully: %s"
+    }, { 
+       "loglinelen", T_INT, I_LOGLEN, store_int,
+       "Number of length at which to wrap log file lines (0 for no wrap): %d"
+    }, { 
+       "timestamp_timeout", T_INT, I_TS_TIMEOUT, store_int,
+       "Authentication timestamp timeout: %d minutes"
+    }, { 
+       "passwd_timeout", T_INT, I_PW_TIMEOUT, store_int,
+       "Password prompt timeout: %d minutes"
+    }, { 
+       "passwd_tries", T_INT, I_PW_TRIES, store_int,
+       "Number of tries to enter a password: %d"
+    }, { 
+       "umask", T_INT|T_BOOL, I_UMASK, store_umask,
+       "Umask to use or 0777 to use user's: 0%o"
+    }, { 
+       "logfile", T_STR, I_LOGFILE, store_str,
+       "Path to log file: %s"
+    }, { 
+       "mailerpath", T_STR, I_MAILERPATH, store_str,
+       "Path to mail program: %s"
+    }, { 
+       "mailerflags", T_STR, I_MAILERARGS, store_str,
+       "Flags for mail program: %s"
+    }, { 
+       "alertmail", T_STR, I_ALERTMAIL, store_str,
+       "Address to send mail to: %s"
+    }, { 
+       "mailsub", T_STR, I_MAILSUB, store_str,
+       "Subject line for mail messages: %s"
+    }, { 
+       "badpass_message", T_STR, I_BADPASS_MSG, store_str,
+       "Incorrect password message: %s"
+    }, { 
+       "timestampdir", T_STR, I_TIMESTAMPDIR, store_str,
+       "Path to authentication timestamp dir: %s"
+    }, { 
+       "exempt_group", T_STR, I_EXEMPT_GRP, store_str,
+       "Users in this group are exempt from password and PATH requirements: %s"
+    }, { 
+       "passprompt", T_STR, I_PASSPROMPT, store_str,
+       "Default password prompt: %s"
+    }, { 
+       "runas_default", T_STR, I_RUNAS_DEF, store_str,
+       "Default user to run commands as: %s"
+    }, { 
+       "secure_path", T_STR, I_SECURE_PATH, store_str,
+       "Override user's $PATH with: %s"
+    }, {
+       NULL, 0, 0, NULL, NULL
+    }
+};
+
+unsigned int sudo_inttable[SUDO_INTTABLE_LAST];
+char *sudo_strtable[SUDO_STRTABLE_LAST];
+
+/*
+ * Print version and configure info.
+ */
+void
+dump_defaults()
+{
+    struct sudo_defs_types *cur;
+
+    for (cur = sudo_defs_table; cur->name; cur++) {
+       switch (cur->type & T_MASK) {
+           case T_FLAG:
+               if ((sudo_inttable[I_FLAGS]) & (cur->index))
+                   puts(cur->desc);
+               break;
+           case T_STR:
+               if (sudo_strtable[cur->index]) {
+                   (void) printf(cur->desc, sudo_strtable[cur->index]);
+                   putchar('\n');
+               }
+               break;
+           case T_INT:
+               if (cur->index == I_LOGFAC)
+                   (void) printf(cur->desc,
+                       num_to_name(sudo_inttable[cur->index], facilities));
+               else if (cur->index == I_GOODPRI || cur->index == I_BADPRI)
+                   (void) printf(cur->desc,
+                       num_to_name(sudo_inttable[cur->index], priorities));
+               else
+                   (void) printf(cur->desc, sudo_inttable[cur->index]);
+               putchar('\n');
+               break;
+       }
+    }
+
+#ifdef ENV_EDITOR
+    (void) printf("Default editor for visudo: %s\n", EDITOR);
+#else
+    (void) printf("Editor for visudo: %s\n", EDITOR);
+#endif
+}
+
+/*
+ * List each option along with its description.
+ */
+void
+list_options()
+{
+    struct sudo_defs_types *cur;
+    char *p;
+
+    (void) puts("Available options in a sudoers ``Defaults'' line:\n");
+    for (cur = sudo_defs_table; cur->name; cur++) {
+       switch (cur->type & T_MASK) {
+           case T_FLAG:
+               (void) printf("%s: %s\n", cur->name, cur->desc);
+               break;
+           case T_STR:
+           case T_INT:
+               p = strrchr(cur->desc, ':');
+               if (p)
+                   (void) printf("%s: %.*s\n", cur->name, p - cur->desc,
+                       cur->desc);
+               else
+                   (void) printf("%s: %s\n", cur->name, cur->desc);
+               break;
+       }
+    }
+}
+
+/*
+ * Convert a syslog number to a name.
+ */
+static char *
+num_to_name(num, table)
+    int num;
+    struct strmap *table;
+{
+    struct strmap *t;
+
+    for (t = table; t->name; t++)
+       if (t->num == num)
+           return(t->name);
+
+    return("disabled");
+}
+
+/*
+ * Sets/clears an entry in the defaults structure
+ * If a variable that takes a value is used in a boolean
+ * context with op == 0, disable that variable.
+ * Eg. you may want to turn off logging to a file for some hosts.
+ * This is only meaningful for variables that are *optional*.
+ */
+int
+set_default(var, val, op)
+    char *var;
+    char *val;
+    int op;     /* TRUE or FALSE */
+{
+    struct sudo_defs_types *cur;
+    extern int sudolineno;
+
+    for (cur = sudo_defs_table; cur->name; cur++) {
+       if (strcmp(var, cur->name) == 0)
+           break;
+    }
+    if (!cur->name) {
+       (void) fprintf(stderr,
+           "%s: unknown defaults entry `%s' referenced near line %d\n", Argv[0],
+           var, sudolineno);
+       return(FALSE);
+    }
+
+    switch (cur->type & T_MASK) {
+       case T_STR:
+           if (!val) {
+               /* Check for bogus boolean usage or lack of a value. */
+               if (!(cur->type & T_BOOL) || op != FALSE) {
+                   (void) fprintf(stderr,
+                       "%s: no value specified for `%s' on line %d\n", Argv[0],
+                       var, sudolineno);
+                   return(FALSE);
+               }
+           }
+           if (!cur->store(val, cur->index, op)) {
+               (void) fprintf(stderr,
+                   "%s: value '%s' is invalid for option '%s'\n", Argv[0],
+                   val, var);
+               return(FALSE);
+           }
+           break;
+       case T_INT:
+           if (!val) {
+               /* Check for bogus boolean usage or lack of a value. */
+               if (!(cur->type & T_BOOL) || op != FALSE) {
+                   (void) fprintf(stderr,
+                       "%s: no value specified for `%s' on line %d\n", Argv[0],
+                       var, sudolineno);
+                   return(FALSE);
+               }
+           }
+           if (!cur->store(val, cur->index, op)) {
+               (void) fprintf(stderr,
+                   "%s: value '%s' is invalid for option '%s'\n", Argv[0],
+                   val, var);
+               return(FALSE);
+           }
+           break;
+       case T_FLAG:
+           if (val) {
+               (void) fprintf(stderr,
+                   "%s: option `%s' does not take a value on line %d\n",
+                   Argv[0], var, sudolineno);
+               return(FALSE);
+           }
+           if (op == TRUE)
+               sudo_inttable[0] |= cur->index;
+           else
+               sudo_inttable[0] &= ~(cur->index);
+           break;
+    }
+
+    return(TRUE);
+}
+
+/*
+ * Set default options to compiled-in values.
+ * Any of these may be overridden at runtime by a "Defaults" file.
+ */
+void
+init_defaults()
+{
+    static int firsttime = 1;
+    int i;
+
+    /* Free any strings that were set. */
+    if (!firsttime) {
+       for (i = 0; i < SUDO_STRTABLE_LAST; i++)
+           if (sudo_strtable[i])
+               free(sudo_strtable[i]);
+    }
+
+    memset(sudo_strtable, 0, sizeof(sudo_strtable));
+    memset(sudo_inttable, 0, sizeof(sudo_inttable));
+
+    /* First initialize the flags. */
+#ifdef LONG_OTP_PROMPT
+    sudo_inttable[I_FLAGS] |= FL_LONG_OTP_PROMPT;
+#endif
+#ifdef IGNORE_DOT_PATH
+    sudo_inttable[I_FLAGS] |= FL_IGNORE_DOT;
+#endif
+#ifdef ALWAYS_SEND_MAIL
+    sudo_inttable[I_FLAGS] |= FL_MAIL_ALWAYS;
+#endif
+#ifdef SEND_MAIL_WHEN_NO_USER
+    sudo_inttable[I_FLAGS] |= FL_MAIL_IF_NOUSER;
+#endif
+#ifdef SEND_MAIL_WHEN_NO_HOST
+    sudo_inttable[I_FLAGS] |= FL_MAIL_IF_NOHOST;
+#endif
+#ifdef SEND_MAIL_WHEN_NOT_OK
+    sudo_inttable[I_FLAGS] |= FL_MAIL_IF_NOPERMS;
+#endif
+#ifdef USE_TTY_TICKETS
+    sudo_inttable[I_FLAGS] |= FL_TTY_TICKETS;
+#endif
+#ifndef NO_LECTURE
+    sudo_inttable[I_FLAGS] |= FL_LECTURE;
+#endif
+#ifndef NO_AUTHENTICATION
+    sudo_inttable[I_FLAGS] |= FL_AUTHENTICATE;
+#endif
+#ifndef NO_ROOT_SUDO
+    sudo_inttable[I_FLAGS] |= FL_ROOT_SUDO;
+#endif
+#ifdef HOST_IN_LOG
+    sudo_inttable[I_FLAGS] |= FL_LOG_HOST;
+#endif
+#ifdef SHELL_IF_NO_ARGS
+    sudo_inttable[I_FLAGS] |= FL_SHELL_NOARGS;
+#endif
+#ifdef SHELL_SETS_HOME
+    sudo_inttable[I_FLAGS] |= FL_SET_HOME;
+#endif
+#ifndef DONT_LEAK_PATH_INFO
+    sudo_inttable[I_FLAGS] |= FL_PATH_INFO;
+#endif
+#ifdef FQDN
+    sudo_inttable[I_FLAGS] |= FL_FQDN;
+#endif
+#ifdef USE_INSULTS
+    sudo_inttable[I_FLAGS] |= FL_INSULTS;
+#endif
+
+    /* Then initialize the ints. */
+#if (LOGGING & SLOG_SYSLOG)
+    sudo_inttable[I_LOGFAC] = LOGFAC;
+    sudo_inttable[I_GOODPRI] = PRI_SUCCESS;
+    sudo_inttable[I_BADPRI] = PRI_FAILURE;
+#else
+    sudo_inttable[I_LOGFAC] = (unsigned int)-1;
+#endif
+#ifdef SUDO_UMASK
+    sudo_inttable[I_UMASK] = SUDO_UMASK;
+#else
+    sudo_inttable[I_UMASK] = 0777;
+#endif
+    sudo_inttable[I_LOGLEN] = MAXLOGFILELEN;
+    sudo_inttable[I_TS_TIMEOUT] = TIMEOUT;
+    sudo_inttable[I_PW_TIMEOUT] = PASSWORD_TIMEOUT;
+    sudo_inttable[I_PW_TRIES] = TRIES_FOR_PASSWORD;
+
+    /* Finally do the strings */
+    sudo_strtable[I_ALERTMAIL] = estrdup(ALERTMAIL);
+    sudo_strtable[I_MAILSUB] = estrdup(MAILSUBJECT);
+    sudo_strtable[I_BADPASS_MSG] = estrdup(INCORRECT_PASSWORD);
+    sudo_strtable[I_TIMESTAMPDIR] = estrdup(_PATH_SUDO_TIMEDIR);
+    sudo_strtable[I_PASSPROMPT] = estrdup(PASSPROMPT);
+    sudo_strtable[I_RUNAS_DEF] = estrdup(RUNAS_DEFAULT);
+#ifdef _PATH_SENDMAIL
+    sudo_strtable[I_MAILERPATH] = estrdup(_PATH_SENDMAIL);
+#endif
+#if (LOGGING & SLOG_FILE)
+    sudo_strtable[I_LOGFILE] = estrdup(_PATH_SUDO_LOGFILE);
+#endif
+#ifdef EXEMPTGROUP
+    sudo_strtable[I_EXEMPT_GRP] = estrdup(EXEMPTGROUP);
+#endif
+#ifdef SECURE_PATH
+    sudo_strtable[I_SECURE_PATH] = estrdup(SECURE_PATH);
+#endif
+#if 0
+    /* XXX - implement */
+    sudo_strtable[I_MAILERARGS] = estrdup(XXX);
+#endif
+
+    /*
+     * The following depend on the above values.
+     * We use a pointer to the string so that if its
+     * value changes we get the change.
+     */
+    if (user_runas == NULL)
+       user_runas = &sudo_strtable[I_RUNAS_DEF];
+
+    firsttime = 0;
+}
+
+static int
+store_int(val, index, op)
+    char *val;
+    int index;
+    int op;
+{
+    char *endp;
+    unsigned long ul;
+
+    if (op == FALSE) {
+       sudo_inttable[index] = 0;
+    } else {
+       ul = strtoul(val, &endp, 10);
+       if (*endp != '\0')
+           return(FALSE);
+       /* XXX - should check against UINT_MAX */
+       sudo_inttable[index] = (unsigned int)ul;
+    }
+    return(TRUE);
+}
+
+static int
+store_str(val, index, op)
+    char *val;
+    int index;
+    int op;
+{
+
+    if (sudo_strtable[index])
+       free(sudo_strtable[index]);
+    if (op == FALSE)
+       sudo_strtable[index] = NULL;
+    else
+       sudo_strtable[index] = estrdup(val);
+    return(TRUE);
+}
+
+static int
+store_syslogfac(val, index, op)
+    char *val;
+    int index;
+    int op;
+{
+    struct strmap *fac;
+
+    if (op == FALSE) {
+       sudo_inttable[index] = (unsigned int)-1;
+       return(TRUE);
+    }
+
+    for (fac = facilities; fac->name && strcmp(val, fac->name); fac++)
+       ;
+    if (fac->name == NULL)
+       return(FALSE);
+    sudo_inttable[index] = fac->num;
+    return(TRUE);
+}
+
+static int
+store_syslogpri(val, index, op)
+    char *val;
+    int index;
+    int op;
+{
+    struct strmap *pri;
+
+    if (op == FALSE)
+       return(FALSE);
+
+    for (pri = priorities; pri->name && strcmp(val, pri->name); pri++)
+       ;
+    if (pri->name == NULL)
+       return(FALSE);
+    sudo_inttable[index] = pri->num;
+    return(TRUE);
+}
+
+static int
+store_umask(val, index, op)
+    char *val;
+    int index;
+    int op;
+{
+    char *endp;
+    unsigned long ul;
+
+    if (op == FALSE) {
+       sudo_inttable[index] = 0777;
+    } else {
+       ul = strtoul(val, &endp, 8);
+       if (*endp != '\0' || ul >= 0777)
+           return(FALSE);
+       sudo_inttable[index] = (mode_t)ul;
+    }
+    return(TRUE);
+}
diff --git a/defaults.h b/defaults.h
new file mode 100644 (file)
index 0000000..bf4c36b
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * 4. Products derived from this software may not be called "Sudo" nor
+ *    may "Sudo" appear in their names without specific prior written
+ *    permission from the author.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $Sudo$
+ */
+
+#ifndef _SUDO_DEFAULTS_H
+#define _SUDO_DEFAULTS_H
+
+/*
+ * Four types of defaults: strings, integers, booleans, and flags.
+ * Note that flags have their value in the index field.
+ * Also, T_INT or T_STR may be ANDed with T_BOOL to indicate that
+ * a value is not required.
+ */
+#define T_INT  0x01
+#define T_STR  0x02
+#define T_FLAG 0x08
+#define T_MASK 0x0F
+#define T_BOOL 0x10
+
+/*
+ * Flag values
+ */
+#define FL_LONG_OTP_PROMPT     0x00001
+#define FL_IGNORE_DOT          0x00002
+#define FL_MAIL_ALWAYS         0x00004
+#define FL_MAIL_IF_NOUSER      0x00008
+#define FL_MAIL_IF_NOHOST      0x00010
+#define FL_MAIL_IF_NOPERMS     0x00020
+#define FL_TTY_TICKETS         0x00040
+#define FL_LECTURE             0x00080
+#define FL_AUTHENTICATE                0x00100
+#define FL_ROOT_SUDO           0x00200
+#define FL_LOG_HOST            0x00400
+#define FL_SHELL_NOARGS                0x00800
+#define FL_SET_HOME            0x01000
+#define FL_PATH_INFO           0x02000
+#define FL_FQDN                        0x04000
+#define FL_INSULTS             0x08000
+#define FL_MAX                 0xFFFFF
+
+/*
+ * Indexes into sudo_inttable
+ */
+#define        I_FLAGS         0       /* various flags, as listed above */
+#define        I_LOGFAC        1       /* syslog facility */
+#define        I_GOODPRI       2       /* syslog priority for successful auth */
+#define        I_BADPRI        3       /* syslog priority for unsuccessful auth */
+#define        I_LOGLEN        4       /* wrap log file line after N chars */
+#define        I_TS_TIMEOUT    5       /* timestamp stale after N minutes */
+#define        I_PW_TIMEOUT    6       /* exit if pass not entered in N minutes */
+#define        I_PW_TRIES      7       /* exit after N bad password tries */
+#define        I_UMASK         8       /* umask to use or 0777 to use user's */
+
+/*
+ * Indexes into sudo_strtable
+ */
+#define        I_LOGFILE       0       /* path to logfile (or NULL for none) */
+#define        I_MAILERPATH    1       /* path to sendmail or other mailer */
+#define        I_MAILERARGS    2       /* flags to pass to the mailer */
+#define        I_ALERTMAIL     3       /* who to send bitch mail to */
+#define        I_MAILSUB       4       /* subject line of mail msg */
+#define        I_BADPASS_MSG   5       /* what to say when passwd is wrong */
+#define        I_TIMESTAMPDIR  6       /* path to timestamp dir */
+#define        I_EXEMPT_GRP    7       /* no password or PATH override for these */
+#define        I_PASSPROMPT    8       /* password prompt */
+#define        I_RUNAS_DEF     9       /* default user to run commands as */
+#define        I_SECURE_PATH   10      /* set $PATH to this if not NULL */
+
+#define SUDO_INTTABLE_LAST     9
+#define SUDO_STRTABLE_LAST     11
+
+#define sudo_flag_set(_f)      (sudo_inttable[I_FLAGS] & (_f))
+
+extern unsigned int sudo_inttable[SUDO_INTTABLE_LAST];
+extern char *sudo_strtable[SUDO_STRTABLE_LAST];
+
+/*
+ * Prototypes
+ */
+void dump_default      __P((void));
+int set_default                __P((char *, char *, int));
+void init_defaults     __P((void));
+void list_options      __P((void));
+
+#endif /* _SUDO_DEFAULTS_H */
index be92d3bba18170d2c791dd682905749dcca3cefb..26d8efae49e3f75f83d654b3667466b0a309f8c5 100644 (file)
@@ -72,7 +72,7 @@ static const char rcsid[] = "$Sudo$";
  * stores it in a statically allocated array, filling in a pointer
  * to the array.  Returns FOUND if the command was found, NOT_FOUND
  * if it was not found, or NOT_FOUND_DOT if it would have been found
- * but it is in '.' and IGNORE_DOT_PATH is in effect.
+ * but it is in '.' and FL_IGNORE_DOT is set.
  */
 int
 find_path(infile, outfile)
@@ -105,9 +105,12 @@ find_path(infile, outfile)
     }
 
     /*
-     * Grab PATH out of environment and make a local copy
+     * Grab PATH out of the environment (or from the string table
+     * if SECURE_PATH is in effect) and make a local copy.
      */
-    if ((path = getenv("PATH")) == NULL)
+    if (sudo_strtable[I_SECURE_PATH])
+       path = sudo_strtable[I_SECURE_PATH];
+    else if ((path = getenv("PATH")) == NULL)
        return(NOT_FOUND);
     path = estrdup(path);
     origpath = path;
@@ -147,10 +150,8 @@ find_path(infile, outfile)
      */
     if (!result && checkdot) {
        result = sudo_goodpath(infile);
-#ifdef IGNORE_DOT_PATH
-       if (result)
+       if (result && sudo_flag_set(FL_IGNORE_DOT))
            return(NOT_FOUND_DOT);
-#endif /* IGNORE_DOT_PATH */
     }
 
     if (result) {
index 8508e0eb5b345b9542176079f5add41be095a876..575104fb4c55aaf67fa9f62537dee4e2b0f420d8 100644 (file)
--- a/lex.yy.c
+++ b/lex.yy.c
@@ -284,46 +284,62 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
        *yy_cp = '\0'; \
        yy_c_buf_p = yy_cp;
 
-#define YY_NUM_RULES 27
-#define YY_END_OF_BUFFER 28
-static yyconst short int yy_accept[330] =
+#define YY_NUM_RULES 32
+#define YY_END_OF_BUFFER 33
+static yyconst short int yy_accept[476] =
     {   0,
-        0,    0,    0,    0,    0,    0,   28,   26,    1,    5,
-        9,   26,   26,   19,   26,    8,   26,   25,   25,   25,
-       11,   10,   24,   24,   24,   26,   25,    7,    4,    7,
-        7,    7,    4,    7,    7,    7,    7,    4,    4,    7,
-        7,    7,   26,    7,   21,    9,   21,   21,   22,   21,
-       21,   21,   21,   21,   10,   20,   20,   20,   21,   21,
-        1,    9,    0,    6,   15,   14,   23,   25,    0,   25,
-       25,   25,   25,   25,    0,   24,   24,   24,    0,    2,
-        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
-        7,    7,    7,    7,    7,    7,    3,    3,   21,    9,
-
-       15,   14,   21,   21,   21,   21,   21,   21,   21,   21,
-       21,   20,   20,   20,    0,    0,    0,   18,   24,   24,
-        7,    7,    7,    7,    7,    7,   21,   21,   21,   18,
-       20,   20,    0,    0,    0,    0,    0,   24,   24,    7,
-        7,    7,    7,    7,    7,    7,   21,   21,   21,   21,
-       21,   20,   20,    0,    0,    0,   24,   24,    7,    7,
-        7,    7,    7,   21,   21,   21,   20,   20,    0,    0,
-        0,    0,    0,   24,   24,    7,    7,    7,    7,    7,
-        7,    7,   21,   21,   21,   21,   21,   20,   20,   16,
-       16,   16,   24,    0,   13,    7,    7,    7,    7,   16,
-
-       16,   16,   20,    0,   16,   16,   16,   16,   24,    7,
-        7,    7,    7,    7,    7,   21,   16,   16,   16,   16,
-       20,    0,   17,   17,   17,    0,   12,    7,    7,    7,
-        7,   21,   17,   17,   17,    0,    0,   17,   17,   17,
-       17,   17,    7,    7,    7,    7,    7,    7,    7,   21,
-       21,   17,   17,   17,   17,   17,    0,    0,    0,   17,
-       17,    7,    7,    7,    7,    7,   21,   21,   21,   17,
-       17,    0,    0,    0,    0,    0,    7,    7,    7,    7,
-        7,   21,   21,   21,   21,   21,    0,    0,    0,    7,
-        7,    7,   21,   21,   21,    0,    0,    0,    0,    0,
-
-        7,    7,    7,    7,    7,   21,   21,   21,   21,   21,
-       16,   16,   16,    7,    7,    7,   16,   16,   16,   16,
-       16,   16,    7,    7,    7,   16,   16,   16,    0
+        0,    0,    0,    0,    0,    0,    0,    0,   33,   30,
+        1,    7,   11,   30,   30,   21,   31,   30,   10,   30,
+       30,   30,   30,   13,   12,   25,   25,   25,   31,   30,
+       25,   25,   25,   25,   25,    9,    6,    9,    9,    9,
+        9,    6,    9,    9,    9,    9,    6,    6,    9,    9,
+        9,   31,    9,   23,   23,   23,   24,   23,   23,   23,
+       23,   23,   22,   22,   22,   23,   26,    5,   26,   26,
+       26,   26,   26,   26,   26,   26,   26,   13,   25,   25,
+       25,   26,   26,   30,    1,   11,   30,    0,    8,   17,
+       16,   29,   29,   30,   30,   30,   30,   30,   30,   30,
+
+       25,   25,   25,    0,    2,   30,   30,   30,   30,   30,
+        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
+        9,    9,    9,    9,    9,    9,    9,    3,    3,   23,
+       17,   16,   23,   23,   23,   23,   23,   23,   23,   23,
+       22,   22,   22,   26,   26,   26,    0,   26,   26,    0,
+        5,   26,   17,   16,   26,   26,   26,   26,   26,   26,
+       26,   26,   26,   25,   25,   25,   30,   30,   30,   20,
+       25,   25,   30,   30,   30,   30,   30,    9,    9,    9,
+        9,    9,    9,   23,   23,   23,   20,   22,   22,    4,
+        4,    4,   26,   26,   26,   20,   25,   25,   30,   30,
+
+       30,   30,   30,   25,   25,   30,   30,   30,    9,    9,
+        9,    9,    9,    9,    9,   23,   23,   23,   23,   23,
+       22,   22,   26,   26,   26,   26,   26,   25,   25,   30,
+       30,   30,   25,   25,   30,   30,    9,    9,    9,    9,
+        9,   23,   23,   23,   22,   22,   26,   26,   26,   25,
+       25,   30,   30,   30,   30,   30,   25,   25,   30,   30,
+        9,    9,    9,    9,    9,    9,    9,   23,   23,   23,
+       23,   23,   22,   22,   26,   26,   26,   26,   26,   25,
+       25,   18,   18,   18,   25,    0,   15,   30,   30,    9,
+        9,    9,    9,   18,   18,   18,   22,   18,   18,   18,
+
+       25,   15,   30,   18,   18,   18,   18,   25,   30,   27,
+        9,    9,    9,    9,    9,    9,   23,   18,   18,   18,
+       18,   22,   26,   18,   18,   18,   18,   25,   30,   19,
+       19,   19,    0,   14,   30,   27,    9,    9,    9,    9,
+       23,   19,   19,   19,   26,   19,   19,   19,   14,   30,
+       30,   19,   19,   19,   19,   19,   28,    9,    9,    9,
+        9,    9,    9,    9,   23,   23,   19,   19,   19,   19,
+       19,   26,   26,   19,   19,   19,   19,   19,   30,   30,
+       30,   19,   19,    9,    9,    9,    9,    9,   23,   23,
+       23,   19,   19,   26,   26,   26,   19,   19,   30,   30,
+
+       30,   30,   30,    9,    9,    9,    9,    9,   23,   23,
+       23,   23,   23,   26,   26,   26,   26,   26,   30,   30,
+       30,    9,    9,    9,   23,   23,   23,   26,   26,   26,
+       30,   30,   30,   30,   30,    9,    9,    9,    9,    9,
+       23,   23,   23,   23,   23,   26,   26,   26,   26,   26,
+       18,   18,   18,    9,    9,    9,   18,   18,   18,   18,
+       18,   18,   18,   18,   18,    9,    9,    9,   18,   18,
+       18,   18,   18,   18,    0
     } ;
 
 static yyconst int yy_ec[256] =
@@ -331,17 +347,17 @@ static yyconst int yy_ec[256] =
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    4,    1,    5,    1,    6,    1,    1,    7,
-        8,    1,    9,   10,   11,   12,   13,   14,   15,   16,
-       17,   18,   19,   20,   20,   20,   20,   21,    1,    1,
-       22,    1,    1,    1,   23,   24,   24,   25,   24,   24,
-       24,   24,   24,   24,   24,   24,   24,   26,   27,   28,
-       24,   24,   29,   24,   24,   24,   30,   24,   24,   24,
-        1,   31,    1,    1,   32,    1,   33,   33,   33,   33,
-
-       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
-       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
-       33,   33,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    4,    5,    6,    1,    7,    1,    1,    8,
+        9,    1,   10,   11,   12,   13,   14,   15,   16,   17,
+       18,   19,   20,   21,   21,   21,   21,   22,    1,    1,
+       23,    1,    1,   24,   25,   26,   27,   28,   26,   26,
+       26,   29,   26,   26,   26,   26,   26,   30,   31,   32,
+       26,   33,   34,   26,   35,   26,   36,   26,   26,   26,
+        1,   37,    1,    1,   38,    1,   39,   40,   40,   41,
+
+       42,   43,   40,   40,   44,   40,   40,   45,   46,   47,
+       48,   40,   40,   49,   50,   51,   52,   40,   40,   40,
+       40,   40,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -358,388 +374,894 @@ static yyconst int yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static yyconst int yy_meta[34] =
+static yyconst int yy_meta[53] =
     {   0,
-        1,    2,    2,    1,    3,    1,    1,    4,    1,    2,
-        5,    6,    7,    8,    8,    8,    8,    8,    8,    8,
-        2,    9,    5,    5,    5,    5,    5,    5,    5,    5,
-       10,    5,    5
+        1,    2,    2,    3,    1,    4,    1,    5,    5,    1,
+        2,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    6,    7,    5,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    6,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1
     } ;
 
-static yyconst short int yy_base[378] =
+static yyconst short int yy_base[514] =
     {   0,
-        0,    0,   33,    0,   66,    0, 1236, 1237, 1233, 1237,
-     1230, 1230,    0, 1237,    0, 1237,    0,   89,  109,  116,
-     1237, 1237,  125,  127,  117,  108, 1220,    0, 1237, 1227,
-      112,  133, 1237,  137,  164,  184,  191, 1237,    0,  210,
-     1203, 1205,  143,  243,    0, 1221,    0,    0, 1237,    0,
-      249,  280,  300,  307,    0,  326, 1195, 1196,  145,  359,
-     1214, 1209, 1207, 1237,    0,    0,    0,  379,  134, 1195,
-        0,    0, 1184, 1189,    0, 1171,  124,  126,  154, 1237,
-        0, 1185,  154,  233,  190,  388,  395, 1174,    0,    0,
-     1163,  415,  437,    0, 1152, 1148,  164, 1237,    0, 1170,
-
-        0,    0,  370,  448,  455, 1154,    0,    0, 1144,  475,
-      506,    0, 1127, 1123, 1139, 1131,  241, 1129,  235,  134,
-      526,  533,  540,  559, 1108, 1094,  570,  577,  584,  603,
-     1098, 1084,  230, 1099, 1091, 1089,  247,  239,  242,  621,
-     1080,    0,    0, 1068, 1058, 1056,  628, 1073,    0,    0,
-     1064, 1054, 1044, 1052, 1042,  258,  246,  249,  637,  644,
-      651, 1016, 1017,  659,  666,  673, 1009, 1005,  267, 1017,
-     1009, 1007,  316,  340,  359,  679,  999,    0,    0,  989,
-      907,  367,  686,  903,    0,    0,  859,  827,  415,  781,
-      758,  363,  263,  427, 1237,  694,  701,  708,  647,  715,
-
-      722,  729,  625,  735,  620,  619,  618,  200,  430,  742,
-      617,    0,    0,  609,  431,  749,  615,    0,    0,  607,
-      432,  614,  612,  365,  477,  433, 1237,  758,  765,  772,
-      480,  781,  788,  795,  484,  358,  611,  610,  609,  367,
-      608,  489,  802,  607,  809,    0,  598,  815,  508,  822,
-      605,  829,    0,  594,  835,  515,  601,  599,  406,  594,
-      518,  844,  851,  858,  593,  559,  866,  873,  880,  571,
-      562,  415,  568,  567,  558,  427,  886,  557,    0,    0,
-      519,  893,  509,    0,    0,  497,  502,  497,  466,  902,
-      909,  916,  924,  931,  938,  440,  490,  478,  471,  496,
-
-      944,  465,    0,    0,  441,  951,  446,    0,    0,  420,
-        0,    0,  506,  958,  520,  965,  971,  546,  978, 1237,
-        0,  369,    0,    0,  342,    0,    0,  327, 1237,  997,
-     1007, 1017, 1027, 1031, 1035, 1043, 1052, 1062, 1072, 1080,
-     1090, 1099, 1109, 1119, 1129, 1139,  326, 1145, 1153, 1162,
-     1167, 1170, 1173,  321, 1176, 1179, 1182,  293, 1184, 1186,
-     1188, 1191, 1194, 1197,  271, 1200, 1203, 1206, 1209, 1212,
-      255, 1215, 1218, 1221,  223,  166,   94
+        0,   26,   61,    0,  113,    0,  165,    0, 1010,    0,
+     1006, 3351, 1003,  216,    0, 3351, 3351,    0, 3351,  222,
+      241,  250,  259, 3351, 3351,  280,  975,  978,   54,  318,
+      951,  943,  932,  921,  921,  225, 3351,  966,  228,    0,
+      280, 3351,  351,  372,  346,  353, 3351,    0,  396,  933,
+      936,  447,  470,    0,    0,    0, 3351,    0,  448,  496,
+      505,  514,  535,  929,  928,  573,  455, 3351,  610,  646,
+      535,    0,  614,  621,  676,  644,  656,    0,  713,  921,
+      925,  219,  751,    0,  947,  941,  788,  941, 3351,    0,
+        0,  700,    0,  785,  930,  813,  822,  800,    0,  843,
+
+        0,  903,  892,  239, 3351,  870,  870,  853,  855,  852,
+      375,    0,  889,  451,  457,  854,  241,  866,  867,    0,
+        0,  868,    0,  891,    0,  837,  831,  241, 3351,    0,
+        0,    0,  864,  891,  851,  903,  912,  921,    0,  941,
+        0,  823,  820,  679,    0,  954,  831,  964,  990,  824,
+     3351,  535,  785,  837,  980,  968, 1020,  987, 1045, 1054,
+     1063, 1084, 1121, 1158,  792,  789, 1198, 1207, 1216, 1042,
+      796,  780,  767,  759,  744,  749,  726, 1225, 1234, 1243,
+     1264,  749,  739, 1276, 1285, 1294, 1104,  711,  683, 1078,
+     3351,    0, 1303, 1312, 1321, 1342,  690,  673, 1121,  692,
+
+     1367, 1376, 1003,  668,  663,  652,  634,  632, 1385, 1349,
+     1394, 1403, 1412,  644,  631, 1131,  653, 1421, 1430, 1266,
+      622,  617, 1437, 1451, 1476, 1485, 1494,  618,  610, 1503,
+     1512, 1521,  608,  613,  614,  592, 1530, 1539, 1548,  601,
+      603, 1557, 1566, 1575,  594,  598, 1584, 1593, 1602,  576,
+      567, 1450,  515, 1611, 1620, 1461,  483,  233,  465,  456,
+     1629, 1647, 1659, 1668, 1677,  458,  280, 1646,  470, 1686,
+     1695, 1704,  442,  356, 1710, 1724, 1749, 1758, 1767,  440,
+      431, 1775, 1783, 1791,  440,  460, 3351,  423,  401, 1800,
+     1809, 1818,  390, 1826, 1834, 1842,  379, 1850, 1858, 1866,
+
+      366,    0, 1723,  372, 1874, 1882, 1735,  471,  343,   36,
+     1891, 1909, 1921, 1930, 1939,  594, 1909,  363, 1947, 1955,
+     1963,  595, 1969, 1983, 2007, 2015, 2023,  618, 2032, 2041,
+     2050, 2059,  622, 3351,  267, 3351, 2068, 2077, 2086, 2095,
+     2104, 2113, 2122, 2131, 2140, 2149, 2158, 2167,    0, 1983,
+      278, 2176, 2185, 2194, 2203,  664,    0, 2212, 2230, 2242,
+     2251, 2260, 2269, 2278, 1993,  270, 2287, 2296, 2305, 2314,
+      966, 2229, 2328, 2353, 2362, 2371, 2380, 2389, 2398, 2407,
+     2416, 2327,  325, 2425, 2434, 2443, 2452, 2461, 2470, 2479,
+     2488, 2338,  695, 2497, 2506, 2515, 2522, 2529, 2536,  260,
+
+     2545, 2554, 2563, 2571, 2589, 2601, 2610, 2619, 2588,  237,
+     2628, 2637, 2646, 2652, 2666, 2691, 2700, 2709, 2718, 2727,
+     2736, 2745, 2754, 2763, 2772, 2781, 2790, 2799, 2808, 2817,
+     2665,  232, 2826, 2835, 2676, 2844, 2862, 2874, 2883, 2892,
+     2861,  210, 2901, 2910, 2919, 2925, 2939, 2964, 2973, 2982,
+     2938, 2949, 2989, 2998, 3007, 3016, 3023, 3030, 3037, 3044,
+     3051, 3058,    0, 3065, 1467,  843, 3074, 3083,    0, 3090,
+     2682, 1337, 3097, 3104, 3351, 3125, 3129, 3136, 3140, 3144,
+     3149, 3156, 3163, 3170, 3177, 3184, 3188, 3192, 3196, 3201,
+     3207, 3214, 3221, 3227, 3233, 3239, 3245, 3252, 3257, 3261,
+
+     3268, 3275, 3279, 3286, 3293, 3300, 3307, 3314, 3320, 3326,
+     3332, 3338, 3344
     } ;
 
-static yyconst short int yy_def[378] =
+static yyconst short int yy_def[514] =
     {   0,
-      329,    1,  329,    3,  329,    5,  329,  329,  329,  329,
-      329,  330,  331,  329,  332,  329,  333,  329,   18,   18,
-      329,  329,  334,  334,   24,  329,  335,  336,  329,  336,
-      337,  338,  329,  339,  329,   35,   35,  329,  336,  329,
-       40,   40,  340,  341,  342,  342,  342,  343,  329,  344,
-      345,  329,   52,   52,  342,  329,   56,   56,  342,  346,
-      329,  329,  330,  329,  331,  332,  333,   18,  347,   68,
-       18,   18,   18,  335,  348,   24,   24,   24,  329,  329,
-      336,  336,  337,  338,  339,   35,  336,   86,   35,   35,
-       35,  341,  349,   40,   40,   40,  329,  329,  342,  342,
-
-      343,  344,  345,   52,  342,  104,   52,   52,   52,  346,
-      350,   56,   56,   56,  351,  352,  353,  348,   24,   24,
-      336,  121,  121,  349,   40,   40,  342,  127,  127,  350,
-       56,   56,  354,  329,  351,  351,  351,   24,   24,  336,
-      336,  121,  121,  121,   40,   40,  342,  342,  127,  127,
-      127,   56,   56,  355,  356,  357,   24,   24,  121,  159,
-      159,   40,   40,  127,  164,  164,   56,   56,  358,  329,
-      355,  355,  355,   24,   24,  336,  336,  159,  159,  159,
-       40,   40,  342,  342,  164,  164,  164,   56,   56,  359,
-      360,  361,   24,  329,  329,  336,  196,  196,   40,  342,
-
-      200,  200,   56,  329,  329,  359,  359,  359,   24,  336,
-      336,  196,  196,  196,   40,  342,  342,  200,  200,  200,
-       56,  362,  363,  364,  362,  329,  329,  336,  228,  228,
-      228,  342,  232,  232,  232,  365,  329,  366,  366,  366,
-      367,  329,  336,  336,  230,  245,  245,  245,  336,  342,
-      342,  234,  252,  252,  252,  342,  368,  369,  370,  367,
-      329,  336,  262,  262,  248,  336,  342,  267,  267,  255,
-      342,  371,  329,  368,  368,  368,  336,  336,  262,  262,
-      262,  342,  342,  267,  267,  267,  372,  373,  374,  262,
-      290,  290,  267,  293,  293,  375,  329,  372,  372,  372,
-
-      336,  336,  290,  290,  290,  342,  342,  293,  293,  293,
-      376,  375,  377,  336,  301,  314,  342,  306,  317,  329,
-      376,  376,  336,  314,  314,  342,  317,  317,    0,  329,
-      329,  329,  329,  329,  329,  329,  329,  329,  329,  329,
-      329,  329,  329,  329,  329,  329,  329,  329,  329,  329,
-      329,  329,  329,  329,  329,  329,  329,  329,  329,  329,
-      329,  329,  329,  329,  329,  329,  329,  329,  329,  329,
-      329,  329,  329,  329,  329,  329,  329
+      475,    1,  475,    3,  475,    5,  475,    7,  475,  476,
+      475,  475,  475,  477,  478,  475,  475,  479,  475,  480,
+      476,  476,  476,  475,  475,  475,   26,   26,  475,   26,
+       26,   26,   26,   26,   26,  481,  475,  482,  483,  482,
+      484,  475,  485,  481,   44,   44,  475,  482,  475,   49,
+       49,  475,   49,  486,  486,  487,  475,  488,  489,  486,
+      486,  486,  475,   63,   63,   63,  490,  475,  491,  492,
+      493,  494,  495,  496,  490,   75,   75,  494,  475,   79,
+       79,  494,   79,  476,  475,  475,  477,  497,  475,  478,
+      479,  480,  498,  476,  476,  476,  476,  476,   30,  499,
+
+       26,   26,   26,  475,  475,   30,   30,   30,   30,   30,
+      481,  482,  482,  483,  484,  485,  500,   44,  481,   44,
+       44,   44,   53,  501,   49,   49,   49,  475,  475,  486,
+      487,  488,  489,  486,  486,  486,  486,  486,   66,  502,
+       63,   63,   63,  490,  494,  491,  503,  504,  505,  506,
+      475,  507,  508,  509,  510,  511,  490,  490,  157,  157,
+      157,  512,  513,  475,  164,  164,  476,  476,  476,  499,
+       26,   26,   30,   30,   30,   30,   30,   44,   44,   44,
+      501,   49,   49,  486,  486,  486,  502,   63,   63,  490,
+      475,  494,  157,  157,  157,  513,  164,  164,  476,  476,
+
+      476,  476,  476,   26,   26,   30,   30,   30,   44,  481,
+       44,   44,   44,   49,   49,  486,  486,  486,  486,  486,
+       63,   63,  157,  490,  157,  157,  157,  164,  164,  476,
+      476,  476,   26,   26,   30,   30,   44,   44,   44,   49,
+       49,  486,  486,  486,   63,   63,  157,  157,  157,  164,
+      164,  476,  476,  476,  476,  476,   26,   26,   30,   30,
+       44,  481,   44,   44,   44,   49,   49,  486,  486,  486,
+      486,  486,   63,   63,  157,  490,  157,  157,  157,  164,
+      164,  476,  476,  476,   26,  475,  475,   30,   30,   44,
+       44,   44,   49,  486,  486,  486,   63,  157,  157,  157,
+
+      164,  494,  476,  476,  476,  476,  476,   26,   30,   30,
+       44,  481,   44,   44,   44,   49,  486,  486,  486,  486,
+      486,   63,  157,  490,  157,  157,  157,  164,  476,  476,
+      476,  476,  475,  475,   30,  475,   44,   44,   44,   44,
+      486,  486,  486,  486,  157,  157,  157,  157,  494,  476,
+      476,  476,  476,  476,  476,  476,   30,   44,  481,   44,
+       44,   44,   44,   44,  486,  486,  486,  486,  486,  486,
+      486,  157,  490,  157,  157,  157,  157,  157,  476,  476,
+      476,  476,  476,   44,   44,   44,   44,   44,  486,  486,
+      486,  486,  486,  157,  157,  157,  157,  157,  476,  476,
+
+      476,  476,  476,   44,  481,   44,   44,   44,  486,  486,
+      486,  486,  486,  157,  490,  157,  157,  157,  476,  476,
+      476,   44,   44,   44,  486,  486,  486,  157,  157,  157,
+      476,  476,  476,  476,  476,   44,  481,   44,   44,   44,
+      486,  486,  486,  486,  486,  157,  490,  157,  157,  157,
+      476,  476,  476,   44,   44,   44,  486,  486,  486,  157,
+      157,  157,  476,  476,  476,  481,   44,   44,  486,  486,
+      486,  490,  157,  157,    0,  475,  475,  475,  475,  475,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+      475,  475,  475
     } ;
 
-static yyconst short int yy_nxt[1271] =
+static yyconst short int yy_nxt[3404] =
     {   0,
-        8,    9,   10,   11,   12,   13,   14,    8,   15,   16,
-        8,    8,   17,   18,   19,   20,   18,   18,   18,   18,
-       21,   22,   23,   23,   23,   24,   23,   25,   23,   23,
-       26,    8,   27,   28,    9,   29,   30,   28,   31,   28,
-       28,   32,   33,   28,   28,   34,   35,   36,   37,   35,
-       35,   35,   35,   38,   39,   40,   40,   40,   41,   40,
-       42,   40,   40,   43,   28,   44,   45,    9,   10,   46,
-       47,   48,   45,   49,   50,   16,   45,   45,   51,   52,
-       53,   54,   52,   52,   52,   52,   21,   55,   56,   56,
-       56,   57,   56,   58,   56,   56,   59,   45,   60,   68,
-
-       69,  321,   70,   70,   70,   70,   70,   70,   70,   79,
-       80,   68,   68,   68,   68,   68,   68,   68,   68,   81,
-       68,   68,   71,   71,   71,   71,   71,   71,   71,   72,
-       72,   72,   72,   72,   73,   74,   75,   74,   75,   78,
-       81,   81,   65,   76,   97,   80,   79,   80,  116,  117,
-       76,  119,   76,   77,  120,   79,   80,   74,   81,   74,
-       76,   81,  139,   66,   81,   79,   80,   81,   81,   81,
-       81,   81,   81,  320,   86,   87,   81,   88,   88,   88,
-       88,   88,   88,   88,   65,   81,   86,   86,   86,   86,
-       86,   86,   86,   86,   81,   86,   86,   89,   89,   89,
-
-       89,   89,   89,   89,   90,   90,   90,   90,   90,   91,
-       81,   81,  204,   81,   81,   81,   81,   81,   81,  329,
-       92,   93,   81,   94,   94,   94,   94,   94,   94,   94,
-      311,   81,   94,   94,   94,   94,   94,   94,   94,   94,
-       81,   94,   92,   81,  155,  156,   81,   81,   81,   81,
-       81,   81,  133,   99,   93,   81,   67,  138,  133,  137,
-      134,   76,  287,   66,   81,   76,  329,  157,   76,  169,
-       99,  158,   76,  175,  174,   76,  173,  170,  257,   99,
-       99,  191,  192,   99,   99,   99,   99,  209,   99,   76,
-      104,  105,   99,  106,  106,  106,  106,  106,  106,  106,
-
-      190,   99,  104,  104,  104,  104,  104,  104,  104,  104,
-       99,  104,  104,  107,  107,  107,  107,  107,  107,  107,
-      108,  108,  108,  108,  108,  109,   99,  169,  154,   99,
-       99,   99,   99,  115,   99,  329,  110,  111,   99,  112,
-      112,  112,  112,  112,  112,  112,   99,   99,  112,  112,
-      112,  112,  112,  112,  112,  112,   99,  112,  110,   99,
-      194,   81,   99,   99,   99,   99,   76,   99,  194,  193,
-      111,   99,  258,  259,   99,  204,  236,   67,  236,  195,
-       99,  208,  205,  240,  241,   76,  260,  195,  329,   99,
-      329,   99,   68,   68,   68,   68,   68,   68,   68,   81,
-
-       99,   86,   86,   86,   86,   86,   86,   86,  121,  122,
-      123,  121,  121,  121,  121,   81,  194,  272,   81,   81,
-       81,   81,   81,   81,  276,  273,   93,   81,  194,  288,
-      289,  226,  226,  226,  226,  195,   81,   81,  272,   99,
-       81,   81,   81,   81,   81,   81,  329,  195,   81,   81,
-      227,  227,  227,  227,  312,  313,   76,  306,   81,   99,
-       81,  104,  104,  104,  104,  104,  104,  104,  127,  128,
-      129,  127,  127,  127,  127,   99,  301,  296,   99,   99,
-       99,   99,  296,   99,  300,  297,  111,   99,  236,  296,
-      242,  242,  242,  249,  249,  249,   99,  256,  256,  256,
-
-      236,  296,  261,  261,  261,   99,   99,  296,  296,   99,
-       99,   99,   99,  296,   99,  329,   99,   99,   99,  243,
-      282,  266,  266,  266,  322,  320,  250,   99,  271,  271,
-      271,  261,  261,  261,  314,  314,   99,  140,   81,  141,
-      141,  141,  141,  141,  141,  141,  142,  142,  142,  142,
-      142,  142,  142,  143,  143,  143,  143,  143,  144,   81,
-      317,  317,   81,   81,   81,   81,   81,   81,  277,  272,
-       93,   81,  266,  266,  266,  271,  271,  271,  272,  272,
-       81,  147,   99,  148,  148,  148,  148,  148,  148,  148,
-      149,  149,  149,  149,  149,  149,  149,  150,  150,  150,
-
-      150,  150,  151,   99,   81,  329,   99,   99,   99,   99,
-      272,   99,  272,  270,  111,   99,  250,  265,  243,  236,
-      236,  236,  236,  236,   99,  236,   99,  216,   81,  210,
-      204,  204,  204,   99,  159,  160,  161,  159,  159,  159,
-      159,  164,  165,  166,  164,  164,  164,  164,  176,  221,
-      177,  177,  177,  177,  177,  177,  177,  178,  178,  178,
-      178,  178,  178,  178,  179,  179,  179,  179,  179,  180,
-      183,  215,  184,  184,  184,  184,  184,  184,  184,  185,
-      185,  185,  185,  185,  185,  185,  186,  186,  186,  186,
-      186,  187,  196,  197,  198,  196,  196,  196,  196,  200,
-
-      201,  202,  200,  200,  200,  200,  210,  211,  211,  211,
-      211,  211,  211,  211,  212,  212,  212,  212,  212,  212,
-      212,  213,  213,  213,  213,  213,  214,  216,  217,  217,
-      217,  217,  217,  217,  217,  218,  218,  218,  218,  218,
-      218,  218,  219,  219,  219,  219,  219,  220,  222,  223,
-      224,  225,  222,  222,  222,  228,  229,  230,  231,  228,
-      228,  228,  232,  233,  234,  235,  232,  232,  232,  243,
-      204,  244,  244,  244,  244,  244,  244,  244,  245,  245,
-      245,  245,  245,  245,  245,  246,  246,  246,  246,  246,
-      247,  248,  250,  204,  251,  251,  251,  251,  251,  251,
-
-      251,  252,  252,  252,  252,  252,  252,  252,  253,  253,
-      253,  253,  253,  254,  255,  262,  263,  264,  262,  262,
-      262,  262,  248,  248,  248,  248,  248,  248,  265,  265,
-      265,  265,  265,  265,  265,  267,  268,  269,  267,  267,
-      267,  267,  255,  255,  255,  255,  255,  255,  270,  270,
-      270,  270,  270,  270,  270,  277,  203,  278,  278,  278,
-      278,  278,  278,  278,  279,  279,  279,  279,  279,  279,
-      279,  280,  280,  280,  280,  280,  281,  282,   99,  283,
-      283,  283,  283,  283,  283,  283,  284,  284,  284,  284,
-      284,  284,  284,  285,  285,  285,  285,  285,  286,  290,
-
-      291,  292,  290,  290,  290,  290,  293,  294,  295,  293,
-      293,  293,  293,  301,  183,  302,  302,  302,  302,  302,
-      302,  302,  303,  303,  303,  303,  303,  303,  303,  304,
-      304,  304,  304,  304,  305,  306,  199,  307,  307,  307,
-      307,  307,  307,  307,  308,  308,  308,  308,  308,  308,
-      308,  309,  309,  309,  309,  309,  310,  314,  315,  316,
-      314,  314,  314,  314,  317,  318,  319,  317,  317,  317,
-      317,  323,  323,  323,  323,  323,  323,  323,  324,  324,
-      324,  324,  324,  325,  326,  326,  326,  326,  326,  326,
-      326,  327,  327,  327,  327,  327,  328,   63,   63,   63,
-
-       63,   63,   63,   63,   63,   63,   63,   65,   81,   65,
-      176,   65,   65,   65,   65,   65,   65,   66,  169,   66,
-      169,   66,   66,   66,   66,   66,   66,   67,  169,  189,
-       67,   67,   67,   67,   67,   76,   76,  188,   76,   74,
-       74,  182,   74,   81,  181,   81,   81,   81,   81,   81,
-       81,   81,   83,  169,   83,   83,   83,   83,   83,   83,
-       83,   83,   84,  169,   84,   84,   84,   84,   84,   84,
-       84,   84,   85,  168,   85,   85,   85,   85,   85,   85,
-       85,   98,  167,   99,  147,  163,  162,   81,   98,   98,
-       92,  140,   92,   92,   92,   92,   92,   92,   92,   99,
-
-      133,   99,  133,   99,   99,   99,   99,   99,   99,  101,
-      133,  101,  153,  101,  101,  101,  101,  101,  101,  102,
-      152,  102,  146,  102,  102,  102,  102,  102,  102,  103,
-      145,  103,  103,  103,  103,  103,  103,  103,  103,  110,
-       75,  110,  133,  110,  110,  110,  110,  110,  110,  118,
-      133,  132,  118,  124,  131,  124,  124,  124,  124,  124,
-      124,  124,  130,  104,  130,  105,  130,  130,  130,  130,
-      130,  130,  134,  100,  134,  135,  126,  135,  136,  125,
-      136,  170,   86,  170,  171,   87,  171,  172,   82,  172,
-      205,  205,  206,  206,  207,  207,  237,   76,  237,  238,
-
-       75,  238,  239,   68,  239,  241,   69,  241,  260,   64,
-      260,  273,   62,  273,  274,   61,  274,  275,  114,  275,
-      297,  113,  297,  298,  100,  298,  299,   96,  299,   95,
-       82,   75,   64,   62,   61,  329,    7,  329,  329,  329,
-      329,  329,  329,  329,  329,  329,  329,  329,  329,  329,
-      329,  329,  329,  329,  329,  329,  329,  329,  329,  329,
-      329,  329,  329,  329,  329,  329,  329,  329,  329,  329
+       10,   11,   12,   13,   10,   14,   15,   16,   17,   18,
+       19,   10,   10,   20,   21,   22,   23,   21,   21,   21,
+       21,   24,   25,   17,   26,   26,   26,   26,   26,   27,
+       26,   28,   26,   26,   26,   26,   29,   10,   30,   30,
+       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
+       30,   30,   31,   32,   33,  104,  105,  336,   34,  336,
+       35,   36,   11,   37,   38,   36,   36,   39,   40,   40,
+       41,   42,   36,   36,   43,   44,   45,   46,   44,   44,
+       44,   44,   47,   48,   40,   49,   49,   49,   49,   49,
+       50,   49,   51,   49,   49,   49,   49,   52,   36,   53,
+
+       53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
+       53,   53,   53,   54,   11,   12,   13,   54,   55,   56,
+       17,   57,   58,   19,   54,   54,   59,   60,   61,   62,
+       60,   60,   60,   60,   24,   25,   17,   63,   63,   63,
+       63,   63,   64,   63,   65,   63,   63,   63,   63,   29,
+       54,   66,   66,   66,   66,   66,   66,   66,   66,   66,
+       66,   66,   66,   66,   66,   67,   11,   68,   13,   69,
+       70,   71,   72,   72,   73,   19,   67,   67,   74,   75,
+       76,   77,   75,   75,   75,   75,   78,   25,   72,   79,
+       79,   79,   79,   79,   80,   79,   81,   79,   79,   79,
+
+       79,   82,   67,   83,   83,   83,   83,   83,   83,   83,
+       83,   83,   83,   83,   83,   83,   83,   88,   89,   88,
+      104,  105,  441,   88,   88,   93,   88,   84,  112,   93,
+       93,  112,  112,  112,  286,  112,  112,   88,   88,   88,
+      104,  105,  104,  105,  431,   93,  112,  112,  112,  409,
+      112,  112,   88,   94,  287,   95,   95,   95,   95,   95,
+       95,   95,   94,  112,   96,   96,   96,   96,   96,   96,
+       96,   94,  399,   97,   97,   97,   97,   97,   98,   95,
+       84,  286,  365,  112,   84,   84,   84,  112,  112,   84,
+      350,   99,  100,   84,  101,  101,  101,  101,  101,  101,
+
+      101,  287,  112,  112,  101,  101,  101,  101,  101,  101,
+      101,  101,  101,  101,  101,  101,  357,  101,   99,   99,
+       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
+       99,   99,   99,   99,   99,   99,   99,   99,   99,  383,
+      383,  383,   99,   99,   99,   99,   99,   99,   99,   99,
+       99,   99,   99,   99,  117,   99,  111,  286,  117,  117,
+      120,  120,  120,  120,  120,  120,  120,  121,  121,  121,
+      121,  121,  122,  112,  117,  112,  317,  287,  112,  112,
+      112,  335,  112,  112,  118,  303,  119,  119,  119,  119,
+      119,  119,  119,  328,  112,  112,  111,  112,  112,  112,
+
+      111,  111,  111,  112,  112,  111,  322,  123,  124,  111,
+      125,  125,  125,  125,  125,  125,  125,  316,  112,  112,
+      125,  125,  125,  125,  125,  125,  125,  125,  125,  125,
+      125,  125,  286,  125,  123,  123,  123,  123,  123,  123,
+      123,  123,  123,  123,  123,  123,  123,  123,  128,  105,
+      310,   93,  302,  130,  112,   93,   93,  129,  112,  112,
+      112,  286,  145,  145,  112,  112,  309,  308,  129,  129,
+      129,   93,  333,  112,  112,  301,  145,  297,  145,  112,
+      112,  287,  268,  129,  123,  123,  123,  123,  123,  123,
+      123,  145,  334,  293,  123,  123,  123,  123,  123,  123,
+
+      123,  123,  123,  123,  123,  123,  289,  123,  134,  288,
+      135,  135,  135,  135,  135,  135,  135,  134,  285,  136,
+      136,  136,  136,  136,  136,  136,  134,  252,  137,  137,
+      137,  137,  137,  138,  135,  130,  150,  151,  150,  130,
+      130,  130,  145,  145,  130,  150,  139,  140,  130,  141,
+      141,  141,  141,  141,  141,  141,  145,  150,  145,  141,
+      141,  141,  141,  141,  141,  141,  141,  141,  141,  141,
+      141,  145,  141,  139,  139,  139,  139,  139,  139,  139,
+      139,  139,  139,  139,  139,  139,  139,  139,  139,  139,
+      139,  139,  139,  139,  281,  333,  333,  139,  139,  139,
+
+      139,  139,  139,  139,  139,  139,  139,  139,  139,  280,
+      139,  147,  147,  147,  144,  334,  334,  148,  148,  333,
+      147,  145,  145,  333,   93,  274,  144,  273,  156,  156,
+      267,  148,  147,  148,  266,  145,  260,  145,  259,  349,
+      258,  257,  145,  334,  156,  251,  148,  150,  151,  150,
+      145,  250,  246,  152,  152,  245,  150,  145,  159,  159,
+      159,  159,  159,  159,  159,  216,  241,  152,  150,  152,
+      160,  160,  160,  160,  160,  161,  350,  240,  383,  383,
+      383,  206,  152,  145,  145,  236,  145,  145,  157,  235,
+      158,  158,  158,  158,  158,  158,  158,  145,  234,  145,
+
+      145,  233,  145,   93,  199,   84,  229,   93,   93,  393,
+      393,  393,  145,  144,  228,  145,  222,  144,  144,  144,
+      145,  145,  144,   93,  162,  163,  144,  164,  164,  164,
+      164,  164,  164,  164,  145,  221,  145,  164,  164,  164,
+      164,  164,  164,  164,  164,  164,  164,  164,  164,  145,
+      164,  162,  162,  162,  162,  162,  162,  162,  162,  162,
+      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
+      162,  162,  215,  214,  206,  162,  162,  162,  162,  162,
+      162,  162,  162,  162,  162,  162,  162,  208,  162,   88,
+       89,   88,  145,  145,  206,   88,   88,  207,   88,  167,
+
+      168,  169,  167,  167,  167,  167,  145,  206,  145,   88,
+       88,   88,   94,  205,   95,   95,   95,   95,   95,   95,
+      204,  145,  198,  197,   88,   94,  151,   95,   95,   95,
+       95,   95,   95,   95,   94,  191,   95,   95,   95,   95,
+       95,   95,   95,   84,  145,  145,  112,   84,   84,   84,
+      112,  112,   84,  189,  188,   84,   84,  117,  145,  111,
+      145,  117,  117,  134,  183,  112,  112,   93,  182,  130,
+      112,   93,   93,  145,  112,  112,  112,  117,  111,  118,
+      178,  179,  180,  178,  178,  178,  178,   93,  111,  112,
+      112,  111,  113,  177,  112,  111,  111,  111,  112,  112,
+
+      111,  176,  175,  111,  111,  184,  185,  186,  184,  184,
+      184,  184,  174,  112,  112,  134,  173,  135,  135,  135,
+      135,  135,  135,  135,  134,  172,  135,  135,  135,  135,
+      135,  135,  135,  134,  171,  135,  135,  135,  135,  135,
+      135,  130,   94,   89,   86,  130,  130,  130,   85,  166,
+      130,  165,  143,  130,  130,  147,  147,  147,  190,  142,
+      127,  148,  148,  126,  147,  147,  147,  147,  192,  113,
+      110,   93,  109,  145,  147,  148,  147,  148,  365,  108,
+      393,  393,  393,   93,  107,  144,  147,  156,  156,  145,
+      148,  150,  151,  150,  145,  145,  106,  152,  152,  157,
+
+      150,  145,  103,  156,  145,  102,   86,   85,  145,  475,
+      145,  152,  150,  152,  475,  199,  145,  200,  200,  200,
+      200,  200,  200,  145,  475,  475,  152,  145,  145,  475,
+      475,  475,  475,  475,  193,  194,  195,  193,  193,  193,
+      193,  145,   84,  145,  475,  475,   84,   84,   84,  475,
+      475,   84,  475,  475,  100,   84,  145,  157,  475,  158,
+      158,  158,  158,  158,  158,  158,  157,  475,  158,  158,
+      158,  158,  158,  158,  158,  157,  475,  158,  158,  158,
+      158,  158,  158,  144,  144,  145,  145,  475,  144,  144,
+      144,  145,  145,  144,  475,  475,  163,  144,  475,  145,
+
+      475,  145,  475,  475,  130,  145,  475,  145,  130,  130,
+      130,  475,  475,  130,  145,  475,  140,  130,  475,  475,
+      145,  144,  475,  475,  475,  144,  144,  144,  145,  145,
+      144,  475,  475,  144,  144,  230,  231,  232,  230,  230,
+      230,  230,  145,  475,  145,  242,  243,  244,  242,  242,
+      242,  242,  475,  475,  475,  475,  475,  145,  144,  475,
+      475,  475,  144,  144,  144,  145,  145,  144,  475,  162,
+      163,  144,  164,  164,  164,  164,  164,  164,  164,  145,
+      475,  145,  164,  164,  164,  164,  164,  164,  164,  164,
+      164,  164,  164,  164,  145,  164,  162,  162,  162,  162,
+
+      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
+      199,  475,  200,  200,  200,  200,  200,  200,  200,  199,
+      475,  201,  201,  201,  201,  201,  201,  201,  199,  475,
+      202,  202,  202,  202,  202,  203,  200,  209,  475,  210,
+      210,  210,  210,  210,  210,  210,  209,  475,  211,  211,
+      211,  211,  211,  211,  211,  209,  475,  212,  212,  212,
+      212,  212,  213,  210,  111,  475,  475,  112,  111,  111,
+      111,  112,  112,  111,  475,  475,  124,  111,  216,  475,
+      217,  217,  217,  217,  217,  217,  112,  112,  216,  475,
+      217,  217,  217,  217,  217,  217,  217,  216,  475,  218,
+
+      218,  218,  218,  218,  218,  218,  216,  475,  219,  219,
+      219,  219,  219,  220,  217,  223,  475,  224,  224,  224,
+      224,  224,  224,  224,  223,  475,  225,  225,  225,  225,
+      225,  225,  225,  223,  475,  226,  226,  226,  226,  226,
+      227,  224,  144,  475,  145,  145,  144,  144,  144,  145,
+      145,  144,  112,  475,  163,  144,  112,  112,  145,  475,
+      145,  209,  475,  145,  475,  145,  475,  475,  475,  475,
+      475,  112,  112,  145,  475,  475,  475,  475,  145,  199,
+      475,  200,  200,  200,  200,  200,  200,  200,  199,  475,
+      200,  200,  200,  200,  200,  200,  200,  111,  475,  237,
+
+      238,  239,  237,  237,  237,  237,  209,  475,  210,  210,
+      210,  210,  210,  210,  210,  209,  475,  210,  210,  210,
+      210,  210,  210,  210,  209,  475,  210,  210,  210,  210,
+      210,  210,  111,  216,  475,  217,  217,  217,  217,  217,
+      217,  217,  216,  475,  217,  217,  217,  217,  217,  217,
+      217,  247,  248,  249,  247,  247,  247,  247,  145,  145,
+      475,  475,  475,  223,  282,  283,  284,  282,  282,  282,
+      282,  475,  145,  252,  145,  253,  253,  253,  253,  253,
+      253,  463,  463,  463,  463,  463,  463,  145,  223,  475,
+      224,  224,  224,  224,  224,  224,  224,  223,  475,  224,
+
+      224,  224,  224,  224,  224,  224,  223,  475,  224,  224,
+      224,  224,  224,  224,  144,  252,  475,  253,  253,  253,
+      253,  253,  253,  253,  252,  475,  254,  254,  254,  254,
+      254,  254,  254,  252,  475,  255,  255,  255,  255,  255,
+      256,  253,  261,  475,  262,  262,  262,  262,  262,  262,
+      262,  261,  475,  263,  263,  263,  263,  263,  263,  263,
+      261,  475,  264,  264,  264,  264,  264,  265,  262,  268,
+      475,  269,  269,  269,  269,  269,  269,  269,  268,  475,
+      270,  270,  270,  270,  270,  270,  270,  268,  475,  271,
+      271,  271,  271,  271,  272,  269,  275,  475,  276,  276,
+
+      276,  276,  276,  276,  276,  275,  475,  277,  277,  277,
+      277,  277,  277,  277,  275,  475,  278,  278,  278,  278,
+      278,  279,  276,  252,  475,  253,  253,  253,  253,  253,
+      253,  253,  252,  475,  253,  253,  253,  253,  253,  253,
+      253,  111,  475,  290,  291,  292,  290,  290,  290,  290,
+      112,  475,  475,  475,  112,  112,  475,  475,  475,  261,
+      294,  295,  296,  294,  294,  294,  294,  475,  475,  112,
+      112,  261,  475,  262,  262,  262,  262,  262,  262,  262,
+      261,  475,  262,  262,  262,  262,  262,  262,  262,  261,
+      475,  262,  262,  262,  262,  262,  262,  111,  268,  475,
+
+      269,  269,  269,  269,  269,  269,  269,  268,  475,  269,
+      269,  269,  269,  269,  269,  269,  268,  475,  269,  269,
+      269,  269,  269,  269,  298,  299,  300,  298,  298,  298,
+      298,  145,  145,  475,  475,  475,  275,  329,  330,  331,
+      332,  329,  329,  329,  475,  145,  475,  145,  303,  304,
+      304,  304,  304,  304,  304,  475,  475,  475,  475,  475,
+      145,  275,  475,  276,  276,  276,  276,  276,  276,  276,
+      275,  475,  276,  276,  276,  276,  276,  276,  276,  275,
+      475,  276,  276,  276,  276,  276,  276,  144,  303,  304,
+      304,  304,  304,  304,  304,  304,  303,  305,  305,  305,
+
+      305,  305,  305,  305,  303,  306,  306,  306,  306,  306,
+      307,  304,  111,  311,  312,  312,  312,  312,  312,  312,
+      312,  111,  311,  313,  313,  313,  313,  313,  313,  313,
+      111,  311,  314,  314,  314,  314,  314,  315,  312,  317,
+      318,  318,  318,  318,  318,  318,  318,  317,  319,  319,
+      319,  319,  319,  319,  319,  317,  320,  320,  320,  320,
+      320,  321,  318,  323,  324,  324,  324,  324,  324,  324,
+      324,  323,  325,  325,  325,  325,  325,  325,  325,  323,
+      326,  326,  326,  326,  326,  327,  324,  303,  304,  304,
+      304,  304,  304,  304,  304,  303,  304,  304,  304,  304,
+
+      304,  304,  304,  111,  475,  337,  338,  339,  340,  337,
+      337,  337,  112,  475,  475,  475,  112,  112,  475,  475,
+      475,  475,  311,  341,  342,  343,  344,  341,  341,  341,
+      475,  112,  112,  111,  311,  312,  312,  312,  312,  312,
+      312,  312,  111,  311,  312,  312,  312,  312,  312,  312,
+      312,  111,  311,  312,  312,  312,  312,  312,  312,  111,
+      317,  318,  318,  318,  318,  318,  318,  318,  317,  318,
+      318,  318,  318,  318,  318,  318,  317,  318,  318,  318,
+      318,  318,  318,  345,  346,  347,  348,  345,  345,  345,
+      145,  145,  475,  475,  475,  475,  323,  379,  380,  381,
+
+      379,  379,  379,  379,  145,  475,  145,  389,  390,  391,
+      389,  389,  389,  389,  475,  475,  475,  475,  475,  145,
+      323,  324,  324,  324,  324,  324,  324,  324,  323,  324,
+      324,  324,  324,  324,  324,  324,  323,  324,  324,  324,
+      324,  324,  324,  144,  350,  475,  351,  351,  351,  351,
+      351,  351,  351,  350,  475,  352,  352,  352,  352,  352,
+      352,  352,  350,  475,  353,  353,  353,  353,  353,  354,
+      355,  350,  475,  356,  356,  356,  351,  351,  351,  351,
+      358,  475,  359,  359,  359,  359,  359,  359,  359,  358,
+      475,  360,  360,  360,  360,  360,  360,  360,  358,  475,
+
+      361,  361,  361,  361,  361,  362,  363,  358,  475,  364,
+      364,  364,  359,  359,  359,  359,  365,  475,  366,  366,
+      366,  366,  366,  366,  366,  365,  475,  367,  367,  367,
+      367,  367,  367,  367,  365,  475,  368,  368,  368,  368,
+      368,  369,  370,  365,  475,  371,  371,  371,  366,  366,
+      366,  366,  372,  475,  373,  373,  373,  373,  373,  373,
+      373,  372,  475,  374,  374,  374,  374,  374,  374,  374,
+      372,  475,  375,  375,  375,  375,  375,  376,  377,  372,
+      475,  378,  378,  378,  373,  373,  373,  373,  350,  475,
+      355,  355,  355,  355,  355,  355,  355,  350,  475,  355,
+
+      355,  355,  355,  355,  355,  355,  350,  475,  355,  355,
+      355,  355,  355,  355,  382,  350,  475,  382,  382,  382,
+      382,  382,  382,  382,  111,  475,  384,  385,  386,  384,
+      384,  384,  384,  112,  475,  475,  475,  112,  112,  475,
+      475,  475,  358,  394,  395,  396,  394,  394,  394,  394,
+      475,  475,  112,  112,  358,  475,  363,  363,  363,  363,
+      363,  363,  363,  358,  475,  363,  363,  363,  363,  363,
+      363,  363,  358,  475,  363,  363,  363,  363,  363,  363,
+      387,  358,  475,  387,  387,  387,  387,  387,  387,  387,
+      358,  475,  388,  388,  388,  111,  111,  111,  111,  365,
+
+      475,  370,  370,  370,  370,  370,  370,  370,  365,  475,
+      370,  370,  370,  370,  370,  370,  370,  365,  475,  370,
+      370,  370,  370,  370,  370,  392,  365,  475,  392,  392,
+      392,  392,  392,  392,  392,  145,  145,  475,  475,  475,
+      372,  382,  382,  382,  382,  382,  382,  382,  475,  145,
+      475,  145,  392,  392,  392,  392,  392,  392,  392,  475,
+      475,  475,  475,  475,  145,  372,  475,  377,  377,  377,
+      377,  377,  377,  377,  372,  475,  377,  377,  377,  377,
+      377,  377,  377,  372,  475,  377,  377,  377,  377,  377,
+      377,  397,  372,  475,  397,  397,  397,  397,  397,  397,
+
+      397,  372,  475,  398,  398,  398,  144,  144,  144,  144,
+      399,  475,  400,  400,  400,  400,  400,  400,  400,  399,
+      475,  401,  401,  401,  401,  401,  401,  401,  399,  475,
+      402,  402,  402,  402,  402,  403,  400,  404,  475,  405,
+      405,  405,  405,  405,  405,  405,  404,  475,  406,  406,
+      406,  406,  406,  406,  406,  404,  475,  407,  407,  407,
+      407,  407,  408,  405,  111,  475,  387,  387,  387,  387,
+      387,  387,  387,  111,  475,  388,  388,  388,  111,  111,
+      111,  111,  409,  475,  410,  410,  410,  410,  410,  410,
+      410,  409,  475,  411,  411,  411,  411,  411,  411,  411,
+
+      409,  475,  412,  412,  412,  412,  412,  413,  410,  414,
+      475,  415,  415,  415,  415,  415,  415,  415,  414,  475,
+      416,  416,  416,  416,  416,  416,  416,  414,  475,  417,
+      417,  417,  417,  417,  418,  415,  397,  397,  397,  397,
+      397,  397,  397,  398,  398,  398,  144,  144,  144,  144,
+      419,  420,  421,  419,  419,  419,  419,  399,  475,  400,
+      400,  400,  400,  400,  400,  400,  399,  475,  400,  400,
+      400,  400,  400,  400,  400,  399,  475,  400,  400,  400,
+      400,  400,  400,  111,  475,  422,  423,  424,  422,  422,
+      422,  422,  112,  475,  475,  475,  112,  112,  475,  475,
+
+      475,  404,  425,  426,  427,  425,  425,  425,  425,  475,
+      475,  112,  112,  404,  475,  405,  405,  405,  405,  405,
+      405,  405,  404,  475,  405,  405,  405,  405,  405,  405,
+      405,  404,  475,  405,  405,  405,  405,  405,  405,  111,
+      409,  475,  410,  410,  410,  410,  410,  410,  410,  409,
+      475,  410,  410,  410,  410,  410,  410,  410,  409,  475,
+      410,  410,  410,  410,  410,  410,  428,  429,  430,  428,
+      428,  428,  428,  145,  145,  475,  475,  475,  414,  451,
+      452,  453,  451,  451,  451,  451,  475,  145,  431,  145,
+      432,  432,  432,  432,  432,  432,  469,  469,  469,  469,
+
+      469,  469,  145,  414,  475,  415,  415,  415,  415,  415,
+      415,  415,  414,  475,  415,  415,  415,  415,  415,  415,
+      415,  414,  475,  415,  415,  415,  415,  415,  415,  144,
+      431,  475,  432,  432,  432,  432,  432,  432,  432,  431,
+      475,  433,  433,  433,  433,  433,  433,  433,  431,  475,
+      434,  434,  434,  434,  434,  435,  432,  436,  475,  437,
+      437,  437,  437,  437,  437,  437,  436,  475,  438,  438,
+      438,  438,  438,  438,  438,  436,  475,  439,  439,  439,
+      439,  439,  440,  437,  441,  475,  442,  442,  442,  442,
+      442,  442,  442,  441,  475,  443,  443,  443,  443,  443,
+
+      443,  443,  441,  475,  444,  444,  444,  444,  444,  445,
+      442,  446,  475,  447,  447,  447,  447,  447,  447,  447,
+      446,  475,  448,  448,  448,  448,  448,  448,  448,  446,
+      475,  449,  449,  449,  449,  449,  450,  447,  431,  475,
+      432,  432,  432,  432,  432,  432,  432,  431,  475,  432,
+      432,  432,  432,  432,  432,  432,  111,  475,  454,  455,
+      456,  454,  454,  454,  454,  112,  475,  475,  475,  112,
+      112,  475,  475,  475,  436,  457,  458,  459,  457,  457,
+      457,  457,  475,  475,  112,  112,  436,  475,  437,  437,
+      437,  437,  437,  437,  437,  436,  475,  437,  437,  437,
+
+      437,  437,  437,  437,  436,  475,  437,  437,  437,  437,
+      437,  437,  111,  441,  475,  442,  442,  442,  442,  442,
+      442,  442,  441,  475,  442,  442,  442,  442,  442,  442,
+      442,  441,  475,  442,  442,  442,  442,  442,  442,  460,
+      461,  462,  460,  460,  460,  460,  145,  145,  475,  475,
+      475,  446,  463,  463,  463,  463,  463,  463,  463,  475,
+      145,  475,  145,  451,  451,  451,  451,  451,  451,  451,
+      475,  475,  475,  475,  475,  145,  446,  475,  447,  447,
+      447,  447,  447,  447,  447,  446,  475,  447,  447,  447,
+      447,  447,  447,  447,  446,  475,  447,  447,  447,  447,
+
+      447,  447,  144,  464,  464,  464,  464,  464,  465,  463,
+      111,  475,  466,  466,  466,  466,  466,  466,  466,  111,
+      475,  454,  454,  454,  454,  454,  454,  454,  111,  475,
+      467,  467,  467,  467,  467,  468,  466,  469,  469,  469,
+      469,  469,  469,  469,  457,  457,  457,  457,  457,  457,
+      457,  470,  470,  470,  470,  470,  471,  469,  472,  472,
+      472,  472,  472,  472,  472,  460,  460,  460,  460,  460,
+      460,  460,  473,  473,  473,  473,  473,  474,  472,  463,
+      463,  463,  463,  463,  463,  463,  111,  475,  466,  466,
+      466,  466,  466,  466,  466,  111,  475,  466,  466,  466,
+
+      466,  466,  466,  111,  469,  469,  469,  469,  469,  469,
+      469,  472,  472,  472,  472,  472,  472,  472,  472,  472,
+      472,  472,  472,  472,  144,   84,  475,  475,   84,   87,
+       87,   87,   87,   87,   87,   87,   90,  475,  475,   90,
+       91,  475,  475,   91,   92,  475,   92,   92,   92,  111,
+      475,  111,  111,  111,  475,  111,  112,  475,  112,  112,
+      112,  475,  112,  114,  475,  114,  114,  114,  475,  114,
+      115,  475,  115,  115,  115,  475,  115,  116,  475,  116,
+      116,  116,  475,  116,  130,  475,  475,  130,  131,  475,
+      475,  131,  132,  475,  475,  132,  133,  475,  133,  133,
+
+      133,  144,  475,  475,  144,  144,  144,  146,  146,  146,
+      146,  146,  146,  146,  149,  149,  149,  149,  149,  149,
+      149,  153,  475,  475,  153,  153,  153,  145,  475,  475,
+      145,  145,  145,  154,  475,  475,  154,  154,  154,  155,
+      475,  155,  155,  155,  155,   88,   88,   88,   88,   88,
+       88,   88,   93,  475,   93,  475,   93,  170,  475,  475,
+      170,  117,  475,  117,  117,  117,  475,  117,  181,  475,
+      181,  181,  181,  475,  181,  187,  475,  475,  187,  147,
+      147,  147,  147,  147,  147,  147,  148,  148,  148,  148,
+      148,  148,  148,  149,  149,  149,  149,  149,  149,  149,
+
+      150,  150,  150,  150,  150,  150,  150,  152,  152,  152,
+      152,  152,  152,  152,  153,  475,  475,  153,  153,  153,
+      154,  475,  475,  154,  154,  154,  155,  475,  155,  155,
+      155,  155,  156,  475,  156,  156,  156,  156,  162,  475,
+      475,  162,  162,  162,  196,  475,  475,  196,  196,  196,
+        9,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+
+      475,  475,  475
     } ;
 
-static yyconst short int yy_chk[1271] =
+static yyconst short int yy_chk[3404] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    3,    3,    3,    3,    3,    3,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    2,    2,    2,   29,   29,  310,    2,  310,
+        2,    3,    3,    3,    3,    3,    3,    3,    3,    3,
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    5,    5,    5,    5,
+        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
+
+        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
+        3,    3,    3,    5,    5,    5,    5,    5,    5,    5,
+        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
-        5,    5,    5,    5,    5,    5,    5,    5,    5,   18,
-
-       18,  377,   18,   18,   18,   18,   18,   18,   18,   26,
-       26,   18,   18,   18,   18,   18,   18,   18,   18,   31,
-       18,   18,   19,   19,   19,   19,   19,   19,   19,   20,
-       20,   20,   20,   20,   20,   23,   23,   24,   24,   25,
-       32,   34,   31,   25,   43,   43,   59,   59,   69,   69,
-       77,   77,   78,   24,   78,   79,   79,   23,   34,   24,
-      120,   83,  120,   32,   35,   97,   97,   35,   35,   35,
-       35,   35,   35,  376,   35,   35,   35,   35,   35,   35,
-       35,   35,   35,   35,   83,   35,   35,   35,   35,   35,
-       35,   35,   35,   35,   85,   35,   35,   36,   36,   36,
-
-       36,   36,   36,   36,   37,   37,   37,   37,   37,   37,
-       40,   85,  208,   40,   40,   40,   40,   40,   40,  208,
-       40,   40,   40,   40,   40,   40,   40,   40,   40,   40,
-      375,   40,   40,   40,   40,   40,   40,   40,   40,   40,
-       84,   40,   40,   44,  133,  133,   44,   44,   44,   44,
-       44,   44,  117,   51,   44,   44,   51,  119,  137,  117,
-      117,  119,  371,   84,   44,  138,  137,  138,  139,  156,
-       51,  139,  157,  158,  157,  158,  156,  156,  365,   51,
-       52,  169,  169,   52,   52,   52,   52,  193,   52,  193,
-       52,   52,   52,   52,   52,   52,   52,   52,   52,   52,
-
-      358,   52,   52,   52,   52,   52,   52,   52,   52,   52,
-       52,   52,   52,   53,   53,   53,   53,   53,   53,   53,
-       54,   54,   54,   54,   54,   54,   56,  173,  354,   56,
-       56,   56,   56,  347,   56,  173,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  328,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   60,
-      175,  325,   60,   60,   60,   60,  174,   60,  182,  174,
-       60,   60,  236,  236,  103,  192,  224,  103,  240,  175,
-       60,  192,  192,  224,  224,  175,  240,  182,  322,   60,
-       68,  103,   68,   68,   68,   68,   68,   68,   68,   86,
-
-      103,   86,   86,   86,   86,   86,   86,   86,   87,   87,
-       87,   87,   87,   87,   87,   92,  189,  259,   92,   92,
-       92,   92,   92,   92,  259,  259,   92,   92,  194,  272,
-      272,  209,  215,  221,  226,  189,   92,   93,  276,  310,
-       93,   93,   93,   93,   93,   93,  276,  194,   93,   93,
-      209,  215,  221,  226,  296,  296,  209,  307,   93,  104,
-      305,  104,  104,  104,  104,  104,  104,  104,  105,  105,
-      105,  105,  105,  105,  105,  110,  302,  289,  110,  110,
-      110,  110,  299,  110,  289,  289,  110,  110,  225,  298,
-      225,  225,  225,  231,  231,  231,  110,  235,  235,  235,
-
-      242,  297,  242,  242,  242,  110,  111,  300,  288,  111,
-      111,  111,  111,  287,  111,  300,  286,  111,  111,  249,
-      283,  249,  249,  249,  313,  313,  256,  111,  256,  256,
-      256,  261,  261,  261,  315,  315,  111,  121,  281,  121,
-      121,  121,  121,  121,  121,  121,  122,  122,  122,  122,
-      122,  122,  122,  123,  123,  123,  123,  123,  123,  124,
-      318,  318,  124,  124,  124,  124,  124,  124,  278,  275,
-      124,  124,  266,  266,  266,  271,  271,  271,  274,  273,
-      124,  127,  270,  127,  127,  127,  127,  127,  127,  127,
-      128,  128,  128,  128,  128,  128,  128,  129,  129,  129,
-
-      129,  129,  129,  130,  265,  260,  130,  130,  130,  130,
-      258,  130,  257,  254,  130,  130,  251,  247,  244,  241,
-      239,  238,  237,  223,  130,  222,  220,  217,  214,  211,
-      207,  206,  205,  130,  140,  140,  140,  140,  140,  140,
-      140,  147,  147,  147,  147,  147,  147,  147,  159,  203,
-      159,  159,  159,  159,  159,  159,  159,  160,  160,  160,
-      160,  160,  160,  160,  161,  161,  161,  161,  161,  161,
-      164,  199,  164,  164,  164,  164,  164,  164,  164,  165,
-      165,  165,  165,  165,  165,  165,  166,  166,  166,  166,
-      166,  166,  176,  176,  176,  176,  176,  176,  176,  183,
-
-      183,  183,  183,  183,  183,  183,  196,  196,  196,  196,
-      196,  196,  196,  196,  197,  197,  197,  197,  197,  197,
-      197,  198,  198,  198,  198,  198,  198,  200,  200,  200,
-      200,  200,  200,  200,  200,  201,  201,  201,  201,  201,
-      201,  201,  202,  202,  202,  202,  202,  202,  204,  204,
-      204,  204,  204,  204,  204,  210,  210,  210,  210,  210,
-      210,  210,  216,  216,  216,  216,  216,  216,  216,  228,
-      191,  228,  228,  228,  228,  228,  228,  228,  229,  229,
-      229,  229,  229,  229,  229,  230,  230,  230,  230,  230,
-      230,  230,  232,  190,  232,  232,  232,  232,  232,  232,
-
-      232,  233,  233,  233,  233,  233,  233,  233,  234,  234,
-      234,  234,  234,  234,  234,  243,  243,  243,  243,  243,
-      243,  243,  245,  245,  245,  245,  245,  245,  248,  248,
-      248,  248,  248,  248,  248,  250,  250,  250,  250,  250,
-      250,  250,  252,  252,  252,  252,  252,  252,  255,  255,
-      255,  255,  255,  255,  255,  262,  188,  262,  262,  262,
-      262,  262,  262,  262,  263,  263,  263,  263,  263,  263,
-      263,  264,  264,  264,  264,  264,  264,  267,  187,  267,
-      267,  267,  267,  267,  267,  267,  268,  268,  268,  268,
-      268,  268,  268,  269,  269,  269,  269,  269,  269,  277,
-
-      277,  277,  277,  277,  277,  277,  282,  282,  282,  282,
-      282,  282,  282,  290,  184,  290,  290,  290,  290,  290,
-      290,  290,  291,  291,  291,  291,  291,  291,  291,  292,
-      292,  292,  292,  292,  292,  293,  181,  293,  293,  293,
-      293,  293,  293,  293,  294,  294,  294,  294,  294,  294,
-      294,  295,  295,  295,  295,  295,  295,  301,  301,  301,
-      301,  301,  301,  301,  306,  306,  306,  306,  306,  306,
-      306,  314,  314,  314,  314,  314,  314,  314,  316,  316,
-      316,  316,  316,  316,  317,  317,  317,  317,  317,  317,
-      317,  319,  319,  319,  319,  319,  319,  330,  330,  330,
-
-      330,  330,  330,  330,  330,  330,  330,  331,  180,  331,
-      177,  331,  331,  331,  331,  331,  331,  332,  172,  332,
-      171,  332,  332,  332,  332,  332,  332,  333,  170,  168,
-      333,  333,  333,  333,  333,  334,  334,  167,  334,  335,
-      335,  163,  335,  336,  162,  336,  336,  336,  336,  336,
-      336,  336,  337,  155,  337,  337,  337,  337,  337,  337,
-      337,  337,  338,  154,  338,  338,  338,  338,  338,  338,
-      338,  338,  339,  153,  339,  339,  339,  339,  339,  339,
-      339,  340,  152,  151,  148,  146,  145,  144,  340,  340,
-      341,  141,  341,  341,  341,  341,  341,  341,  341,  342,
-
-      136,  342,  135,  342,  342,  342,  342,  342,  342,  343,
-      134,  343,  132,  343,  343,  343,  343,  343,  343,  344,
-      131,  344,  126,  344,  344,  344,  344,  344,  344,  345,
-      125,  345,  345,  345,  345,  345,  345,  345,  345,  346,
-      118,  346,  116,  346,  346,  346,  346,  346,  346,  348,
-      115,  114,  348,  349,  113,  349,  349,  349,  349,  349,
-      349,  349,  350,  109,  350,  106,  350,  350,  350,  350,
-      350,  350,  351,  100,  351,  352,   96,  352,  353,   95,
-      353,  355,   91,  355,  356,   88,  356,  357,   82,  357,
-      359,  359,  360,  360,  361,  361,  362,   76,  362,  363,
-
-       74,  363,  364,   73,  364,  366,   70,  366,  367,   63,
-      367,  368,   62,  368,  369,   61,  369,  370,   58,  370,
-      372,   57,  372,  373,   46,  373,  374,   42,  374,   41,
-       30,   27,   12,   11,    9,    7,  329,  329,  329,  329,
-      329,  329,  329,  329,  329,  329,  329,  329,  329,  329,
-      329,  329,  329,  329,  329,  329,  329,  329,  329,  329,
-      329,  329,  329,  329,  329,  329,  329,  329,  329,  329
+        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
+        5,    5,    5,    5,    5,    7,    7,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,   14,   14,   14,
+       82,   82,  442,   14,   14,   20,   14,   20,   36,   20,
+       20,   39,   36,   36,  258,   39,   39,   14,   14,   14,
+      104,  104,  128,  128,  432,   20,  117,   36,   36,  410,
+       39,   39,   14,   21,  258,   21,   21,   21,   21,   21,
+       21,   21,   22,  117,   22,   22,   22,   22,   22,   22,
+       22,   23,  400,   23,   23,   23,   23,   23,   23,   23,
+       26,  267,  366,   41,   26,   26,   26,   41,   41,   26,
+      351,   26,   26,   26,   26,   26,   26,   26,   26,   26,
+
+       26,  267,   41,   41,   26,   26,   26,   26,   26,   26,
+       26,   26,   26,   26,   26,   26,  335,   26,   26,   26,
+       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
+       26,   26,   30,   30,   30,   30,   30,   30,   30,  383,
+      383,  383,   30,   30,   30,   30,   30,   30,   30,   30,
+       30,   30,   30,   30,   43,   30,   43,  274,   43,   43,
+       45,   45,   45,   45,   45,   45,   45,   46,   46,   46,
+       46,   46,   46,   43,   43,   44,  318,  274,  111,   44,
+       44,  309,  111,  111,   44,  304,   44,   44,   44,   44,
+       44,   44,   44,  301,   44,   44,   49,  111,  111,   49,
+
+       49,   49,   49,   49,   49,   49,  297,   49,   49,   49,
+       49,   49,   49,   49,   49,   49,   49,  293,   49,   49,
+       49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
+       49,   49,  281,   49,   49,   49,   49,   49,   49,   49,
+       49,   49,   49,   49,   49,   49,   49,   49,   52,   52,
+      289,   59,  281,   59,  114,   59,   59,   52,  114,  114,
+      115,  286,   67,   67,  115,  115,  288,  285,   52,   52,
+       52,   59,  308,  114,  114,  280,   67,  273,   67,  115,
+      115,  286,  269,   52,   53,   53,   53,   53,   53,   53,
+       53,   67,  308,  266,   53,   53,   53,   53,   53,   53,
+
+       53,   53,   53,   53,   53,   53,  260,   53,   60,  259,
+       60,   60,   60,   60,   60,   60,   60,   61,  257,   61,
+       61,   61,   61,   61,   61,   61,   62,  253,   62,   62,
+       62,   62,   62,   62,   62,   63,  152,  152,  152,   63,
+       63,   63,   71,   71,   63,  152,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   71,  152,   71,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   71,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   66,   66,   66,
+       66,   66,   66,   66,  251,  316,  322,   66,   66,   66,
+
+       66,   66,   66,   66,   66,   66,   66,   66,   66,  250,
+       66,   69,   69,   69,   69,  316,  322,   69,   69,  328,
+       69,   73,   73,  333,   74,  246,   74,  245,   74,   74,
+      241,   69,   69,   69,  240,   73,  236,   73,  235,  328,
+      234,  233,   74,  333,   74,  229,   69,   70,   70,   70,
+       73,  228,  222,   70,   70,  221,   70,   74,   76,   76,
+       76,   76,   76,   76,   76,  217,  215,   70,   70,   70,
+       77,   77,   77,   77,   77,   77,  356,  214,  356,  356,
+      356,  208,   70,   75,   75,  207,  144,  144,   75,  206,
+       75,   75,   75,   75,   75,   75,   75,   75,  205,   75,
+
+      144,  204,  144,   92,  200,   92,  198,   92,   92,  393,
+      393,  393,   75,   79,  197,  144,  189,   79,   79,   79,
+       79,   79,   79,   92,   79,   79,   79,   79,   79,   79,
+       79,   79,   79,   79,   79,  188,   79,   79,   79,   79,
+       79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
+       79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
+       79,   79,   79,   79,   79,   83,   83,   83,   83,   83,
+       83,   83,  183,  182,  177,   83,   83,   83,   83,   83,
+       83,   83,   83,   83,   83,   83,   83,  176,   83,   87,
+       87,   87,  153,  153,  175,   87,   87,  174,   87,   94,
+
+       94,   94,   94,   94,   94,   94,  153,  173,  153,   87,
+       87,   87,   98,  172,   98,   98,   98,   98,   98,   98,
+      171,  153,  166,  165,   87,   96,  150,   96,   96,   96,
+       96,   96,   96,   96,   97,  147,   97,   97,   97,   97,
+       97,   97,   97,  100,  154,  154,  466,  100,  100,  100,
+      466,  466,  100,  143,  142,  100,  100,  116,  154,  116,
+      154,  116,  116,  135,  127,  466,  466,  133,  126,  133,
+      119,  133,  133,  154,  119,  119,  116,  116,  118,  119,
+      118,  118,  118,  118,  118,  118,  118,  133,  122,  119,
+      119,  124,  113,  110,  124,  124,  124,  124,  124,  124,
+
+      124,  109,  108,  124,  124,  134,  134,  134,  134,  134,
+      134,  134,  107,  124,  124,  136,  106,  136,  136,  136,
+      136,  136,  136,  136,  137,  103,  137,  137,  137,  137,
+      137,  137,  137,  138,  102,  138,  138,  138,  138,  138,
+      138,  140,   95,   88,   86,  140,  140,  140,   85,   81,
+      140,   80,   65,  140,  140,  146,  146,  146,  146,   64,
+       51,  146,  146,   50,  146,  148,  148,  148,  148,   38,
+       35,  156,   34,  156,  148,  146,  146,  146,  371,   33,
+      371,  371,  371,  155,   32,  155,  148,  155,  155,  156,
+      146,  149,  149,  149,  158,  158,   31,  149,  149,  158,
+
+      149,  155,   28,  155,  156,   27,   13,   11,  158,    9,
+      158,  149,  149,  149,    0,  203,  155,  203,  203,  203,
+      203,  203,  203,  158,    0,    0,  149,  157,  157,    0,
+        0,    0,    0,    0,  157,  157,  157,  157,  157,  157,
+      157,  157,  170,  157,    0,    0,  170,  170,  170,    0,
+        0,  170,    0,    0,  170,  170,  157,  159,    0,  159,
+      159,  159,  159,  159,  159,  159,  160,    0,  160,  160,
+      160,  160,  160,  160,  160,  161,    0,  161,  161,  161,
+      161,  161,  161,  161,  162,  190,  190,    0,  162,  162,
+      162,  162,  162,  162,    0,    0,  162,  162,    0,  190,
+
+        0,  190,    0,    0,  187,  162,    0,  162,  187,  187,
+      187,    0,    0,  187,  190,    0,  187,  187,    0,    0,
+      162,  163,    0,    0,    0,  163,  163,  163,  163,  163,
+      163,    0,    0,  163,  163,  199,  199,  199,  199,  199,
+      199,  199,  163,    0,  163,  216,  216,  216,  216,  216,
+      216,  216,    0,    0,    0,    0,    0,  163,  164,    0,
+        0,    0,  164,  164,  164,  164,  164,  164,    0,  164,
+      164,  164,  164,  164,  164,  164,  164,  164,  164,  164,
+        0,  164,  164,  164,  164,  164,  164,  164,  164,  164,
+      164,  164,  164,  164,  164,  164,  164,  164,  164,  164,
+
+      164,  164,  164,  164,  164,  164,  164,  164,  164,  164,
+      167,    0,  167,  167,  167,  167,  167,  167,  167,  168,
+        0,  168,  168,  168,  168,  168,  168,  168,  169,    0,
+      169,  169,  169,  169,  169,  169,  169,  178,    0,  178,
+      178,  178,  178,  178,  178,  178,  179,    0,  179,  179,
+      179,  179,  179,  179,  179,  180,    0,  180,  180,  180,
+      180,  180,  180,  180,  181,    0,    0,  181,  181,  181,
+      181,  181,  181,  181,    0,    0,  181,  181,  220,    0,
+      220,  220,  220,  220,  220,  220,  181,  181,  184,    0,
+      184,  184,  184,  184,  184,  184,  184,  185,    0,  185,
+
+      185,  185,  185,  185,  185,  185,  186,    0,  186,  186,
+      186,  186,  186,  186,  186,  193,    0,  193,  193,  193,
+      193,  193,  193,  193,  194,    0,  194,  194,  194,  194,
+      194,  194,  194,  195,    0,  195,  195,  195,  195,  195,
+      195,  195,  196,    0,  472,  472,  196,  196,  196,  196,
+      196,  196,  210,    0,  196,  196,  210,  210,  472,    0,
+      472,  210,    0,  196,    0,  196,    0,    0,    0,    0,
+        0,  210,  210,  472,    0,    0,    0,    0,  196,  201,
+        0,  201,  201,  201,  201,  201,  201,  201,  202,    0,
+      202,  202,  202,  202,  202,  202,  202,  209,    0,  209,
+
+      209,  209,  209,  209,  209,  209,  211,    0,  211,  211,
+      211,  211,  211,  211,  211,  212,    0,  212,  212,  212,
+      212,  212,  212,  212,  213,    0,  213,  213,  213,  213,
+      213,  213,  213,  218,    0,  218,  218,  218,  218,  218,
+      218,  218,  219,    0,  219,  219,  219,  219,  219,  219,
+      219,  223,  223,  223,  223,  223,  223,  223,  224,  224,
+        0,    0,    0,  224,  252,  252,  252,  252,  252,  252,
+      252,    0,  224,  256,  224,  256,  256,  256,  256,  256,
+      256,  465,  465,  465,  465,  465,  465,  224,  225,    0,
+      225,  225,  225,  225,  225,  225,  225,  226,    0,  226,
+
+      226,  226,  226,  226,  226,  226,  227,    0,  227,  227,
+      227,  227,  227,  227,  227,  230,    0,  230,  230,  230,
+      230,  230,  230,  230,  231,    0,  231,  231,  231,  231,
+      231,  231,  231,  232,    0,  232,  232,  232,  232,  232,
+      232,  232,  237,    0,  237,  237,  237,  237,  237,  237,
+      237,  238,    0,  238,  238,  238,  238,  238,  238,  238,
+      239,    0,  239,  239,  239,  239,  239,  239,  239,  242,
+        0,  242,  242,  242,  242,  242,  242,  242,  243,    0,
+      243,  243,  243,  243,  243,  243,  243,  244,    0,  244,
+      244,  244,  244,  244,  244,  244,  247,    0,  247,  247,
+
+      247,  247,  247,  247,  247,  248,    0,  248,  248,  248,
+      248,  248,  248,  248,  249,    0,  249,  249,  249,  249,
+      249,  249,  249,  254,    0,  254,  254,  254,  254,  254,
+      254,  254,  255,    0,  255,  255,  255,  255,  255,  255,
+      255,  261,    0,  261,  261,  261,  261,  261,  261,  261,
+      262,    0,    0,    0,  262,  262,    0,    0,    0,  262,
+      268,  268,  268,  268,  268,  268,  268,    0,    0,  262,
+      262,  263,    0,  263,  263,  263,  263,  263,  263,  263,
+      264,    0,  264,  264,  264,  264,  264,  264,  264,  265,
+        0,  265,  265,  265,  265,  265,  265,  265,  270,    0,
+
+      270,  270,  270,  270,  270,  270,  270,  271,    0,  271,
+      271,  271,  271,  271,  271,  271,  272,    0,  272,  272,
+      272,  272,  272,  272,  275,  275,  275,  275,  275,  275,
+      275,  276,  276,    0,    0,    0,  276,  303,  303,  303,
+      303,  303,  303,  303,    0,  276,    0,  276,  307,  307,
+      307,  307,  307,  307,  307,    0,    0,    0,    0,    0,
+      276,  277,    0,  277,  277,  277,  277,  277,  277,  277,
+      278,    0,  278,  278,  278,  278,  278,  278,  278,  279,
+        0,  279,  279,  279,  279,  279,  279,  279,  282,  282,
+      282,  282,  282,  282,  282,  282,  283,  283,  283,  283,
+
+      283,  283,  283,  283,  284,  284,  284,  284,  284,  284,
+      284,  284,  290,  290,  290,  290,  290,  290,  290,  290,
+      290,  291,  291,  291,  291,  291,  291,  291,  291,  291,
+      292,  292,  292,  292,  292,  292,  292,  292,  292,  294,
+      294,  294,  294,  294,  294,  294,  294,  295,  295,  295,
+      295,  295,  295,  295,  295,  296,  296,  296,  296,  296,
+      296,  296,  296,  298,  298,  298,  298,  298,  298,  298,
+      298,  299,  299,  299,  299,  299,  299,  299,  299,  300,
+      300,  300,  300,  300,  300,  300,  300,  305,  305,  305,
+      305,  305,  305,  305,  305,  306,  306,  306,  306,  306,
+
+      306,  306,  306,  311,    0,  311,  311,  311,  311,  311,
+      311,  311,  312,    0,    0,    0,  312,  312,    0,    0,
+        0,    0,  312,  317,  317,  317,  317,  317,  317,  317,
+        0,  312,  312,  313,  313,  313,  313,  313,  313,  313,
+      313,  313,  314,  314,  314,  314,  314,  314,  314,  314,
+      314,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+      319,  319,  319,  319,  319,  319,  319,  319,  320,  320,
+      320,  320,  320,  320,  320,  320,  321,  321,  321,  321,
+      321,  321,  321,  323,  323,  323,  323,  323,  323,  323,
+      324,  324,    0,    0,    0,    0,  324,  350,  350,  350,
+
+      350,  350,  350,  350,  324,    0,  324,  365,  365,  365,
+      365,  365,  365,  365,    0,    0,    0,    0,    0,  324,
+      325,  325,  325,  325,  325,  325,  325,  325,  326,  326,
+      326,  326,  326,  326,  326,  326,  327,  327,  327,  327,
+      327,  327,  327,  327,  329,    0,  329,  329,  329,  329,
+      329,  329,  329,  330,    0,  330,  330,  330,  330,  330,
+      330,  330,  331,    0,  331,  331,  331,  331,  331,  331,
+      331,  332,    0,  332,  332,  332,  332,  332,  332,  332,
+      337,    0,  337,  337,  337,  337,  337,  337,  337,  338,
+        0,  338,  338,  338,  338,  338,  338,  338,  339,    0,
+
+      339,  339,  339,  339,  339,  339,  339,  340,    0,  340,
+      340,  340,  340,  340,  340,  340,  341,    0,  341,  341,
+      341,  341,  341,  341,  341,  342,    0,  342,  342,  342,
+      342,  342,  342,  342,  343,    0,  343,  343,  343,  343,
+      343,  343,  343,  344,    0,  344,  344,  344,  344,  344,
+      344,  344,  345,    0,  345,  345,  345,  345,  345,  345,
+      345,  346,    0,  346,  346,  346,  346,  346,  346,  346,
+      347,    0,  347,  347,  347,  347,  347,  347,  347,  348,
+        0,  348,  348,  348,  348,  348,  348,  348,  352,    0,
+      352,  352,  352,  352,  352,  352,  352,  353,    0,  353,
+
+      353,  353,  353,  353,  353,  353,  354,    0,  354,  354,
+      354,  354,  354,  354,  354,  355,    0,  355,  355,  355,
+      355,  355,  355,  355,  358,    0,  358,  358,  358,  358,
+      358,  358,  358,  359,    0,    0,    0,  359,  359,    0,
+        0,    0,  359,  372,  372,  372,  372,  372,  372,  372,
+        0,    0,  359,  359,  360,    0,  360,  360,  360,  360,
+      360,  360,  360,  361,    0,  361,  361,  361,  361,  361,
+      361,  361,  362,    0,  362,  362,  362,  362,  362,  362,
+      362,  363,    0,  363,  363,  363,  363,  363,  363,  363,
+      364,    0,  364,  364,  364,  364,  364,  364,  364,  367,
+
+        0,  367,  367,  367,  367,  367,  367,  367,  368,    0,
+      368,  368,  368,  368,  368,  368,  368,  369,    0,  369,
+      369,  369,  369,  369,  369,  369,  370,    0,  370,  370,
+      370,  370,  370,  370,  370,  373,  373,    0,    0,    0,
+      373,  382,  382,  382,  382,  382,  382,  382,    0,  373,
+        0,  373,  392,  392,  392,  392,  392,  392,  392,    0,
+        0,    0,    0,    0,  373,  374,    0,  374,  374,  374,
+      374,  374,  374,  374,  375,    0,  375,  375,  375,  375,
+      375,  375,  375,  376,    0,  376,  376,  376,  376,  376,
+      376,  376,  377,    0,  377,  377,  377,  377,  377,  377,
+
+      377,  378,    0,  378,  378,  378,  378,  378,  378,  378,
+      379,    0,  379,  379,  379,  379,  379,  379,  379,  380,
+        0,  380,  380,  380,  380,  380,  380,  380,  381,    0,
+      381,  381,  381,  381,  381,  381,  381,  384,    0,  384,
+      384,  384,  384,  384,  384,  384,  385,    0,  385,  385,
+      385,  385,  385,  385,  385,  386,    0,  386,  386,  386,
+      386,  386,  386,  386,  387,    0,  387,  387,  387,  387,
+      387,  387,  387,  388,    0,  388,  388,  388,  388,  388,
+      388,  388,  389,    0,  389,  389,  389,  389,  389,  389,
+      389,  390,    0,  390,  390,  390,  390,  390,  390,  390,
+
+      391,    0,  391,  391,  391,  391,  391,  391,  391,  394,
+        0,  394,  394,  394,  394,  394,  394,  394,  395,    0,
+      395,  395,  395,  395,  395,  395,  395,  396,    0,  396,
+      396,  396,  396,  396,  396,  396,  397,  397,  397,  397,
+      397,  397,  397,  398,  398,  398,  398,  398,  398,  398,
+      399,  399,  399,  399,  399,  399,  399,  401,    0,  401,
+      401,  401,  401,  401,  401,  401,  402,    0,  402,  402,
+      402,  402,  402,  402,  402,  403,    0,  403,  403,  403,
+      403,  403,  403,  404,    0,  404,  404,  404,  404,  404,
+      404,  404,  405,    0,    0,    0,  405,  405,    0,    0,
+
+        0,  405,  409,  409,  409,  409,  409,  409,  409,    0,
+        0,  405,  405,  406,    0,  406,  406,  406,  406,  406,
+      406,  406,  407,    0,  407,  407,  407,  407,  407,  407,
+      407,  408,    0,  408,  408,  408,  408,  408,  408,  408,
+      411,    0,  411,  411,  411,  411,  411,  411,  411,  412,
+        0,  412,  412,  412,  412,  412,  412,  412,  413,    0,
+      413,  413,  413,  413,  413,  413,  414,  414,  414,  414,
+      414,  414,  414,  415,  415,    0,    0,    0,  415,  431,
+      431,  431,  431,  431,  431,  431,    0,  415,  435,  415,
+      435,  435,  435,  435,  435,  435,  471,  471,  471,  471,
+
+      471,  471,  415,  416,    0,  416,  416,  416,  416,  416,
+      416,  416,  417,    0,  417,  417,  417,  417,  417,  417,
+      417,  418,    0,  418,  418,  418,  418,  418,  418,  418,
+      419,    0,  419,  419,  419,  419,  419,  419,  419,  420,
+        0,  420,  420,  420,  420,  420,  420,  420,  421,    0,
+      421,  421,  421,  421,  421,  421,  421,  422,    0,  422,
+      422,  422,  422,  422,  422,  422,  423,    0,  423,  423,
+      423,  423,  423,  423,  423,  424,    0,  424,  424,  424,
+      424,  424,  424,  424,  425,    0,  425,  425,  425,  425,
+      425,  425,  425,  426,    0,  426,  426,  426,  426,  426,
+
+      426,  426,  427,    0,  427,  427,  427,  427,  427,  427,
+      427,  428,    0,  428,  428,  428,  428,  428,  428,  428,
+      429,    0,  429,  429,  429,  429,  429,  429,  429,  430,
+        0,  430,  430,  430,  430,  430,  430,  430,  433,    0,
+      433,  433,  433,  433,  433,  433,  433,  434,    0,  434,
+      434,  434,  434,  434,  434,  434,  436,    0,  436,  436,
+      436,  436,  436,  436,  436,  437,    0,    0,    0,  437,
+      437,    0,    0,    0,  437,  441,  441,  441,  441,  441,
+      441,  441,    0,    0,  437,  437,  438,    0,  438,  438,
+      438,  438,  438,  438,  438,  439,    0,  439,  439,  439,
+
+      439,  439,  439,  439,  440,    0,  440,  440,  440,  440,
+      440,  440,  440,  443,    0,  443,  443,  443,  443,  443,
+      443,  443,  444,    0,  444,  444,  444,  444,  444,  444,
+      444,  445,    0,  445,  445,  445,  445,  445,  445,  446,
+      446,  446,  446,  446,  446,  446,  447,  447,    0,    0,
+        0,  447,  451,  451,  451,  451,  451,  451,  451,    0,
+      447,    0,  447,  452,  452,  452,  452,  452,  452,  452,
+        0,    0,    0,    0,    0,  447,  448,    0,  448,  448,
+      448,  448,  448,  448,  448,  449,    0,  449,  449,  449,
+      449,  449,  449,  449,  450,    0,  450,  450,  450,  450,
+
+      450,  450,  450,  453,  453,  453,  453,  453,  453,  453,
+      454,    0,  454,  454,  454,  454,  454,  454,  454,  455,
+        0,  455,  455,  455,  455,  455,  455,  455,  456,    0,
+      456,  456,  456,  456,  456,  456,  456,  457,  457,  457,
+      457,  457,  457,  457,  458,  458,  458,  458,  458,  458,
+      458,  459,  459,  459,  459,  459,  459,  459,  460,  460,
+      460,  460,  460,  460,  460,  461,  461,  461,  461,  461,
+      461,  461,  462,  462,  462,  462,  462,  462,  462,  464,
+      464,  464,  464,  464,  464,  464,  467,    0,  467,  467,
+      467,  467,  467,  467,  467,  468,    0,  468,  468,  468,
+
+      468,  468,  468,  468,  470,  470,  470,  470,  470,  470,
+      470,  473,  473,  473,  473,  473,  473,  473,  474,  474,
+      474,  474,  474,  474,  474,  476,    0,    0,  476,  477,
+      477,  477,  477,  477,  477,  477,  478,    0,    0,  478,
+      479,    0,    0,  479,  480,    0,  480,  480,  480,  481,
+        0,  481,  481,  481,    0,  481,  482,    0,  482,  482,
+      482,    0,  482,  483,    0,  483,  483,  483,    0,  483,
+      484,    0,  484,  484,  484,    0,  484,  485,    0,  485,
+      485,  485,    0,  485,  486,    0,    0,  486,  487,    0,
+        0,  487,  488,    0,    0,  488,  489,    0,  489,  489,
+
+      489,  490,    0,    0,  490,  490,  490,  491,  491,  491,
+      491,  491,  491,  491,  492,  492,  492,  492,  492,  492,
+      492,  493,    0,    0,  493,  493,  493,  494,    0,    0,
+      494,  494,  494,  495,    0,    0,  495,  495,  495,  496,
+        0,  496,  496,  496,  496,  497,  497,  497,  497,  497,
+      497,  497,  498,    0,  498,    0,  498,  499,    0,    0,
+      499,  500,    0,  500,  500,  500,    0,  500,  501,    0,
+      501,  501,  501,    0,  501,  502,    0,    0,  502,  503,
+      503,  503,  503,  503,  503,  503,  504,  504,  504,  504,
+      504,  504,  504,  505,  505,  505,  505,  505,  505,  505,
+
+      506,  506,  506,  506,  506,  506,  506,  507,  507,  507,
+      507,  507,  507,  507,  508,    0,    0,  508,  508,  508,
+      509,    0,    0,  509,  509,  509,  510,    0,  510,  510,
+      510,  510,  511,    0,  511,  511,  511,  511,  512,    0,
+        0,  512,  512,  512,  513,    0,    0,  513,  513,  513,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
+
+      475,  475,  475
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -753,9 +1275,9 @@ static char *yy_last_accepting_cpos;
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
 char *yytext;
-#line 1 "parse.lex"
+#line 1 "./parse.lex"
 #define INITIAL 0
-#line 2 "parse.lex"
+#line 2 "./parse.lex"
 /*
  * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com>
  * All rights reserved.
@@ -849,7 +1371,9 @@ extern void yyerror                __P((char *));
 
 #define GOTRUNAS 2
 
-#line 853 "lex.yy.c"
+#define GOTDEFS 3
+
+#line 1377 "lex.yy.c"
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -992,6 +1516,9 @@ YY_MALLOC_DECL
 #endif
 
 #define YY_RULE_SETUP \
+       if ( yyleng > 0 ) \
+               yy_current_buffer->yy_at_bol = \
+                               (yytext[yyleng - 1] == '\n'); \
        YY_USER_ACTION
 
 YY_DECL
@@ -1000,9 +1527,9 @@ YY_DECL
        register char *yy_cp, *yy_bp;
        register int yy_act;
 
-#line 105 "parse.lex"
+#line 106 "./parse.lex"
 
-#line 1006 "lex.yy.c"
+#line 1533 "lex.yy.c"
 
        if ( yy_init )
                {
@@ -1041,6 +1568,7 @@ YY_DECL
                yy_bp = yy_cp;
 
                yy_current_state = yy_start;
+               yy_current_state += YY_AT_BOL();
 yy_match:
                do
                        {
@@ -1053,13 +1581,13 @@ yy_match:
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 330 )
+                               if ( yy_current_state >= 476 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        ++yy_cp;
                        }
-               while ( yy_base[yy_current_state] != 1237 );
+               while ( yy_base[yy_current_state] != 3351 );
 
 yy_find_action:
                yy_act = yy_accept[yy_current_state];
@@ -1087,15 +1615,15 @@ do_action:      /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 106 "parse.lex"
+#line 107 "./parse.lex"
 {                      /* throw away space/tabs */
                            sawspace = TRUE;    /* but remember for fill_args */
                        }
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 110 "parse.lex"
-{ 
+#line 111 "./parse.lex"
+{
                            sawspace = TRUE;    /* remember for fill_args */
                            ++sudolineno;
                            LEXTRACE("\n\t");
@@ -1103,7 +1631,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 116 "parse.lex"
+#line 117 "./parse.lex"
 {
                            LEXTRACE("QUOTEDCHAR ");
                            fill_args(yytext + 1, 1, sawspace);
@@ -1112,147 +1640,169 @@ YY_RULE_SETUP
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 122 "parse.lex"
+#line 123 "./parse.lex"
+{
+                           /* XXX - should allow " to be quoted */
+                           LEXTRACE("WORD(1) ");
+                           fill(yytext + 1, yyleng - 2);
+                           return(WORD);
+                       }
+       YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 130 "./parse.lex"
+{
+                           BEGIN INITIAL;
+                           ++sudolineno;
+                           LEXTRACE("\n");
+                           return(COMMENT);
+                       }
+       YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 137 "./parse.lex"
 {
                            BEGIN INITIAL;
                            unput(*yytext);
                            return(COMMAND);
                        }                       /* end of command line args */
        YY_BREAK
-case 5:
+case 7:
 YY_RULE_SETUP
-#line 128 "parse.lex"
-{ 
-                           ++sudolineno; 
+#line 143 "./parse.lex"
+{
+                           ++sudolineno;
                            LEXTRACE("\n");
                            return(COMMENT);
                        }                       /* return newline */
        YY_BREAK
-case 6:
+case 8:
 YY_RULE_SETUP
-#line 134 "parse.lex"
+#line 149 "./parse.lex"
 {
                            ++sudolineno;
                            LEXTRACE("\n");
                            return(COMMENT);
                        }                       /* return comments */
        YY_BREAK
-case 7:
+case 9:
 YY_RULE_SETUP
-#line 140 "parse.lex"
+#line 155 "./parse.lex"
 {
                            LEXTRACE("ARG ");
                            fill_args(yytext, yyleng, sawspace);
                            sawspace = FALSE;
                          }                     /* a command line arg */
        YY_BREAK
-case 8:
+case 10:
 YY_RULE_SETUP
-#line 146 "parse.lex"
+#line 161 "./parse.lex"
 {
                            LEXTRACE(", ");
                            return(',');
                        }                       /* return ',' */
        YY_BREAK
-case 9:
+case 11:
 YY_RULE_SETUP
-#line 151 "parse.lex"
+#line 166 "./parse.lex"
 {
                            if (yyleng % 2 == 1)
                                return('!');    /* return '!' */
                        }
        YY_BREAK
-case 10:
+case 12:
 YY_RULE_SETUP
-#line 156 "parse.lex"
+#line 171 "./parse.lex"
 {
                            LEXTRACE("= ");
                            return('=');
                        }                       /* return '=' */
        YY_BREAK
-case 11:
+case 13:
 YY_RULE_SETUP
-#line 161 "parse.lex"
+#line 176 "./parse.lex"
 {
                            LEXTRACE(": ");
                            return(':');
                        }                       /* return ':' */
        YY_BREAK
-case 12:
+case 14:
 YY_RULE_SETUP
-#line 166 "parse.lex"
-{ 
+#line 181 "./parse.lex"
+{
                                /* cmnd does not require passwd for this user */
                                LEXTRACE("NOPASSWD ");
                                return(NOPASSWD);
                        }
        YY_BREAK
-case 13:
+case 15:
 YY_RULE_SETUP
-#line 172 "parse.lex"
-{ 
+#line 187 "./parse.lex"
+{
                                /* cmnd requires passwd for this user */
                                LEXTRACE("PASSWD ");
                                return(PASSWD);
                        }
        YY_BREAK
-case 14:
+case 16:
 YY_RULE_SETUP
-#line 178 "parse.lex"
+#line 193 "./parse.lex"
 {
                            /* netgroup */
                            fill(yytext, yyleng);
+                           LEXTRACE("NETGROUP ");
                            return(NETGROUP);
                        }
        YY_BREAK
-case 15:
+case 17:
 YY_RULE_SETUP
-#line 184 "parse.lex"
+#line 200 "./parse.lex"
 {
                            /* UN*X group */
                            fill(yytext, yyleng);
+                           LEXTRACE("GROUP ");
                            return(USERGROUP);
                        }
        YY_BREAK
-case 16:
+case 18:
 YY_RULE_SETUP
-#line 190 "parse.lex"
+#line 207 "./parse.lex"
 {
                            fill(yytext, yyleng);
                            LEXTRACE("NTWKADDR ");
                            return(NTWKADDR);
                        }
        YY_BREAK
-case 17:
+case 19:
 YY_RULE_SETUP
-#line 196 "parse.lex"
+#line 213 "./parse.lex"
 {
                            fill(yytext, yyleng);
                            LEXTRACE("NTWKADDR ");
                            return(NTWKADDR);
                        }
        YY_BREAK
-case 18:
+case 20:
 YY_RULE_SETUP
-#line 202 "parse.lex"
+#line 219 "./parse.lex"
 {
                            fill(yytext, yyleng);
                            LEXTRACE("FQHOST ");
                            return(FQHOST);
                        }
        YY_BREAK
-case 19:
+case 21:
 YY_RULE_SETUP
-#line 208 "parse.lex"
+#line 225 "./parse.lex"
 {
                                BEGIN GOTRUNAS;
                                LEXTRACE("RUNAS ");
                                return (RUNAS);
                        }
        YY_BREAK
-case 20:
+case 22:
 YY_RULE_SETUP
-#line 214 "parse.lex"
+#line 231 "./parse.lex"
 {
                            /* Runas_Alias user can run command as or ALL */
                            if (strcmp(yytext, "ALL") == 0) {
@@ -1265,40 +1815,26 @@ YY_RULE_SETUP
                            }
                        }
        YY_BREAK
-case 21:
+case 23:
 YY_RULE_SETUP
-#line 226 "parse.lex"
+#line 243 "./parse.lex"
 {
                            /* username/uid that user can run command as */
                            fill(yytext, yyleng);
-                           LEXTRACE("NAME ");
-                           return(NAME);
+                           LEXTRACE("WORD(2) ");
+                           return(WORD);
                        }
        YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 233 "parse.lex"
-BEGIN INITIAL;
-       YY_BREAK
-case 23:
+case 24:
 YY_RULE_SETUP
-#line 236 "parse.lex"
+#line 250 "./parse.lex"
 {
-                           /* directories can't have args... */
-                           if (yytext[yyleng - 1] == '/') {
-                               LEXTRACE("COMMAND ");
-                               fill_cmnd(yytext, yyleng);
-                               return(COMMAND);
-                           } else {
-                               BEGIN GOTCMND;
-                               LEXTRACE("COMMAND ");
-                               fill_cmnd(yytext, yyleng);
-                           }
-                       }                       /* a pathname */
+                           BEGIN INITIAL;
+                       }
        YY_BREAK
-case 24:
+case 25:
 YY_RULE_SETUP
-#line 249 "parse.lex"
+#line 254 "./parse.lex"
 {
                            if (strcmp(yytext, "ALL") == 0) {
                                LEXTRACE("ALL ");
@@ -1310,49 +1846,103 @@ YY_RULE_SETUP
                            }
                        }
        YY_BREAK
-case 25:
+case 26:
+YY_RULE_SETUP
+#line 265 "./parse.lex"
+{
+                           /* XXX - should allow [!=,] to be quoted */
+                           LEXTRACE("WORD(3) ");
+                           fill(yytext, yyleng);
+                           return(WORD);
+                       }
+       YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 272 "./parse.lex"
+{
+                           BEGIN GOTDEFS;
+                           if (yyleng == 9) {
+                               switch (yytext[8]) {
+                                   case ':' :
+                                       LEXTRACE("DEFAULTS_USER ");
+                                       return(DEFAULTS_USER);
+                                   case '@' :
+                                       LEXTRACE("DEFAULTS_HOST ");
+                                       return(DEFAULTS_HOST);
+                               }
+                           } else {
+                               LEXTRACE("DEFAULTS ");
+                               return(DEFAULTS);
+                           }
+                       }
+       YY_BREAK
+case 28:
 YY_RULE_SETUP
-#line 260 "parse.lex"
+#line 289 "./parse.lex"
 {
                            fill(yytext, yyleng);
-                           if (strcmp(yytext, "Host_Alias") == 0) {
+                           if (*yytext == 'H') {
                                LEXTRACE("HOSTALIAS ");
                                return(HOSTALIAS);
                            }
-                           if (strcmp(yytext, "Cmnd_Alias") == 0) {
+                           if (*yytext == 'C') {
                                LEXTRACE("CMNDALIAS ");
                                return(CMNDALIAS);
                            }
-                           if (strcmp(yytext, "User_Alias") == 0) {
+                           if (*yytext == 'U') {
                                LEXTRACE("USERALIAS ");
                                return(USERALIAS);
                            }
-                           if (strcmp(yytext, "Runas_Alias") == 0) {
+                           if (*yytext == 'R') {
                                LEXTRACE("RUNASALIAS ");
                                return(RUNASALIAS);
                            }
-
-                           /* NAME is what RFC1034 calls a label */
-                           LEXTRACE("NAME ");
-                           return(NAME);
                        }
        YY_BREAK
-case 26:
+case 29:
 YY_RULE_SETUP
-#line 284 "parse.lex"
+#line 309 "./parse.lex"
 {
+                           /* directories can't have args... */
+                           if (yytext[yyleng - 1] == '/') {
+                               LEXTRACE("COMMAND ");
+                               fill_cmnd(yytext, yyleng);
+                               return(COMMAND);
+                           } else {
+                               BEGIN GOTCMND;
+                               LEXTRACE("COMMAND ");
+                               fill_cmnd(yytext, yyleng);
+                           }
+                       }                       /* a pathname */
+       YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 322 "./parse.lex"
+{
+                           /* a word */
+                           fill(yytext, yyleng);
+                           LEXTRACE("WORD(4) ");
+                           return(WORD);
+                       }
+       YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 329 "./parse.lex"
+{
+                           LEXTRACE("ERROR ");
                            return(ERROR);
                        }       /* parse error */
        YY_BREAK
-case 27:
+case 32:
 YY_RULE_SETUP
-#line 288 "parse.lex"
+#line 334 "./parse.lex"
 ECHO;
        YY_BREAK
-#line 1353 "lex.yy.c"
+#line 1942 "lex.yy.c"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(GOTCMND):
 case YY_STATE_EOF(GOTRUNAS):
+case YY_STATE_EOF(GOTDEFS):
        yyterminate();
 
        case YY_END_OF_BUFFER:
@@ -1631,6 +2221,7 @@ static yy_state_type yy_get_previous_state()
        register char *yy_cp;
 
        yy_current_state = yy_start;
+       yy_current_state += YY_AT_BOL();
 
        for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
                {
@@ -1643,7 +2234,7 @@ static yy_state_type yy_get_previous_state()
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 330 )
+                       if ( yy_current_state >= 476 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1678,11 +2269,11 @@ yy_state_type yy_current_state;
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 330 )
+               if ( yy_current_state >= 476 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-       yy_is_jam = (yy_current_state == 329);
+       yy_is_jam = (yy_current_state == 475);
 
        return yy_is_jam ? 0 : yy_current_state;
        }
@@ -1801,6 +2392,7 @@ static int input()
        *yy_c_buf_p = '\0';     /* preserve yytext */
        yy_hold_char = *++yy_c_buf_p;
 
+       yy_current_buffer->yy_at_bol = (c == '\n');
 
        return c;
        }
@@ -2237,7 +2829,7 @@ int main()
        return 0;
        }
 #endif
-#line 288 "parse.lex"
+#line 334 "./parse.lex"
 
 static void
 fill(s, len)
index abb7ad5aacb391a6456eef3440387923c8775f00..5058a89de0667880ab88159ae5c07964585edca1 100644 (file)
--- a/logging.c
+++ b/logging.c
 static const char rcsid[] = "$Sudo$";
 #endif /* lint */
 
-#if (LOGGING & SLOG_SYSLOG)
 static void do_syslog          __P((int, char *));
-#endif
-#if (LOGGING & SLOG_FILE)
 static void do_logfile         __P((char *));
-#endif
 static void send_mail          __P((char *));
 static void mail_auth          __P((int, char *));
 
-#if (LOGGING & SLOG_SYSLOG)
-# ifdef BROKEN_SYSLOG
-#  define MAXSYSLOGTRIES       16      /* num of retries for broken syslogs */
-#  define SYSLOG               syslog_wrapper
+#ifdef BROKEN_SYSLOG
+# define MAXSYSLOGTRIES        16      /* num of retries for broken syslogs */
+# define SYSLOG                syslog_wrapper
 
 static void syslog_wrapper     __P((int, char *, char *, char *));
 
@@ -95,9 +90,9 @@ syslog_wrapper(pri, fmt, ap)
        if (vsyslog(pri, fmt, ap) == 0)
            break;
 }
-# else
-#  define SYSLOG               syslog
-# endif /* BROKEN_SYSLOG */
+#else
+# define SYSLOG                syslog
+#endif /* BROKEN_SYSLOG */
 
 /*
  * Log a message to syslog, pre-pending the username and splitting the
@@ -149,9 +144,7 @@ do_syslog(pri, msg)
        }
     }
 }
-#endif /* LOGGING & SLOG_SYSLOG */
 
-#if (LOGGING & SLOG_FILE)
 static void
 do_logfile(msg)
     char *msg;
@@ -161,96 +154,94 @@ do_logfile(msg)
     FILE *fp;
     mode_t oldmask;
     time_t now;
-    int maxlen = MAXLOGFILELEN;
+    int maxlen = sudo_inttable[I_LOGLEN];
 
     now = time((time_t) 0);
 
     oldmask = umask(077);
-    fp = fopen(_PATH_SUDO_LOGFILE, "a");
+    fp = fopen(sudo_strtable[I_LOGFILE], "a");
     (void) umask(oldmask);
     if (fp == NULL) {
        easprintf(&full_line, "Can't open log file: %s: %s",
-           _PATH_SUDO_LOGFILE, strerror(errno));
+           sudo_strtable[I_LOGFILE], strerror(errno));
        send_mail(full_line);
        free(full_line);
     } else if (!lock_file(fileno(fp), SUDO_LOCK)) {
        easprintf(&full_line, "Can't lock log file: %s: %s",
-           _PATH_SUDO_LOGFILE, strerror(errno));
+           sudo_strtable[I_LOGFILE], strerror(errno));
        send_mail(full_line);
        free(full_line);
     } else {
-# ifndef WRAP_LOG
-#  ifdef HOST_IN_LOG
-       (void) fprintf(fp, "%15.15s : %s : HOST=%s : %s\n", ctime(&now) + 4,
-           user_name, user_shost, msg);
-#  else
-       (void) fprintf(fp, "%15.15s : %s : %s\n", ctime(&now) + 4, user_name,
-           msg);
-#  endif
-# else
-#  ifdef HOST_IN_LOG
-       easprintf(&full_line, "%15.15s : %s : HOST=%s : %s",
-           ctime(&now) + 4, user_name, user_shost, msg);
-#  else
-       easprintf(&full_line, "%15.15s : %s : %s", ctime(&now) + 4,
-           user_name, msg);
-#  endif
-
-       /*
-        * Print out full_line with word wrap
-        */
-       beg = end = full_line;
-       while (beg) {
-           oldend = end;
-           end = strchr(oldend, ' ');
-
-           if (maxlen > 0 && end) {
-               *end = '\0';
-               if (strlen(beg) > maxlen) {
-                   /* too far, need to back up & print the line */
-
-                   if (beg == (char *)full_line)
-                       maxlen -= 4;            /* don't indent first line */
-
-                   *end = ' ';
-                   if (oldend != beg) {
-                       /* rewind & print */
-                       end = oldend-1;
-                       while (*end == ' ')
-                           --end;
-                       *(++end) = '\0';
-                       (void) fprintf(fp, "%s\n    ", beg);
+       if (sudo_inttable[I_LOGLEN] == 0) {
+           /* Don't pretty-print long log file lines (hard to grep) */
+           if (sudo_flag_set(FL_LOG_HOST))
+               (void) fprintf(fp, "%15.15s : %s : HOST=%s : %s\n",
+                   ctime(&now) + 4, user_name, user_shost, msg);
+           else
+               (void) fprintf(fp, "%15.15s : %s : %s\n", ctime(&now) + 4,
+                   user_name, msg);
+       } else {
+           if (sudo_flag_set(FL_LOG_HOST))
+               easprintf(&full_line, "%15.15s : %s : HOST=%s : %s",
+                   ctime(&now) + 4, user_name, user_shost, msg);
+           else
+               easprintf(&full_line, "%15.15s : %s : %s", ctime(&now) + 4,
+                   user_name, msg);
+
+           /*
+            * Print out full_line with word wrap
+            */
+           beg = end = full_line;
+           while (beg) {
+               oldend = end;
+               end = strchr(oldend, ' ');
+
+               if (maxlen > 0 && end) {
+                   *end = '\0';
+                   if (strlen(beg) > maxlen) {
+                       /* too far, need to back up & print the line */
+
+                       if (beg == (char *)full_line)
+                           maxlen -= 4;        /* don't indent first line */
+
                        *end = ' ';
+                       if (oldend != beg) {
+                           /* rewind & print */
+                           end = oldend-1;
+                           while (*end == ' ')
+                               --end;
+                           *(++end) = '\0';
+                           (void) fprintf(fp, "%s\n    ", beg);
+                           *end = ' ';
+                       } else {
+                           (void) fprintf(fp, "%s\n    ", beg);
+                       }
+
+                       /* reset beg to point to the start of the new substr */
+                       beg = end;
+                       while (*beg == ' ')
+                           ++beg;
                    } else {
-                       (void) fprintf(fp, "%s\n    ", beg);
+                       /* we still have room */
+                       *end = ' ';
                    }
 
-                   /* reset beg to point to the start of the new substring */
-                   beg = end;
-                   while (*beg == ' ')
-                       ++beg;
+                   /* remove leading whitespace */
+                   while (*end == ' ')
+                       ++end;
                } else {
-                   /* we still have room */
-                   *end = ' ';
+                   /* final line */
+                   (void) fprintf(fp, "%s\n", beg);
+                   beg = NULL;                 /* exit condition */
                }
-
-               /* remove leading whitespace */
-               while (*end == ' ')
-                   ++end;
-           } else {
-               /* final line */
-               (void) fprintf(fp, "%s\n", beg);
-               beg = NULL;                     /* exit condition */
            }
+           free(full_line);
        }
-       free(full_line);
-# endif
        (void) fflush(fp);
        (void) lock_file(fileno(fp), SUDO_UNLOCK);
        (void) fclose(fp);
     }
 }
-#endif /* LOGGING & SLOG_FILE */
 
 /*
  * Two main functions, log_error() to log errors and log_auth() to
@@ -263,14 +254,12 @@ log_auth(status, inform_user)
 {
     char *message;
     char *logline;
-#if (LOGGING & SLOG_SYSLOG)
     int pri;
 
     if (status & VALIDATE_OK)
        pri = PRI_SUCCESS;
     else
        pri = PRI_FAILURE;
-#endif /* LOGGING & SLOG_SYSLOG */
 
     /* Set error message, if any. */
     if (status & VALIDATE_OK)
@@ -285,7 +274,7 @@ log_auth(status, inform_user)
        message = "unknown error ; ";
 
     easprintf(&logline, "%sTTY=%s ; PWD=%s ; USER=%s ; COMMAND=%s%s%s",
-       message, user_tty, user_cwd, user_runas, user_cmnd,
+       message, user_tty, user_cwd, *user_runas, user_cmnd,
        user_args ? " " : "", user_args ? user_args : "");
 
     mail_auth(status, logline);                /* send mail based on status */
@@ -305,18 +294,16 @@ log_auth(status, inform_user)
            (void) fprintf(stderr,
                "Sorry, user %s is not allowed to execute '%s%s%s' as %s on %s.\n",
                user_name, user_cmnd, user_args ? " " : "",
-               user_args ? user_args : "", user_runas, user_host);
+               user_args ? user_args : "", *user_runas, user_host);
     }
 
     /*
      * Log via syslog and/or a file.
      */
-#if (LOGGING & SLOG_SYSLOG)
-    do_syslog(pri, logline);
-#endif
-#if (LOGGING & SLOG_FILE)
-    do_logfile(logline);
-#endif
+    if (sudo_inttable[I_LOGFAC] != (unsigned int)-1)
+       do_syslog(pri, logline);
+    if (sudo_strtable[I_LOGFILE])
+       do_logfile(logline);
 
     free(logline);
 }
@@ -358,22 +345,22 @@ log_error(va_alist)
        if (user_args) {
            easprintf(&logline,
                "%s: %s ; TTY=%s ; PWD=%s ; USER=%s ; COMMAND=%s %s",
-               message, strerror(serrno), user_tty, user_cwd, user_runas,
+               message, strerror(serrno), user_tty, user_cwd, *user_runas,
                user_cmnd, user_args);
        } else {
            easprintf(&logline,
                "%s: %s ; TTY=%s ; PWD=%s ; USER=%s ; COMMAND=%s", message,
-               strerror(serrno), user_tty, user_cwd, user_runas, user_cmnd);
+               strerror(serrno), user_tty, user_cwd, *user_runas, user_cmnd);
        }
     } else {
        if (user_args) {
            easprintf(&logline,
                "%s ; TTY=%s ; PWD=%s ; USER=%s ; COMMAND=%s %s", message,
-               user_tty, user_cwd, user_runas, user_cmnd, user_args);
+               user_tty, user_cwd, *user_runas, user_cmnd, user_args);
        } else {
            easprintf(&logline,
                "%s ; TTY=%s ; PWD=%s ; USER=%s ; COMMAND=%s", message,
-               user_tty, user_cwd, user_runas, user_cmnd);
+               user_tty, user_cwd, *user_runas, user_cmnd);
        }
     }
 
@@ -394,12 +381,10 @@ log_error(va_alist)
     /*
      * Log to syslog and/or a file.
      */
-#if (LOGGING & SLOG_SYSLOG)
-    do_syslog(PRI_FAILURE, logline);
-#endif
-#if (LOGGING & SLOG_FILE)
-    do_logfile(logline);
-#endif
+    if (sudo_inttable[I_LOGFAC] != (unsigned int)-1)
+       do_syslog(PRI_FAILURE, logline);
+    if (sudo_strtable[I_LOGFILE])
+       do_logfile(logline);
 
     free(logline);
     if (message != logline);
@@ -409,7 +394,6 @@ log_error(va_alist)
 /*
  * Send a message to ALERTMAIL
  */
-#ifdef _PATH_SENDMAIL
 static void
 send_mail(line)
     char *line;
@@ -419,6 +403,10 @@ send_mail(line)
     int pfd[2], pid;
     time_t now;
 
+    /* Just return if mailer is disabled. */
+    if (!sudo_strtable[I_MAILERPATH])
+       return;
+
     if ((pid = fork()) > 0) {  /* Child. */
 
        /* We do an explicit wait() later on... */
@@ -456,9 +444,9 @@ send_mail(line)
        (void) close(pfd[0]);
 
        /* Pipes are all setup, send message via sendmail. */
-       (void) fprintf(mail, "To: %s\nFrom: %s\nSubject: ", ALERTMAIL,
-           user_name);
-       for (p = MAILSUBJECT; *p; p++) {
+       (void) fprintf(mail, "To: %s\nFrom: %s\nSubject: ",
+           sudo_strtable[I_ALERTMAIL], user_name);
+       for (p = sudo_strtable[I_MAILSUB]; *p; p++) {
            /* Expand escapes in the subject */
            if (*p == '%' && *(p+1) != '%') {
                switch (*(++p)) {
@@ -491,14 +479,6 @@ send_mail(line)
        }
     }
 }
-#else
-static void
-send_mail(line)
-    char *line;
-{
-    return;
-}
-#endif
 
 /*
  * Send mail based on the value of "status" and compile-time options.
@@ -511,19 +491,18 @@ mail_auth(status, line)
     int mail_mask;
 
     /* If any of these bits are set in status, we send mail. */
-    mail_mask = VALIDATE_ERROR;
-#ifdef SEND_MAIL_WHEN_OK
-    mail_mask |= VALIDATE_OK;
-#endif
-#ifdef SEND_MAIL_WHEN_NO_USER
-    mail_mask |= FLAG_NO_USER;
-#endif
-#ifdef SEND_MAIL_WHEN_NO_HOST
-    mail_mask |= FLAG_NO_HOST;
-#endif
-#ifdef SEND_MAIL_WHEN_NOT_OK
-    mail_mask |= VALIDATE_NOT_OK;
-#endif
+    if (sudo_flag_set(FL_MAIL_ALWAYS))
+       mail_mask =
+           VALIDATE_ERROR|VALIDATE_OK|FLAG_NO_USER|FLAG_NO_HOST|VALIDATE_NOT_OK;
+    else {
+       mail_mask = VALIDATE_ERROR;
+       if (sudo_flag_set(FL_MAIL_IF_NOUSER))
+           mail_mask |= FLAG_NO_USER;
+       if (sudo_flag_set(FL_MAIL_IF_NOHOST))
+           mail_mask |= FLAG_NO_HOST;
+       if (sudo_flag_set(FL_MAIL_IF_NOPERMS))
+           mail_mask |= VALIDATE_NOT_OK;
+    }
 
     if ((status & mail_mask) != 0)
        send_mail(line);
diff --git a/parse.h b/parse.h
index 5d72ed78376f373e79b5f7beb14948590fe6487c..16ad97a07751be217fd12fd2c201d25a4cbff19a 100644 (file)
--- a/parse.h
+++ b/parse.h
@@ -104,4 +104,12 @@ struct generic_alias {
 extern struct matchstack *match;
 extern int top;
 
+/*
+ * Prototypes
+ */
+int addr_matches       __P((char *));
+int command_matches    __P((char *, char *, char *, char *));
+int netgr_matches      __P((char *, char *, char *));
+int usergr_matches     __P((char *, char *));
+
 #endif /* _SUDO_PARSE_H */
index 96e5ea4ae8be2cf86da9d9fc2585cf671db5d5f1..4b8917df00e6fc2c5bd68d5d4e27bbed84838fa6 100644 (file)
--- a/parse.lex
+++ b/parse.lex
@@ -93,7 +93,7 @@ extern void yyerror           __P((char *));
 OCTET                  (1?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5])
 DOTTEDQUAD             {OCTET}(\.{OCTET}){3}
 HOSTNAME               [[:alnum:]_-]+
-USERNAME               [^:,\) \t\n]+
+WORD                   [^@!=:,\(\) \t\n\\]+
 
 %e     4000
 %p     6000
@@ -101,32 +101,47 @@ USERNAME          [^:,\) \t\n]+
 
 %s     GOTCMND
 %s     GOTRUNAS
+%s     GOTDEFS
 
 %%
 [ \t]+                 {                       /* throw away space/tabs */
                            sawspace = TRUE;    /* but remember for fill_args */
                        }
 
-\\[ \t]*\n             { 
+\\[ \t]*\n             {
                            sawspace = TRUE;    /* remember for fill_args */
                            ++sudolineno;
                            LEXTRACE("\n\t");
                        }                       /* throw away EOL after \ */
 
-<GOTCMND>\\[:\,=\\ \t] {
+<GOTCMND>\\[@:\,=\\ \t]        {
                            LEXTRACE("QUOTEDCHAR ");
                            fill_args(yytext + 1, 1, sawspace);
                            sawspace = FALSE;
                        }
 
+<GOTDEFS>\"[^\"]+\"    {
+                           /* XXX - should allow " to be quoted */
+                           LEXTRACE("WORD(1) ");
+                           fill(yytext + 1, yyleng - 2);
+                           return(WORD);
+                       }
+
+<GOTDEFS>(#.*)?\n      {
+                           BEGIN INITIAL;
+                           ++sudolineno;
+                           LEXTRACE("\n");
+                           return(COMMENT);
+                       }
+
 <GOTCMND>[:\,=\n]      {
                            BEGIN INITIAL;
                            unput(*yytext);
                            return(COMMAND);
                        }                       /* end of command line args */
 
-\n                     { 
-                           ++sudolineno; 
+\n                     {
+                           ++sudolineno;
                            LEXTRACE("\n");
                            return(COMMENT);
                        }                       /* return newline */
@@ -163,27 +178,29 @@ USERNAME          [^:,\) \t\n]+
                            return(':');
                        }                       /* return ':' */
 
-NOPASSWD[[:blank:]]*:  { 
+NOPASSWD[[:blank:]]*:  {
                                /* cmnd does not require passwd for this user */
                                LEXTRACE("NOPASSWD ");
                                return(NOPASSWD);
                        }
 
-PASSWD[[:blank:]]*:    { 
+PASSWD[[:blank:]]*:    {
                                /* cmnd requires passwd for this user */
                                LEXTRACE("PASSWD ");
                                return(PASSWD);
                        }
 
-\+{USERNAME}           {
+\+{WORD}               {
                            /* netgroup */
                            fill(yytext, yyleng);
+                           LEXTRACE("NETGROUP ");
                            return(NETGROUP);
                        }
 
-\%{USERNAME}           {
+\%{WORD}               {
                            /* UN*X group */
                            fill(yytext, yyleng);
+                           LEXTRACE("GROUP ");
                            return(USERGROUP);
                        }
 
@@ -223,28 +240,16 @@ PASSWD[[:blank:]]*:       {
                            }
                        }
 
-<GOTRUNAS>#?{USERNAME} {
+<GOTRUNAS>#?{WORD}     {
                            /* username/uid that user can run command as */
                            fill(yytext, yyleng);
-                           LEXTRACE("NAME ");
-                           return(NAME);
+                           LEXTRACE("WORD(2) ");
+                           return(WORD);
                        }
 
-<GOTRUNAS>\)           BEGIN INITIAL;
-
-
-\/[^\,:=\\ \t\n#]+     {
-                           /* directories can't have args... */
-                           if (yytext[yyleng - 1] == '/') {
-                               LEXTRACE("COMMAND ");
-                               fill_cmnd(yytext, yyleng);
-                               return(COMMAND);
-                           } else {
-                               BEGIN GOTCMND;
-                               LEXTRACE("COMMAND ");
-                               fill_cmnd(yytext, yyleng);
-                           }
-                       }                       /* a pathname */
+<GOTRUNAS>\)           {
+                           BEGIN INITIAL;
+                       }
 
 [[:upper:]][[:upper:][:digit:]_]*      {
                            if (strcmp(yytext, "ALL") == 0) {
@@ -257,31 +262,72 @@ PASSWD[[:blank:]]*:       {
                            }
                        }
 
-[[:alnum:]][[:alnum:]_-]*      {
+<GOTDEFS>[^ \t\n,=!]+  {
+                           /* XXX - should allow [!=,] to be quoted */
+                           LEXTRACE("WORD(3) ");
+                           fill(yytext, yyleng);
+                           return(WORD);
+                       }
+
+<INITIAL>^Defaults[:@]?        {
+                           BEGIN GOTDEFS;
+                           if (yyleng == 9) {
+                               switch (yytext[8]) {
+                                   case ':' :
+                                       LEXTRACE("DEFAULTS_USER ");
+                                       return(DEFAULTS_USER);
+                                   case '@' :
+                                       LEXTRACE("DEFAULTS_HOST ");
+                                       return(DEFAULTS_HOST);
+                               }
+                           } else {
+                               LEXTRACE("DEFAULTS ");
+                               return(DEFAULTS);
+                           }
+                       }
+
+<INITIAL>^(Host|Cmnd|User|Runas)_Alias {
                            fill(yytext, yyleng);
-                           if (strcmp(yytext, "Host_Alias") == 0) {
+                           if (*yytext == 'H') {
                                LEXTRACE("HOSTALIAS ");
                                return(HOSTALIAS);
                            }
-                           if (strcmp(yytext, "Cmnd_Alias") == 0) {
+                           if (*yytext == 'C') {
                                LEXTRACE("CMNDALIAS ");
                                return(CMNDALIAS);
                            }
-                           if (strcmp(yytext, "User_Alias") == 0) {
+                           if (*yytext == 'U') {
                                LEXTRACE("USERALIAS ");
                                return(USERALIAS);
                            }
-                           if (strcmp(yytext, "Runas_Alias") == 0) {
+                           if (*yytext == 'R') {
                                LEXTRACE("RUNASALIAS ");
                                return(RUNASALIAS);
                            }
+                       }
 
-                           /* NAME is what RFC1034 calls a label */
-                           LEXTRACE("NAME ");
-                           return(NAME);
+\/[^\,:=\\ \t\n#]+     {
+                           /* directories can't have args... */
+                           if (yytext[yyleng - 1] == '/') {
+                               LEXTRACE("COMMAND ");
+                               fill_cmnd(yytext, yyleng);
+                               return(COMMAND);
+                           } else {
+                               BEGIN GOTCMND;
+                               LEXTRACE("COMMAND ");
+                               fill_cmnd(yytext, yyleng);
+                           }
+                       }                       /* a pathname */
+
+{WORD}                 {
+                           /* a word */
+                           fill(yytext, yyleng);
+                           LEXTRACE("WORD(4) ");
+                           return(WORD);
                        }
 
 .                      {
+                           LEXTRACE("ERROR ");
                            return(ERROR);
                        }       /* parse error */
 
index cf40829f6e490d4391f670187f46fa6b028f58b4..1ef614210845a79d9cc9e32aa5d94a5423dfc58d 100644 (file)
@@ -90,11 +90,6 @@ int errorlineno = -1;
 int clearaliases = TRUE;
 int printmatches = FALSE;
 int pedantic = FALSE;
-#ifdef NO_AUTHENTICATION
-int pwdef = TRUE;
-#else
-int pwdef = -1;
-#endif
 
 /*
  * Alias types
@@ -120,7 +115,7 @@ int top = 0, stacksize = 0;
        match[top].cmnd   = -1; \
        match[top].host   = -1; \
        match[top].runas  = -1; \
-       match[top].nopass = pwdef; \
+       match[top].nopass = sudo_flag_set(FL_AUTHENTICATE) ? -1 : TRUE; \
        top++; \
     } while (0)
 
@@ -173,12 +168,13 @@ static size_t ga_list_len = 0, ga_list_size = 0;
 static struct generic_alias *ga_list = NULL;
 
 /*
- * Protoypes
+ * Does this Defaults list pertain to this user?
+ */
+static int defaults_matches = 0;
+
+/*
+ * Local protoypes
  */
-extern int  addr_matches       __P((char *));
-extern int  command_matches    __P((char *, char *, char *, char *));
-extern int  netgr_matches      __P((char *, char *, char *));
-extern int  usergr_matches     __P((char *, char *));
 static int  add_alias          __P((char *, int, int));
 static void append             __P((char *, char **, size_t *, size_t *, char *));
 static void expand_ga_list     __P((void));
@@ -221,7 +217,10 @@ yyerror(s)
 %token <string>  FQHOST                        /* foo.bar.com */
 %token <string>  NETGROUP              /* a netgroup (+NAME) */
 %token <string>  USERGROUP             /* a usergroup (%NAME) */
-%token <string>  NAME                  /* a mixed-case name */
+%token <string>  WORD                  /* a word */
+%token <tok>    DEFAULTS               /* Defaults entry */
+%token <tok>    DEFAULTS_HOST          /* Host-specific defaults entry */
+%token <tok>    DEFAULTS_USER          /* User-specific defaults entry */
 %token <tok>    RUNAS                  /* ( runas_list ) */
 %token <tok>    NOPASSWD               /* no passwd req for command */
 %token <tok>    PASSWD                 /* passwd req for command (default) */
@@ -267,8 +266,51 @@ entry              :       COMMENT
                            { ; }
                |       RUNASALIAS runasaliases
                            { ; }
+               |       defaults_line
+                           { ; }
+               ;
+
+defaults_line  :       defaults_type defaults_list
+
+defaults_type  :       DEFAULTS {
+                           defaults_matches = TRUE;
+                       }
+               |       DEFAULTS_USER { push; } userlist {
+                           defaults_matches = user_matches;
+                           pop;
+                       }
+               |       DEFAULTS_HOST { push; } hostlist {
+                           defaults_matches = host_matches;
+                           pop;
+                       }
                ;
-               
+
+defaults_list  :       defaults_entry
+               |       defaults_entry ',' defaults_list
+
+defaults_entry :       WORD {
+                           if (defaults_matches && !set_default($1, NULL, 1)) {
+                               yyerror(NULL);
+                               YYERROR;
+                           }
+                           free($1);
+                       }
+               |       '!' WORD {
+                           if (defaults_matches && !set_default($2, NULL, 0)) {
+                               yyerror(NULL);
+                               YYERROR;
+                           }
+                           free($2);
+                       }
+               |       WORD '=' WORD {
+                           /* XXX - need to support quoted values */
+                           if (defaults_matches && !set_default($1, $3, 1)) {
+                               yyerror(NULL);
+                               YYERROR;
+                           }
+                           free($1);
+                           free($3);
+                       }
 
 privileges     :       privilege
                |       privileges ':' privilege
@@ -282,7 +324,10 @@ privilege  :       hostlist '=' cmndspeclist {
                             */
                            host_matches = -1;
                            runas_matches = -1;
-                           no_passwd = pwdef;
+                           if (sudo_flag_set(FL_AUTHENTICATE))
+                               no_passwd = -1;
+                           else
+                               no_passwd = TRUE;
                        }
                ;
 
@@ -312,7 +357,7 @@ host                :       ALL {
                                $$ = -1;
                            free($1);
                        }
-               |       NAME {
+               |       WORD {
                            if (strcasecmp(user_shost, $1) == 0)
                                $$ = TRUE;
                            else
@@ -411,11 +456,11 @@ runasspec :       /* empty */ {
                            }
                            /*
                             * If this is the first entry in a command list
-                            * then check against RUNAS_DEFAULT.
+                            * then check against default runas user.
                             */
                            if (runas_matches == -1)
-                               runas_matches =
-                                   (strcmp(RUNAS_DEFAULT, user_runas) == 0);
+                               runas_matches = (strcmp(*user_runas,
+                                   sudo_strtable[I_RUNAS_DEF]) == 0);
                        }
                |       RUNAS runaslist { ; }
                ;
@@ -441,7 +486,7 @@ oprunasuser :       runasuser {
                                runas_matches = ! $3;
                        }
 
-runasuser      :       NAME {
+runasuser      :       WORD {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
                                    append_entries($1, ", ");
@@ -449,7 +494,7 @@ runasuser   :       NAME {
                                    user_matches == TRUE)
                                    append_runas($1, ", ");
                            }
-                           if (strcmp($1, user_runas) == 0)
+                           if (strcmp($1, *user_runas) == 0)
                                $$ = TRUE;
                            else
                                $$ = -1;
@@ -463,7 +508,7 @@ runasuser   :       NAME {
                                    user_matches == TRUE)
                                    append_runas($1, ", ");
                            }
-                           if (usergr_matches($1, user_runas))
+                           if (usergr_matches($1, *user_runas))
                                $$ = TRUE;
                            else
                                $$ = -1;
@@ -477,7 +522,7 @@ runasuser   :       NAME {
                                    user_matches == TRUE)
                                    append_runas($1, ", ");
                            }
-                           if (netgr_matches($1, NULL, user_runas))
+                           if (netgr_matches($1, NULL, *user_runas))
                                $$ = TRUE;
                            else
                                $$ = -1;
@@ -496,7 +541,7 @@ runasuser   :       NAME {
                            /* could be an all-caps username */
                            if (aip)
                                $$ = aip->val;
-                           else if (strcmp($1, user_runas) == 0)
+                           else if (strcmp($1, *user_runas) == 0)
                                $$ = TRUE;
                            else {
                                if (pedantic) {
@@ -705,7 +750,7 @@ useralias   :       ALIAS { push; } '=' userlist {
                        }
                ;
 
-userlist       :       opuser { ; }
+userlist       :       opuser
                |       userlist ',' opuser
                ;
 
@@ -718,7 +763,7 @@ opuser              :       user {
                                user_matches = ! $2;
                        }
 
-user           :       NAME {
+user           :       WORD {
                            if (strcmp($1, user_name) == 0)
                                $$ = TRUE;
                            else
@@ -951,13 +996,13 @@ list_matches()
            } while ((p = strtok(NULL, ", ")));
            (void) fputs(") ", stdout);
        } else {
-           (void) printf("(%s) ", RUNAS_DEFAULT);
+           (void) printf("(%s) ", sudo_strtable[I_RUNAS_DEF]);
        }
 
        /* Is a password required? */
-       if (cm_list[i].nopasswd == TRUE && pwdef != TRUE)
+       if (cm_list[i].nopasswd == TRUE && sudo_flag_set(FL_AUTHENTICATE))
            (void) fputs("NOPASSWD: ", stdout);
-       else if (cm_list[i].nopasswd == FALSE && pwdef == TRUE)
+       else if (cm_list[i].nopasswd == FALSE && !sudo_flag_set(FL_AUTHENTICATE))
            (void) fputs("PASSWD: ", stdout);
 
        /* Print the actual command or expanded Cmnd_Alias. */
diff --git a/sudo.c b/sudo.c
index bc39daacc79a51149b666bb636f684a6cb5f4575..19c6c0c9bc6306efda1368c4cb797dca6779c2fd 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -75,6 +75,7 @@
 
 #include "sudo.h"
 #include "interfaces.h"
+#include "version.h"
 
 #ifndef STDC_HEADERS
 extern char *getenv    __P((char *));
@@ -182,15 +183,6 @@ main(argc, argv)
        exit(1);
     }
 
-    /* Initialize syslog(3) if we are using it. */
-#if (LOGGING & SLOG_SYSLOG)
-# ifdef LOG_NFACILITIES
-    openlog("sudo", 0, LOGFAC);
-# else
-    openlog("sudo", 0);
-# endif /* LOG_NFACILITIES */
-#endif /* LOGGING & SLOG_SYSLOG */
-
     /* Catch children as they die... */
 #ifdef POSIX_SIGNALS
     (void) memset((VOID *)&sa, 0, sizeof(sa));
@@ -228,18 +220,34 @@ main(argc, argv)
     /*
      * Set the prompt based on $SUDO_PROMPT (can be overridden by `-p')
      */
-    if ((user_prompt = getenv("SUDO_PROMPT")) == NULL)
-       user_prompt = PASSPROMPT;
+    user_prompt = getenv("SUDO_PROMPT");
 
     /* Parse our arguments. */
     sudo_mode = parse_args();
 
+    /* Setup defaults data structures. */
+    init_defaults();
+
+    /* Initialize syslog(3) if we are using it. */
+    if (sudo_inttable[I_LOGFAC] != (unsigned int)-1) {
+#ifdef LOG_NFACILITIES
+       openlog("sudo", 0, sudo_inttable[I_LOGFAC]);
+#else
+       openlog("sudo", 0);
+#endif /* LOG_NFACILITIES */
+    }
+
     if (sudo_mode & MODE_SHELL)
        user_cmnd = "shell";
     else
        switch (sudo_mode) {
            case MODE_VERSION:
-               print_version();
+               (void) printf("Sudo version %s\n", version);
+               if (getuid() == 0) {
+                   putchar('\n');
+                   dump_auth_methods();
+                   dump_defaults();
+               }
                exit(0);
                break;
            case MODE_HELP:
@@ -252,6 +260,10 @@ main(argc, argv)
            case MODE_INVALIDATE:
                user_cmnd = "kill";
                break;
+           case MODE_LISTDEFS:
+               list_options();
+               exit(0);
+               break;
            case MODE_LIST:
                user_cmnd = "list";
                printmatches = 1;
@@ -281,14 +293,22 @@ main(argc, argv)
     validated =
        sudoers_lookup((sudo_mode != MODE_VALIDATE && sudo_mode != MODE_LIST));
 
+    if (validated & VALIDATE_ERROR)
+       log_error(0, "parse error in %s near line %d", _PATH_SUDOERS,
+           errorlineno);
+
+    /* Is root even allowed to run sudo? */
+    if (getuid() == 0 && !sudo_flag_set(FL_ROOT_SUDO)) {
+       (void) fputs("You are already root, you don't need to use sudo.\n",
+           stderr);
+       exit(1);
+    }
+
     /* Require a password unless the NOPASS tag was set.  */
     if (!(validated & FLAG_NOPASS))
        check_user();
 
-    if (validated & VALIDATE_ERROR)
-       log_error(0, "parse error in %s near line %d", _PATH_SUDOERS,
-           errorlineno);
-    else if (validated & VALIDATE_OK) {
+    if (validated & VALIDATE_OK) {
        /* Finally tell the user if the command did not exist. */
        if (cmnd_status == NOT_FOUND_DOT) {
            (void) fprintf(stderr, "%s: ignoring `%s' found in '.'\nUse `sudo ./%s' if this is the `%s' you wish to run.\n", Argv[0], user_cmnd, user_cmnd, user_cmnd);
@@ -322,9 +342,8 @@ main(argc, argv)
                "please report this error to sudo-bugs@courtesan.com");
        }
 
-#if (LOGGING & SLOG_SYSLOG)
-       closelog();
-#endif
+       if (sudo_inttable[I_LOGFAC] != (unsigned int)-1)
+           closelog();
 
        /* Reset signal mask before we exec. */
 #ifdef POSIX_SIGNALS
@@ -333,6 +352,18 @@ main(argc, argv)
        (void) sigsetmask(omask);
 #endif /* POSIX_SIGNALS */
 
+       /* Override user's umask if configured to do so. */
+       if (sudo_inttable[I_UMASK] != 0777)
+           (void) umask((mode_t)sudo_inttable[I_UMASK]);
+
+       /* Replace the PATH envariable with a secure one. */
+       if (sudo_strtable[I_SECURE_PATH] && !user_is_exempt())
+           if (sudo_setenv("PATH", sudo_strtable[I_SECURE_PATH])) {
+               (void) fprintf(stderr, "%s: cannot allocate memory!\n",
+                   Argv[0]);
+               exit(1);
+           }
+
 #ifndef PROFILING
        if ((sudo_mode & MODE_BACKGROUND) && fork() > 0)
            exit(0);
@@ -351,24 +382,25 @@ main(argc, argv)
        log_auth(validated, 1);
        exit(1);
     } else if (validated & VALIDATE_NOT_OK) {
-#ifndef DONT_LEAK_PATH_INFO
-       /*
-        * We'd like to not leak path info at all here, but that can
-        * *really* confuse the users.  To really close the leak we'd
-        * have to say "not allowed to run foo" even when the problem
-        * is just "no foo in path" since the user can trivially set
-        * their path to just contain a single dir.
-        */
-       log_auth(validated,
-           !(cmnd_status == NOT_FOUND_DOT || cmnd_status == NOT_FOUND));
-       if (cmnd_status == NOT_FOUND)
-           (void) fprintf(stderr, "%s: %s: command not found\n", Argv[0],
-               user_cmnd);
-       else if (cmnd_status == NOT_FOUND_DOT)
-           (void) fprintf(stderr, "%s: ignoring `%s' found in '.'\nUse `sudo ./%s' if this is the `%s' you wish to run.\n", Argv[0], user_cmnd, user_cmnd, user_cmnd);
-#else
-       log_auth(validated, 1);
-#endif /* DONT_LEAK_PATH_INFO */
+       if (sudo_flag_set(FL_PATH_INFO)) {
+           /*
+            * We'd like to not leak path info at all here, but that can
+            * *really* confuse the users.  To really close the leak we'd
+            * have to say "not allowed to run foo" even when the problem
+            * is just "no foo in path" since the user can trivially set
+            * their path to just contain a single dir.
+            */
+           log_auth(validated,
+               !(cmnd_status == NOT_FOUND_DOT || cmnd_status == NOT_FOUND));
+           if (cmnd_status == NOT_FOUND)
+               (void) fprintf(stderr, "%s: %s: command not found\n", Argv[0],
+                   user_cmnd);
+           else if (cmnd_status == NOT_FOUND_DOT)
+               (void) fprintf(stderr, "%s: ignoring `%s' found in '.'\nUse `sudo ./%s' if this is the `%s' you wish to run.\n", Argv[0], user_cmnd, user_cmnd, user_cmnd);
+       } else {
+           /* Just tell the user they are not allowed to run foo. */
+           log_auth(validated, 1);
+       }
        exit(1);
     } else {
        /* should never get here */
@@ -387,17 +419,7 @@ init_vars(sudo_mode)
     int sudo_mode;
 {
     char *p, thost[MAXHOSTNAMELEN];
-#ifdef FQDN
     struct hostent *hp;
-#endif /* FQDN */
-
-#ifdef NO_ROOT_SUDO
-    if (getuid() == 0) {
-       (void) fputs("You are already root, you don't need to use sudo.\n",
-           stderr);
-       exit(1);
-    }
-#endif
 
     /* Sanity check command from user. */
     if (user_cmnd == NULL && strlen(NewArgv[0]) >= MAXPATHLEN) {
@@ -410,21 +432,7 @@ init_vars(sudo_mode)
     (void) tzset();            /* set the timezone if applicable */
 #endif /* HAVE_TZSET */
 
-#ifdef SECURE_PATH
-    /* Replace the PATH envariable with a secure one. */
-    if (!user_is_exempt() && sudo_setenv("PATH", SECURE_PATH)) {
-       (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);
-       exit(1);
-    }
-#endif /* SECURE_PATH */
-
-#ifdef SUDO_UMASK
-    (void) umask((mode_t)SUDO_UMASK);
-#endif /* SUDO_UMASK */
-
-    /* Default values for runas and cmnd, overridden later. */
-    if (user_runas == NULL)
-       user_runas = RUNAS_DEFAULT;
+    /* Default value for cmnd and cwd, overridden later. */
     if (user_cmnd == NULL)
        user_cmnd = NewArgv[0];
     (void) strcpy(user_cwd, "unknown");
@@ -440,13 +448,15 @@ init_vars(sudo_mode)
        log_error(USE_ERRNO|MSG_ONLY, "can't get hostname");
     } else
        user_host = estrdup(thost);
-#ifdef FQDN
-    if (!(hp = gethostbyname(user_host)))
-       log_error(USE_ERRNO|MSG_ONLY|NO_EXIT,
-           "unable to lookup %s via gethostbyname()", user_host);
-    else
-       user_host = estrdup(hp->h_name);
-#endif /* FQDN */
+    if (sudo_flag_set(FL_FQDN)) {
+       if (!(hp = gethostbyname(user_host))) {
+           log_error(USE_ERRNO|MSG_ONLY|NO_EXIT,
+               "unable to lookup %s via gethostbyname()", user_host);
+       } else {
+           free(user_host);
+           user_host = estrdup(hp->h_name);
+       }
+    }
     if ((p = strchr(user_host, '.'))) {
        *p = '\0';
        user_shost = estrdup(user_host);
@@ -545,15 +555,12 @@ parse_args()
     NewArgv = Argv + 1;
     NewArgc = Argc - 1;
 
-#ifdef SHELL_IF_NO_ARGS
     if (Argc < 2) {                    /* no options and no command */
+       if (!sudo_flag_set(FL_SHELL_NOARGS))
+           usage(1);
        rval |= MODE_SHELL;
        return(rval);
     }
-#else
-    if (Argc < 2)                      /* no options and no command */
-       usage(1);
-#endif /* SHELL_IF_NO_ARGS */
 
     while (NewArgc > 0 && NewArgv[0][0] == '-') {
        if (NewArgv[0][1] != '\0' && NewArgv[0][2] != '\0') {
@@ -592,7 +599,7 @@ parse_args()
                if (NewArgv[1] == NULL)
                    usage(1);
 
-               user_runas = NewArgv[1];
+               user_runas = &NewArgv[1];
 
                /* Shift Argv over and adjust Argc. */
                NewArgc--;
@@ -619,6 +626,12 @@ parse_args()
                    usage_excl(1);
                excl = 'K';
                break;
+           case 'L':
+               rval = MODE_LISTDEFS;
+               if (excl && excl != 'L')
+                   usage_excl(1);
+               excl = 'L';
+               break;
            case 'l':
                rval = MODE_LIST;
                if (excl && excl != 'l')
@@ -639,9 +652,8 @@ parse_args()
                break;
            case 's':
                rval |= MODE_SHELL;
-#ifdef SHELL_SETS_HOME
-               rval |= MODE_RESET_HOME;
-#endif /* SHELL_SETS_HOME */
+               if (sudo_flag_set(FL_SET_HOME))
+                   rval |= MODE_RESET_HOME;
                break;
            case 'H':
                rval |= MODE_RESET_HOME;
@@ -649,10 +661,8 @@ parse_args()
            case '-':
                NewArgc--;
                NewArgv++;
-#ifdef SHELL_IF_NO_ARGS
-               if (rval == MODE_RUN)
+               if (sudo_flag_set(FL_SHELL_NOARGS) && rval == MODE_RUN)
                    rval |= MODE_SHELL;
-#endif /* SHELL_IF_NO_ARGS */
                return(rval);
            case '\0':
                (void) fprintf(stderr, "%s: '-' requires an argument\n",
@@ -913,18 +923,18 @@ set_perms(perm, sudo_mode)
                                }
                                
                                /* XXX - add group/gid support */
-                               if (*user_runas == '#') {
-                                   if (setuid(atoi(user_runas + 1))) {
+                               if (**user_runas == '#') {
+                                   if (setuid(atoi(*user_runas + 1))) {
                                        (void) fprintf(stderr,
                                            "%s: cannot set uid to %s: %s\n",
-                                           Argv[0], user_runas, strerror(errno));
+                                           Argv[0], *user_runas, strerror(errno));
                                        exit(1);
                                    }
                                } else {
-                                   if (!(pw = getpwnam(user_runas))) {
+                                   if (!(pw = getpwnam(*user_runas))) {
                                        (void) fprintf(stderr,
                                            "%s: no passwd entry for %s!\n",
-                                           Argv[0], user_runas);
+                                           Argv[0], *user_runas);
                                        exit(1);
                                    }
 
@@ -954,8 +964,8 @@ set_perms(perm, sudo_mode)
                                     * Initialize group vector only if are
                                     * going to run as a non-root user.
                                     */
-                                   if (strcmp(user_runas, "root") != 0 &&
-                                       initgroups(user_runas, pw->pw_gid)
+                                   if (strcmp(*user_runas, "root") != 0 &&
+                                       initgroups(*user_runas, pw->pw_gid)
                                        == -1) {
                                        (void) fprintf(stderr,
                                            "%s: cannot set group vector: %s\n",
@@ -1029,7 +1039,7 @@ usage(exit_val)
     int exit_val;
 {
     (void) fprintf(stderr,
-       "usage: %s -V | -h | -l | -v | -k | -K | -H | [-b] [-p prompt]\n%*s",
+       "usage: %s -V | -h | -L | -l | -v | -k | -K | -H | [-b] [-p prompt]\n%*s",
        Argv[0], (int) strlen(Argv[0]) + 8, " ");
 #ifdef HAVE_KERB5
     (void) fprintf(stderr, "[-r realm] ");
diff --git a/sudo.h b/sudo.h
index fd1dd1fe80f9b61a725699eb44de12dc37660be0..3bd5d69e0edd673577a19c9ca8f308ccabc485d1 100644 (file)
--- a/sudo.h
+++ b/sudo.h
@@ -39,6 +39,7 @@
 
 #include <pathnames.h>
 #include "compat.h"
+#include "defaults.h"
 #include "logging.h"
 
 /*
@@ -50,7 +51,7 @@ struct sudo_user {
     char  cwd[MAXPATHLEN];
     char *host;
     char *shost;
-    char *runas;
+    char **runas;
     char *prompt;
     char *cmnd_safe;
     char *cmnd;
@@ -95,9 +96,10 @@ struct sudo_user {
 #define MODE_VERSION             00020
 #define MODE_HELP                00040
 #define MODE_LIST                00100
-#define MODE_BACKGROUND          00200
-#define MODE_SHELL               00400
-#define MODE_RESET_HOME          01000
+#define MODE_LISTDEFS            00200
+#define MODE_BACKGROUND          00400
+#define MODE_SHELL               01000
+#define MODE_RESET_HOME          02000
 
 /*
  * Used with set_perms()
@@ -173,7 +175,7 @@ int sudo_setenv             __P((char *, char *));
 char *tgetpass         __P((const char *, int, int));
 int find_path          __P((char *, char **));
 void check_user                __P((void));
-void verify_user       __P((void));
+void verify_user       __P((char *));
 int sudoers_lookup     __P((int));
 void set_perms         __P((int, int));
 void remove_timestamp  __P((int));
@@ -187,7 +189,8 @@ VOID *erealloc              __P((VOID *, size_t));
 char *estrdup          __P((const char *));
 void easprintf         __P((char **, const char *, ...));
 void evasprintf                __P((char **, const char *, va_list));
-void print_version     __P((void));
+void dump_defaults     __P((void));
+void dump_auth_methods __P((void));
 int lock_file          __P((int, int));
 int touch              __P((char *, time_t));
 YY_DECL;
index 7ced5446b5a0f5dd539ed1ee397d29a1c185b118..29ae7cb05b3575bafe54a962cd5853e0e5502921 100644 (file)
@@ -16,7 +16,7 @@ static char yyrcsid[]
 #define yyerrok (yyerrflag=0)
 #define YYRECOVERING() (yyerrflag!=0)
 #define YYPREFIX "yy"
-#line 2 "parse.yacc"
+#line 2 "./parse.yacc"
 /*
  * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com>
  * All rights reserved.
@@ -108,11 +108,6 @@ int errorlineno = -1;
 int clearaliases = TRUE;
 int printmatches = FALSE;
 int pedantic = FALSE;
-#ifdef NO_AUTHENTICATION
-int pwdef = TRUE;
-#else
-int pwdef = -1;
-#endif
 
 /*
  * Alias types
@@ -138,7 +133,7 @@ int top = 0, stacksize = 0;
        match[top].cmnd   = -1; \
        match[top].host   = -1; \
        match[top].runas  = -1; \
-       match[top].nopass = pwdef; \
+       match[top].nopass = sudo_flag_set(FL_AUTHENTICATE) ? -1 : TRUE; \
        top++; \
     } while (0)
 
@@ -191,12 +186,13 @@ static size_t ga_list_len = 0, ga_list_size = 0;
 static struct generic_alias *ga_list = NULL;
 
 /*
- * Protoypes
+ * Does this Defaults list pertain to this user?
+ */
+static int defaults_matches = 0;
+
+/*
+ * Local protoypes
  */
-extern int  addr_matches       __P((char *));
-extern int  command_matches    __P((char *, char *, char *, char *));
-extern int  netgr_matches      __P((char *, char *, char *));
-extern int  usergr_matches     __P((char *, char *));
 static int  add_alias          __P((char *, int, int));
 static void append             __P((char *, char **, size_t *, size_t *, char *));
 static void expand_ga_list     __P((void));
@@ -223,203 +219,236 @@ yyerror(s)
     }
     parse_error = TRUE;
 }
-#line 210 "parse.yacc"
+#line 206 "./parse.yacc"
 typedef union {
     char *string;
     int BOOLEAN;
     struct sudo_command command;
     int tok;
 } YYSTYPE;
-#line 234 "sudo.tab.c"
+#line 230 "sudo.tab.c"
 #define COMMAND 257
 #define ALIAS 258
 #define NTWKADDR 259
 #define FQHOST 260
 #define NETGROUP 261
 #define USERGROUP 262
-#define NAME 263
-#define RUNAS 264
-#define NOPASSWD 265
-#define PASSWD 266
-#define ALL 267
-#define COMMENT 268
-#define HOSTALIAS 269
-#define CMNDALIAS 270
-#define USERALIAS 271
-#define RUNASALIAS 272
-#define ERROR 273
+#define WORD 263
+#define DEFAULTS 264
+#define DEFAULTS_HOST 265
+#define DEFAULTS_USER 266
+#define RUNAS 267
+#define NOPASSWD 268
+#define PASSWD 269
+#define ALL 270
+#define COMMENT 271
+#define HOSTALIAS 272
+#define CMNDALIAS 273
+#define USERALIAS 274
+#define RUNASALIAS 275
+#define ERROR 276
 #define YYERRCODE 256
 short yylhs[] = {                                        -1,
     0,    0,    5,    5,    7,    5,    5,    5,    5,    5,
-    8,    8,   13,   16,   16,    2,    2,    2,    2,    2,
-    2,   15,   15,   17,   20,   21,   20,   18,   18,   22,
-   22,   23,   24,   23,    3,    3,    3,    3,    3,   19,
-   19,   19,    1,    1,    1,   10,   10,   26,   25,   14,
-   14,   11,   11,   28,   27,   29,   29,   12,   12,   31,
-   30,    9,    9,   33,   32,    6,    6,   34,   34,    4,
-    4,    4,    4,    4,
+    5,   13,   14,   16,   14,   18,   14,   15,   15,   19,
+   19,   19,    8,    8,   20,   22,   22,    2,    2,    2,
+    2,    2,    2,   21,   21,   23,   26,   27,   26,   24,
+   24,   28,   28,   29,   30,   29,    3,    3,    3,    3,
+    3,   25,   25,   25,    1,    1,    1,   10,   10,   32,
+   31,   17,   17,   11,   11,   34,   33,   35,   35,   12,
+   12,   37,   36,    9,    9,   39,   38,    6,    6,   40,
+   40,    4,    4,    4,    4,    4,
 };
 short yylen[] = {                                         2,
     1,    2,    1,    2,    0,    3,    2,    2,    2,    2,
-    1,    3,    3,    1,    2,    1,    1,    1,    1,    1,
-    1,    1,    3,    3,    1,    0,    3,    0,    2,    1,
-    3,    1,    0,    3,    1,    1,    1,    1,    1,    0,
-    1,    1,    1,    1,    1,    1,    3,    0,    4,    1,
-    3,    1,    3,    0,    4,    1,    3,    1,    3,    0,
-    4,    1,    3,    0,    4,    1,    3,    1,    2,    1,
-    1,    1,    1,    1,
+    1,    2,    1,    0,    3,    0,    3,    1,    3,    1,
+    2,    3,    1,    3,    3,    1,    2,    1,    1,    1,
+    1,    1,    1,    1,    3,    3,    1,    0,    3,    0,
+    2,    1,    3,    1,    0,    3,    1,    1,    1,    1,
+    1,    0,    1,    1,    1,    1,    1,    1,    3,    0,
+    4,    1,    3,    1,    3,    0,    4,    1,    3,    1,
+    3,    0,    4,    1,    3,    0,    4,    1,    3,    1,
+    2,    1,    1,    1,    1,    1,
 };
 short yydefred[] = {                                      0,
-    0,    3,    0,    0,    0,    0,    0,    1,    0,    4,
-   48,    0,   46,   54,    0,   52,   64,    0,   62,   60,
-    0,   58,    2,   73,   72,   71,   70,   74,    0,   68,
-    0,   66,    0,    0,    0,    0,    0,    0,    0,    0,
-   69,   21,   17,   20,   18,   19,   16,    0,    0,   14,
-    0,   11,    0,   50,    0,   47,    0,   53,    0,   63,
-    0,   59,   67,   15,    0,    0,    0,    0,   45,   44,
-   43,   26,   25,   56,    0,    0,   38,   37,   36,   35,
-   39,   33,   32,    0,   30,   12,    0,    0,   22,    0,
-   51,    0,    0,    0,    0,    0,    0,   41,   42,    0,
-   27,   57,   34,   31,   23,   24,
+    0,   13,   16,   14,    3,    0,    0,    0,    0,    0,
+    1,    0,   11,    0,    4,    0,    0,   60,    0,   58,
+   66,    0,   64,   76,    0,   74,   72,    0,   70,    2,
+   85,   84,   83,   82,   86,    0,   80,    0,   78,    0,
+    0,   12,    0,   33,   29,   32,   30,   31,   28,    0,
+   26,    0,   62,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,   81,    0,    0,    0,   23,    0,   21,    0,
+   27,    0,    0,   59,    0,   65,    0,   75,    0,   71,
+   79,    0,    0,   22,   19,   63,    0,   57,   56,   55,
+   38,   37,   68,    0,    0,   50,   49,   48,   47,   51,
+   45,   44,    0,   42,   24,    0,    0,   34,    0,    0,
+    0,    0,    0,    0,    0,   53,   54,    0,   39,   69,
+   46,   43,   35,   36,
 };
-short yydgoto[] = {                                       7,
-   73,   50,   83,   30,    8,   31,    9,   51,   18,   12,
-   15,   21,   52,   53,   88,   54,   89,   90,  100,   74,
-   92,   84,   85,   94,   13,   33,   16,   35,   75,   22,
-   39,   19,   37,   32,
+short yydgoto[] = {                                      10,
+   92,   51,  102,   37,   11,   38,   12,   65,   25,   19,
+   22,   28,   13,   14,   42,   17,   66,   16,   43,   67,
+  107,   53,  108,  109,  118,   93,  110,  103,  104,  112,
+   20,   55,   23,   57,   94,   29,   61,   26,   59,   39,
 };
-short yysindex[] = {                                   -243,
- -265,    0, -252, -249, -246, -242, -243,    0,  -16,    0,
-    0,  -36,    0,    0,  -35,    0,    0,  -28,    0,    0,
-  -25,    0,    0,    0,    0,    0,    0,    0, -214,    0,
-  -33,    0,  -29, -252,  -21, -249,  -19, -246,  -18, -242,
-    0,    0,    0,    0,    0,    0,    0,  -16, -222,    0,
-  -12,    0,  -42,    0,  -23,    0,  -26,    0,  -16,    0,
-   -9,    0,    0,    0,  -23, -210,  -23,    6,    0,    0,
-    0,    0,    0,    0,   11,   12,    0,    0,    0,    0,
-    0,    0,    0,   14,    0,    0,   -9,   19,    0, -245,
-    0, -253,  -26, -201,   -9,   14, -210,    0,    0,  -26,
-    0,    0,    0,    0,    0,    0,
+short yysindex[] = {                                   -249,
+ -267,    0,    0,    0,    0, -244, -240, -238, -230, -249,
+    0,  -14,    0,  -28,    0,  -20,  -14,    0,  -49,    0,
+    0,  -10,    0,    0,   -5,    0,    0,    5,    0,    0,
+    0,    0,    0,    0,    0, -212,    0,  -33,    0,  -30,
+ -220,    0,  -11,    0,    0,    0,    0,    0,    0, -223,
+    0,   15,    0,   23,    7, -244,    8, -240,    9, -238,
+   10, -230,    0,  -14,   14,  -34,    0, -190,    0,  -28,
+    0,  -20,  -20,    0,  -25,    0,  -14,    0,  245,    0,
+    0,  -20, -192,    0,    0,    0,   15,    0,    0,    0,
+    0,    0,    0,   32,   23,    0,    0,    0,    0,    0,
+    0,    0,   33,    0,    0,  245,   34,    0, -203, -228,
+  -25, -206,  245,   33, -192,    0,    0,  -25,    0,    0,
+    0,    0,    0,    0,
 };
-short yyrindex[] = {                                    169,
-    0,    0,    0,    0,    0,    0,  169,    0,    0,    0,
-    0,   86,    0,    0,  103,    0,    0,  120,    0,    0,
-  137,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+short yyrindex[] = {                                    255,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,  255,
+    0,    0,    0,    0,    0,    0,    0,    0,  121,    0,
+    0,  141,    0,    0,  161,    0,    0,  181,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    1,
+    0,    0,  201,    0,    0,    0,    0,    0,    0,    0,
+    0,  -27,    0,  -21,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,  221,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-  154,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,  176,    0,    1,    0,    0,
-    0,    0,    0,    0,   18,   35,    0,    0,    0,    0,
-    0,    0,    0,   52,    0,    0,    0,   69,    0,   -2,
-    0,    0,    0,    0,    0,  180,  176,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,
+    0,    0,  265,    0,    0,    0,   21,    0,    0,    0,
+    0,    0,    0,   41,   61,    0,    0,    0,    0,    0,
+    0,    0,   81,    0,    0,    0,  101,    0,   11,    0,
+    0,    0,    0,  285,  265,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,
 };
 short yygindex[] = {                                      0,
-  -27,   15,  -24,   38,   64,   13,    0,    0,    0,    0,
-    0,    0,    8,   20,    0,    7,  -20,    0,    0,  -85,
-    0,   -8,  -17,    0,   46,    0,   45,    0,    0,   42,
-    0,   49,    0,   36,
+  -26,   30,  -29,   46,   75,  -15,    0,    0,    0,    0,
+    0,    0,    0,    0,   16,    0,  -13,    0,    0,    6,
+    0,   17,  -24,    0,    0,  -79,    0,  -19,  -23,    0,
+   36,    0,   35,    0,    0,   38,    0,   37,    0,   31,
 };
-#define YYTABLESIZE 447
-short yytable[] = {                                      49,
-   49,   67,   10,   69,   70,   11,   72,  102,   14,   49,
-   48,   17,    1,   71,  106,   20,   29,   55,   66,   98,
-   99,   34,   36,   82,    2,    3,    4,    5,    6,   38,
-   40,   55,   40,   49,   65,   42,   43,   44,   45,   57,
-   46,   59,   61,   24,   47,   65,   25,   26,   27,   67,
-   55,   61,   28,   87,   93,   48,   77,   95,   49,   78,
-   79,   80,   97,   64,  101,   81,   41,   65,   13,  103,
-   23,   76,   86,   91,   68,   55,  105,  104,   96,   56,
-   58,   62,    0,   63,   61,    8,   60,    0,    0,    0,
-    0,    0,   65,    0,    0,    0,    0,    0,    0,    0,
-    0,   13,    9,    0,    0,    0,    0,    0,    0,   61,
-    0,    0,    0,    0,    0,    0,    0,    0,    8,    7,
-    0,    0,    0,    0,    0,    0,   13,    0,    0,    0,
-    0,    0,    0,    0,    0,    9,   10,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    7,    6,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,   10,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    6,    0,    0,    0,
-    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-    0,    5,    0,    0,    0,    0,    0,    0,   28,    0,
-    0,    0,   29,    0,    0,    0,    0,    0,    0,    0,
-    0,    0,    0,    0,   42,   43,   44,   45,    0,   46,
-   69,   70,    0,   47,   42,   43,   44,   45,    0,   46,
-   71,   24,    0,   47,   25,   26,   27,    0,   77,    0,
-   28,   78,   79,   80,   40,   40,   49,   81,   49,    0,
-    0,   49,   49,   49,   40,    0,    0,   49,   49,   49,
-   49,   49,   49,   55,    0,   55,    0,    0,   55,   55,
-   55,    0,    0,    0,   55,   55,   55,   55,   55,   55,
-   65,    0,   65,    0,    0,   65,   65,   65,    0,    0,
-    0,   65,   65,   65,   65,   65,   65,   61,    0,   61,
-    0,    0,   61,   61,   61,    0,    0,    0,   61,   61,
-   61,   61,   61,   61,   13,    0,   13,    0,    0,   13,
-   13,   13,    0,    0,    0,   13,   13,   13,   13,   13,
-   13,    8,    0,    8,    0,    0,    8,    8,    8,    0,
-    0,    0,    8,    8,    8,    8,    8,    8,    9,    0,
-    9,    0,    0,    9,    9,    9,    0,    0,    0,    9,
-    9,    9,    9,    9,    9,    7,    0,    7,    0,    0,
-    7,    7,    7,    0,    0,    0,    7,    7,    7,    7,
-    7,    7,   10,    0,   10,    0,    0,   10,   10,   10,
-    0,    0,    0,   10,   10,   10,   10,   10,   10,    6,
-    0,    6,    0,    0,    6,    6,    6,    0,    0,    0,
-    6,    6,    6,    6,    6,    6,    5,    0,    0,    5,
-    5,    5,   28,   28,    0,    5,   29,   29,    0,    0,
-   28,   28,   28,    0,   29,   29,   29,
+#define YYTABLESIZE 555
+short yytable[] = {                                      50,
+   20,   54,   52,   15,   41,   17,    1,   91,   56,   72,
+   64,   15,   50,   18,    2,    3,    4,   21,   36,   24,
+   61,    5,    6,    7,    8,    9,   83,   27,   88,   89,
+   68,  120,   70,   20,   44,   45,   46,   47,  124,   48,
+   67,   90,   69,   52,   20,   31,   49,   58,   32,   33,
+   34,   96,   60,   61,   97,   98,   99,   35,   72,   87,
+   77,   95,   62,  100,  116,  117,   64,   73,   75,   77,
+   79,   82,   84,   67,  106,  111,  113,  115,   61,   71,
+   73,   63,  121,  119,   30,   85,  114,  105,   86,  122,
+  123,   74,   76,   77,   81,    0,   78,    0,   67,   80,
+   25,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,   73,    0,    0,    0,    0,   77,    0,
+    8,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,   25,    0,    0,    0,    0,   73,    0,
+    9,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    8,    0,    0,    0,    0,   25,    0,
+    7,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    9,    0,    0,    0,    0,    0,    0,
+   10,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    7,    0,    0,    0,    0,    0,    0,
+   18,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,   10,    0,    0,    0,    0,    0,    0,
+    6,    0,    0,    0,   44,   45,   46,   47,    0,   48,
+    0,   88,   89,   18,   40,   17,   49,   44,   45,   46,
+   47,   15,   48,   31,   90,    0,   32,   33,   34,   49,
+    0,    0,    0,    6,    0,   35,   20,    0,   20,    0,
+    0,   20,   20,   20,   20,   20,   20,   52,   52,    0,
+   20,   20,   20,   20,   20,   20,   61,  101,   61,    0,
+   52,   61,   61,   61,   61,   61,   61,    5,    0,    0,
+   61,   61,   61,   61,   61,   61,   67,   40,   67,    0,
+    0,   67,   67,   67,   67,   67,   67,    0,    0,    0,
+   67,   67,   67,   67,   67,   67,   77,   41,   77,    0,
+    0,   77,   77,   77,   77,   77,   77,    0,    0,    0,
+   77,   77,   77,   77,   77,   77,   73,    0,   73,    0,
+    0,   73,   73,   73,   73,   73,   73,    0,    0,    0,
+   73,   73,   73,   73,   73,   73,   25,    0,   25,    0,
+    0,   25,   25,   25,   25,   25,   25,    0,    0,    0,
+   25,   25,   25,   25,   25,   25,    8,    0,    8,    0,
+    0,    8,    8,    8,    8,    8,    8,    0,    0,    0,
+    8,    8,    8,    8,    8,    8,    9,    0,    9,    0,
+    0,    9,    9,    9,    9,    9,    9,    0,    0,    0,
+    9,    9,    9,    9,    9,    9,    7,    0,    7,    0,
+    0,    7,    7,    7,    7,    7,    7,    0,    0,    0,
+    7,    7,    7,    7,    7,    7,   10,    0,   10,    0,
+    0,   10,   10,   10,   10,   10,   10,    0,    0,    0,
+   10,   10,   10,   10,   10,   10,   18,    0,   18,    0,
+    0,   18,   18,   18,   18,   18,   18,    0,    0,    0,
+   18,   18,   18,   18,   18,   18,    6,    0,    6,    0,
+    0,    6,    6,    6,    6,    6,    6,    0,    0,    0,
+    6,    6,    6,    6,    6,    6,    0,    0,    0,    0,
+    0,    0,   96,    0,    0,   97,   98,   99,    0,    0,
+    0,    0,    5,    0,  100,    5,    5,    5,    0,    0,
+    0,   40,   40,    0,    5,    0,    0,    0,    0,    0,
+    0,    0,   40,   40,   40,    0,    0,    0,    0,    0,
+    0,   41,   41,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,   41,   41,   41,
 };
 short yycheck[] = {                                      33,
-    0,   44,  268,  257,  258,  258,   33,   93,  258,   33,
-   44,  258,  256,  267,  100,  258,   33,    0,   61,  265,
-  266,   58,   58,   33,  268,  269,  270,  271,  272,   58,
-   33,   61,   58,   33,    0,  258,  259,  260,  261,   61,
-  263,   61,   61,  258,  267,   58,  261,  262,  263,   44,
-   33,    0,  267,  264,   44,   44,  258,   44,   58,  261,
-  262,  263,   44,   49,   92,  267,   29,   33,    0,   94,
-    7,   59,   65,   67,   55,   58,   97,   95,   87,   34,
-   36,   40,   -1,   48,   33,    0,   38,   -1,   -1,   -1,
-   -1,   -1,   58,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-   -1,   33,    0,   -1,   -1,   -1,   -1,   -1,   -1,   58,
-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   33,    0,
-   -1,   -1,   -1,   -1,   -1,   -1,   58,   -1,   -1,   -1,
-   -1,   -1,   -1,   -1,   -1,   33,    0,   -1,   -1,   -1,
-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-   -1,   -1,   33,    0,   -1,   -1,   -1,   -1,   -1,   -1,
-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   33,
-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-   -1,   -1,   -1,   -1,   -1,   -1,   33,   -1,   -1,   -1,
-   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-   -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,   33,   -1,
-   -1,   -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-   -1,   -1,   -1,   -1,  258,  259,  260,  261,   -1,  263,
-  257,  258,   -1,  267,  258,  259,  260,  261,   -1,  263,
-  267,  258,   -1,  267,  261,  262,  263,   -1,  258,   -1,
-  267,  261,  262,  263,  257,  258,  256,  267,  258,   -1,
-   -1,  261,  262,  263,  267,   -1,   -1,  267,  268,  269,
-  270,  271,  272,  256,   -1,  258,   -1,   -1,  261,  262,
-  263,   -1,   -1,   -1,  267,  268,  269,  270,  271,  272,
-  256,   -1,  258,   -1,   -1,  261,  262,  263,   -1,   -1,
-   -1,  267,  268,  269,  270,  271,  272,  256,   -1,  258,
-   -1,   -1,  261,  262,  263,   -1,   -1,   -1,  267,  268,
-  269,  270,  271,  272,  256,   -1,  258,   -1,   -1,  261,
-  262,  263,   -1,   -1,   -1,  267,  268,  269,  270,  271,
-  272,  256,   -1,  258,   -1,   -1,  261,  262,  263,   -1,
-   -1,   -1,  267,  268,  269,  270,  271,  272,  256,   -1,
-  258,   -1,   -1,  261,  262,  263,   -1,   -1,   -1,  267,
-  268,  269,  270,  271,  272,  256,   -1,  258,   -1,   -1,
-  261,  262,  263,   -1,   -1,   -1,  267,  268,  269,  270,
-  271,  272,  256,   -1,  258,   -1,   -1,  261,  262,  263,
-   -1,   -1,   -1,  267,  268,  269,  270,  271,  272,  256,
-   -1,  258,   -1,   -1,  261,  262,  263,   -1,   -1,   -1,
-  267,  268,  269,  270,  271,  272,  258,   -1,   -1,  261,
-  262,  263,  257,  258,   -1,  267,  257,  258,   -1,   -1,
-  265,  266,  267,   -1,  265,  266,  267,
+    0,   17,   16,  271,   33,   33,  256,   33,   58,   44,
+   44,   33,   33,  258,  264,  265,  266,  258,   33,  258,
+    0,  271,  272,  273,  274,  275,   61,  258,  257,  258,
+   61,  111,   44,   33,  258,  259,  260,  261,  118,  263,
+    0,  270,  263,   33,   44,  258,  270,   58,  261,  262,
+  263,  258,   58,   33,  261,  262,  263,  270,   44,   73,
+    0,   77,   58,  270,  268,  269,   44,   61,   61,   61,
+   61,   58,  263,   33,  267,   44,   44,   44,   58,   50,
+    0,   36,  112,  110,   10,   70,  106,   82,   72,  113,
+  115,   56,   58,   33,   64,   -1,   60,   -1,   58,   62,
+    0,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+   -1,   -1,   -1,   33,   -1,   -1,   -1,   -1,   58,   -1,
+    0,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+   -1,   -1,   -1,   33,   -1,   -1,   -1,   -1,   58,   -1,
+    0,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+   -1,   -1,   -1,   33,   -1,   -1,   -1,   -1,   58,   -1,
+    0,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+   -1,   -1,   -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,
+    0,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+   -1,   -1,   -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,
+    0,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+   -1,   -1,   -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,
+    0,   -1,   -1,   -1,  258,  259,  260,  261,   -1,  263,
+   -1,  257,  258,   33,  263,  263,  270,  258,  259,  260,
+  261,  263,  263,  258,  270,   -1,  261,  262,  263,  270,
+   -1,   -1,   -1,   33,   -1,  270,  256,   -1,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,  257,  258,   -1,
+  270,  271,  272,  273,  274,  275,  256,   33,  258,   -1,
+  270,  261,  262,  263,  264,  265,  266,   33,   -1,   -1,
+  270,  271,  272,  273,  274,  275,  256,   33,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,
+  270,  271,  272,  273,  274,  275,  256,   33,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,
+  270,  271,  272,  273,  274,  275,  256,   -1,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,
+  270,  271,  272,  273,  274,  275,  256,   -1,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,
+  270,  271,  272,  273,  274,  275,  256,   -1,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,
+  270,  271,  272,  273,  274,  275,  256,   -1,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,
+  270,  271,  272,  273,  274,  275,  256,   -1,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,
+  270,  271,  272,  273,  274,  275,  256,   -1,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,
+  270,  271,  272,  273,  274,  275,  256,   -1,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,
+  270,  271,  272,  273,  274,  275,  256,   -1,  258,   -1,
+   -1,  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,
+  270,  271,  272,  273,  274,  275,   -1,   -1,   -1,   -1,
+   -1,   -1,  258,   -1,   -1,  261,  262,  263,   -1,   -1,
+   -1,   -1,  258,   -1,  270,  261,  262,  263,   -1,   -1,
+   -1,  257,  258,   -1,  270,   -1,   -1,   -1,   -1,   -1,
+   -1,   -1,  268,  269,  270,   -1,   -1,   -1,   -1,   -1,
+   -1,  257,  258,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+   -1,   -1,  268,  269,  270,
 };
-#define YYFINAL 7
+#define YYFINAL 10
 #ifndef YYDEBUG
 #define YYDEBUG 0
 #endif
-#define YYMAXTOKEN 273
+#define YYMAXTOKEN 276
 #if YYDEBUG
 char *yyname[] = {
 "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -429,9 +458,9 @@ char *yyname[] = {
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"COMMAND",
-"ALIAS","NTWKADDR","FQHOST","NETGROUP","USERGROUP","NAME","RUNAS","NOPASSWD",
-"PASSWD","ALL","COMMENT","HOSTALIAS","CMNDALIAS","USERALIAS","RUNASALIAS",
-"ERROR",
+"ALIAS","NTWKADDR","FQHOST","NETGROUP","USERGROUP","WORD","DEFAULTS",
+"DEFAULTS_HOST","DEFAULTS_USER","RUNAS","NOPASSWD","PASSWD","ALL","COMMENT",
+"HOSTALIAS","CMNDALIAS","USERALIAS","RUNASALIAS","ERROR",
 };
 char *yyrule[] = {
 "$accept : file",
@@ -445,6 +474,18 @@ char *yyrule[] = {
 "entry : HOSTALIAS hostaliases",
 "entry : CMNDALIAS cmndaliases",
 "entry : RUNASALIAS runasaliases",
+"entry : defaults_line",
+"defaults_line : defaults_type defaults_list",
+"defaults_type : DEFAULTS",
+"$$2 :",
+"defaults_type : DEFAULTS_USER $$2 userlist",
+"$$3 :",
+"defaults_type : DEFAULTS_HOST $$3 hostlist",
+"defaults_list : defaults_entry",
+"defaults_list : defaults_entry ',' defaults_list",
+"defaults_entry : WORD",
+"defaults_entry : '!' WORD",
+"defaults_entry : WORD '=' WORD",
 "privileges : privilege",
 "privileges : privileges ':' privilege",
 "privilege : hostlist '=' cmndspeclist",
@@ -453,23 +494,23 @@ char *yyrule[] = {
 "host : ALL",
 "host : NTWKADDR",
 "host : NETGROUP",
-"host : NAME",
+"host : WORD",
 "host : FQHOST",
 "host : ALIAS",
 "cmndspeclist : cmndspec",
 "cmndspeclist : cmndspeclist ',' cmndspec",
 "cmndspec : runasspec nopasswd opcmnd",
 "opcmnd : cmnd",
-"$$2 :",
-"opcmnd : '!' $$2 cmnd",
+"$$4 :",
+"opcmnd : '!' $$4 cmnd",
 "runasspec :",
 "runasspec : RUNAS runaslist",
 "runaslist : oprunasuser",
 "runaslist : runaslist ',' oprunasuser",
 "oprunasuser : runasuser",
-"$$3 :",
-"oprunasuser : '!' $$3 runasuser",
-"runasuser : NAME",
+"$$5 :",
+"oprunasuser : '!' $$5 runasuser",
+"runasuser : WORD",
 "runasuser : USERGROUP",
 "runasuser : NETGROUP",
 "runasuser : ALIAS",
@@ -482,29 +523,29 @@ char *yyrule[] = {
 "cmnd : COMMAND",
 "hostaliases : hostalias",
 "hostaliases : hostaliases ':' hostalias",
-"$$4 :",
-"hostalias : ALIAS $$4 '=' hostlist",
+"$$6 :",
+"hostalias : ALIAS $$6 '=' hostlist",
 "hostlist : ophost",
 "hostlist : hostlist ',' ophost",
 "cmndaliases : cmndalias",
 "cmndaliases : cmndaliases ':' cmndalias",
-"$$5 :",
-"cmndalias : ALIAS $$5 '=' cmndlist",
+"$$7 :",
+"cmndalias : ALIAS $$7 '=' cmndlist",
 "cmndlist : opcmnd",
 "cmndlist : cmndlist ',' opcmnd",
 "runasaliases : runasalias",
 "runasaliases : runasaliases ':' runasalias",
-"$$6 :",
-"runasalias : ALIAS $$6 '=' runaslist",
+"$$8 :",
+"runasalias : ALIAS $$8 '=' runaslist",
 "useraliases : useralias",
 "useraliases : useraliases ':' useralias",
-"$$7 :",
-"useralias : ALIAS $$7 '=' userlist",
+"$$9 :",
+"useralias : ALIAS $$9 '=' userlist",
 "userlist : opuser",
 "userlist : userlist ',' opuser",
 "opuser : user",
 "opuser : '!' user",
-"user : NAME",
+"user : WORD",
 "user : USERGROUP",
 "user : NETGROUP",
 "user : ALIAS",
@@ -535,7 +576,7 @@ short *yyss;
 short *yysslim;
 YYSTYPE *yyvs;
 int yystacksize;
-#line 768 "parse.yacc"
+#line 813 "./parse.yacc"
 
 #define MOREALIASES (32)
 aliasinfo *aliases = NULL;
@@ -722,13 +763,13 @@ list_matches()
            } while ((p = strtok(NULL, ", ")));
            (void) fputs(") ", stdout);
        } else {
-           (void) printf("(%s) ", RUNAS_DEFAULT);
+           (void) printf("(%s) ", sudo_strtable[I_RUNAS_DEF]);
        }
 
        /* Is a password required? */
-       if (cm_list[i].nopasswd == TRUE && pwdef != TRUE)
+       if (cm_list[i].nopasswd == TRUE && sudo_flag_set(FL_AUTHENTICATE))
            (void) fputs("NOPASSWD: ", stdout);
-       else if (cm_list[i].nopasswd == FALSE && pwdef == TRUE)
+       else if (cm_list[i].nopasswd == FALSE && !sudo_flag_set(FL_AUTHENTICATE))
            (void) fputs("PASSWD: ", stdout);
 
        /* Print the actual command or expanded Cmnd_Alias. */
@@ -886,7 +927,7 @@ init_parser()
     if (printmatches == TRUE)
        expand_match_list();
 }
-#line 890 "sudo.tab.c"
+#line 931 "sudo.tab.c"
 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
 #if defined(__cplusplus) || __STDC__
 static int yygrowstack(void)
@@ -1067,42 +1108,106 @@ yyreduce:
     switch (yyn)
     {
 case 3:
-#line 255 "parse.yacc"
+#line 254 "./parse.yacc"
 { ; }
 break;
 case 4:
-#line 257 "parse.yacc"
+#line 256 "./parse.yacc"
 { yyerrok; }
 break;
 case 5:
-#line 258 "parse.yacc"
+#line 257 "./parse.yacc"
 { push; }
 break;
 case 6:
-#line 258 "parse.yacc"
+#line 257 "./parse.yacc"
 {
                            while (top && user_matches != TRUE)
                                pop;
                        }
 break;
 case 7:
-#line 263 "parse.yacc"
+#line 262 "./parse.yacc"
 { ; }
 break;
 case 8:
-#line 265 "parse.yacc"
+#line 264 "./parse.yacc"
 { ; }
 break;
 case 9:
-#line 267 "parse.yacc"
+#line 266 "./parse.yacc"
 { ; }
 break;
 case 10:
-#line 269 "parse.yacc"
+#line 268 "./parse.yacc"
+{ ; }
+break;
+case 11:
+#line 270 "./parse.yacc"
 { ; }
 break;
 case 13:
-#line 277 "parse.yacc"
+#line 275 "./parse.yacc"
+{
+                           defaults_matches = TRUE;
+                       }
+break;
+case 14:
+#line 278 "./parse.yacc"
+{ push; }
+break;
+case 15:
+#line 278 "./parse.yacc"
+{
+                           defaults_matches = user_matches;
+                           pop;
+                       }
+break;
+case 16:
+#line 282 "./parse.yacc"
+{ push; }
+break;
+case 17:
+#line 282 "./parse.yacc"
+{
+                           defaults_matches = host_matches;
+                           pop;
+                       }
+break;
+case 20:
+#line 291 "./parse.yacc"
+{
+                           if (defaults_matches && !set_default(yyvsp[0].string, NULL, 1)) {
+                               yyerror(NULL);
+                               YYERROR;
+                           }
+                           free(yyvsp[0].string);
+                       }
+break;
+case 21:
+#line 298 "./parse.yacc"
+{
+                           if (defaults_matches && !set_default(yyvsp[0].string, NULL, 0)) {
+                               yyerror(NULL);
+                               YYERROR;
+                           }
+                           free(yyvsp[0].string);
+                       }
+break;
+case 22:
+#line 305 "./parse.yacc"
+{
+                           /* XXX - need to support quoted values */
+                           if (defaults_matches && !set_default(yyvsp[-2].string, yyvsp[0].string, 1)) {
+                               yyerror(NULL);
+                               YYERROR;
+                           }
+                           free(yyvsp[-2].string);
+                           free(yyvsp[0].string);
+                       }
+break;
+case 25:
+#line 319 "./parse.yacc"
 {
                            /*
                             * We already did a push if necessary in
@@ -1111,31 +1216,34 @@ case 13:
                             */
                            host_matches = -1;
                            runas_matches = -1;
-                           no_passwd = pwdef;
+                           if (sudo_flag_set(FL_AUTHENTICATE))
+                               no_passwd = -1;
+                           else
+                               no_passwd = TRUE;
                        }
 break;
-case 14:
-#line 289 "parse.yacc"
+case 26:
+#line 334 "./parse.yacc"
 {
                            if (yyvsp[0].BOOLEAN != -1)
                                host_matches = yyvsp[0].BOOLEAN;
                        }
 break;
-case 15:
-#line 293 "parse.yacc"
+case 27:
+#line 338 "./parse.yacc"
 {
                            if (yyvsp[0].BOOLEAN != -1)
                                host_matches = ! yyvsp[0].BOOLEAN;
                        }
 break;
-case 16:
-#line 298 "parse.yacc"
+case 28:
+#line 343 "./parse.yacc"
 {
                            yyval.BOOLEAN = TRUE;
                        }
 break;
-case 17:
-#line 301 "parse.yacc"
+case 29:
+#line 346 "./parse.yacc"
 {
                            if (addr_matches(yyvsp[0].string))
                                yyval.BOOLEAN = TRUE;
@@ -1144,8 +1252,8 @@ case 17:
                            free(yyvsp[0].string);
                        }
 break;
-case 18:
-#line 308 "parse.yacc"
+case 30:
+#line 353 "./parse.yacc"
 {
                            if (netgr_matches(yyvsp[0].string, user_host, NULL))
                                yyval.BOOLEAN = TRUE;
@@ -1154,8 +1262,8 @@ case 18:
                            free(yyvsp[0].string);
                        }
 break;
-case 19:
-#line 315 "parse.yacc"
+case 31:
+#line 360 "./parse.yacc"
 {
                            if (strcasecmp(user_shost, yyvsp[0].string) == 0)
                                yyval.BOOLEAN = TRUE;
@@ -1164,8 +1272,8 @@ case 19:
                            free(yyvsp[0].string);
                        }
 break;
-case 20:
-#line 322 "parse.yacc"
+case 32:
+#line 367 "./parse.yacc"
 {
                            if (strcasecmp(user_host, yyvsp[0].string) == 0)
                                yyval.BOOLEAN = TRUE;
@@ -1174,8 +1282,8 @@ case 20:
                            free(yyvsp[0].string);
                        }
 break;
-case 21:
-#line 329 "parse.yacc"
+case 33:
+#line 374 "./parse.yacc"
 {
                            aliasinfo *aip = find_alias(yyvsp[0].string, HOST_ALIAS);
 
@@ -1199,8 +1307,8 @@ case 21:
                            free(yyvsp[0].string);
                        }
 break;
-case 24:
-#line 357 "parse.yacc"
+case 36:
+#line 402 "./parse.yacc"
 {
                            /*
                             * Push the entry onto the stack if it is worth
@@ -1222,15 +1330,15 @@ case 24:
                            cmnd_matches = -1;
                        }
 break;
-case 25:
-#line 379 "parse.yacc"
+case 37:
+#line 424 "./parse.yacc"
 {
                            if (yyvsp[0].BOOLEAN != -1)
                                cmnd_matches = yyvsp[0].BOOLEAN;
                        }
 break;
-case 26:
-#line 383 "parse.yacc"
+case 38:
+#line 428 "./parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1241,15 +1349,15 @@ case 26:
                            }
                        }
 break;
-case 27:
-#line 391 "parse.yacc"
+case 39:
+#line 436 "./parse.yacc"
 {
                            if (yyvsp[0].BOOLEAN != -1)
                                cmnd_matches = ! yyvsp[0].BOOLEAN;
                        }
 break;
-case 28:
-#line 397 "parse.yacc"
+case 40:
+#line 442 "./parse.yacc"
 {
                            if (printmatches == TRUE && host_matches == TRUE &&
                                user_matches == TRUE) {
@@ -1267,26 +1375,26 @@ case 28:
                            }
                            /*
                             * If this is the first entry in a command list
-                            * then check against RUNAS_DEFAULT.
+                            * then check against default runas user.
                             */
                            if (runas_matches == -1)
-                               runas_matches =
-                                   (strcmp(RUNAS_DEFAULT, user_runas) == 0);
+                               runas_matches = (strcmp(*user_runas,
+                                   sudo_strtable[I_RUNAS_DEF]) == 0);
                        }
 break;
-case 29:
-#line 420 "parse.yacc"
+case 41:
+#line 465 "./parse.yacc"
 { ; }
 break;
-case 32:
-#line 427 "parse.yacc"
+case 44:
+#line 472 "./parse.yacc"
 {
                            if (yyvsp[0].BOOLEAN != -1)
                                runas_matches = yyvsp[0].BOOLEAN;
                        }
 break;
-case 33:
-#line 431 "parse.yacc"
+case 45:
+#line 476 "./parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1297,15 +1405,15 @@ case 33:
                            }
                        }
 break;
-case 34:
-#line 439 "parse.yacc"
+case 46:
+#line 484 "./parse.yacc"
 {
                            if (yyvsp[0].BOOLEAN != -1)
                                runas_matches = ! yyvsp[0].BOOLEAN;
                        }
 break;
-case 35:
-#line 444 "parse.yacc"
+case 47:
+#line 489 "./parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1314,15 +1422,15 @@ case 35:
                                    user_matches == TRUE)
                                    append_runas(yyvsp[0].string, ", ");
                            }
-                           if (strcmp(yyvsp[0].string, user_runas) == 0)
+                           if (strcmp(yyvsp[0].string, *user_runas) == 0)
                                yyval.BOOLEAN = TRUE;
                            else
                                yyval.BOOLEAN = -1;
                            free(yyvsp[0].string);
                        }
 break;
-case 36:
-#line 458 "parse.yacc"
+case 48:
+#line 503 "./parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1331,15 +1439,15 @@ case 36:
                                    user_matches == TRUE)
                                    append_runas(yyvsp[0].string, ", ");
                            }
-                           if (usergr_matches(yyvsp[0].string, user_runas))
+                           if (usergr_matches(yyvsp[0].string, *user_runas))
                                yyval.BOOLEAN = TRUE;
                            else
                                yyval.BOOLEAN = -1;
                            free(yyvsp[0].string);
                        }
 break;
-case 37:
-#line 472 "parse.yacc"
+case 49:
+#line 517 "./parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1348,15 +1456,15 @@ case 37:
                                    user_matches == TRUE)
                                    append_runas(yyvsp[0].string, ", ");
                            }
-                           if (netgr_matches(yyvsp[0].string, NULL, user_runas))
+                           if (netgr_matches(yyvsp[0].string, NULL, *user_runas))
                                yyval.BOOLEAN = TRUE;
                            else
                                yyval.BOOLEAN = -1;
                            free(yyvsp[0].string);
                        }
 break;
-case 38:
-#line 486 "parse.yacc"
+case 50:
+#line 531 "./parse.yacc"
 {
                            aliasinfo *aip = find_alias(yyvsp[0].string, RUNAS_ALIAS);
 
@@ -1370,7 +1478,7 @@ case 38:
                            /* could be an all-caps username */
                            if (aip)
                                yyval.BOOLEAN = aip->val;
-                           else if (strcmp(yyvsp[0].string, user_runas) == 0)
+                           else if (strcmp(yyvsp[0].string, *user_runas) == 0)
                                yyval.BOOLEAN = TRUE;
                            else {
                                if (pedantic) {
@@ -1387,8 +1495,8 @@ case 38:
                            free(yyvsp[0].string);
                        }
 break;
-case 39:
-#line 515 "parse.yacc"
+case 51:
+#line 560 "./parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1400,8 +1508,8 @@ case 39:
                            yyval.BOOLEAN = TRUE;
                        }
 break;
-case 40:
-#line 527 "parse.yacc"
+case 52:
+#line 572 "./parse.yacc"
 {
                            /* Inherit NOPASSWD/PASSWD status. */
                            if (printmatches == TRUE && host_matches == TRUE &&
@@ -1413,8 +1521,8 @@ case 40:
                            }
                        }
 break;
-case 41:
-#line 537 "parse.yacc"
+case 53:
+#line 582 "./parse.yacc"
 {
                            no_passwd = TRUE;
                            if (printmatches == TRUE && host_matches == TRUE &&
@@ -1422,8 +1530,8 @@ case 41:
                                cm_list[cm_list_len].nopasswd = TRUE;
                        }
 break;
-case 42:
-#line 543 "parse.yacc"
+case 54:
+#line 588 "./parse.yacc"
 {
                            no_passwd = FALSE;
                            if (printmatches == TRUE && host_matches == TRUE &&
@@ -1431,8 +1539,8 @@ case 42:
                                cm_list[cm_list_len].nopasswd = FALSE;
                        }
 break;
-case 43:
-#line 551 "parse.yacc"
+case 55:
+#line 596 "./parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1451,8 +1559,8 @@ case 43:
                            safe_cmnd = estrdup(user_cmnd);
                        }
 break;
-case 44:
-#line 568 "parse.yacc"
+case 56:
+#line 613 "./parse.yacc"
 {
                            aliasinfo *aip;
 
@@ -1483,8 +1591,8 @@ case 44:
                            free(yyvsp[0].string);
                        }
 break;
-case 45:
-#line 597 "parse.yacc"
+case 57:
+#line 642 "./parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE) {
@@ -1512,12 +1620,12 @@ case 45:
                                free(yyvsp[0].command.args);
                        }
 break;
-case 48:
-#line 629 "parse.yacc"
+case 60:
+#line 674 "./parse.yacc"
 { push; }
 break;
-case 49:
-#line 629 "parse.yacc"
+case 61:
+#line 674 "./parse.yacc"
 {
                            if ((host_matches != -1 || pedantic) &&
                                !add_alias(yyvsp[-3].string, HOST_ALIAS, host_matches))
@@ -1525,8 +1633,8 @@ case 49:
                            pop;
                        }
 break;
-case 54:
-#line 645 "parse.yacc"
+case 66:
+#line 690 "./parse.yacc"
 {
                            push;
                            if (printmatches == TRUE) {
@@ -1538,8 +1646,8 @@ case 54:
                             }
                        }
 break;
-case 55:
-#line 654 "parse.yacc"
+case 67:
+#line 699 "./parse.yacc"
 {
                            if ((cmnd_matches != -1 || pedantic) &&
                                !add_alias(yyvsp[-3].string, CMND_ALIAS, cmnd_matches))
@@ -1551,12 +1659,12 @@ case 55:
                                in_alias = FALSE;
                        }
 break;
-case 56:
-#line 666 "parse.yacc"
+case 68:
+#line 711 "./parse.yacc"
 { ; }
 break;
-case 60:
-#line 674 "parse.yacc"
+case 72:
+#line 719 "./parse.yacc"
 {
                            push;
                            if (printmatches == TRUE) {
@@ -1568,8 +1676,8 @@ case 60:
                            }
                        }
 break;
-case 61:
-#line 683 "parse.yacc"
+case 73:
+#line 728 "./parse.yacc"
 {
                            if ((runas_matches != -1 || pedantic) &&
                                !add_alias(yyvsp[-3].string, RUNAS_ALIAS, runas_matches))
@@ -1581,12 +1689,12 @@ case 61:
                                in_alias = FALSE;
                        }
 break;
-case 64:
-#line 699 "parse.yacc"
+case 76:
+#line 744 "./parse.yacc"
 { push; }
 break;
-case 65:
-#line 699 "parse.yacc"
+case 77:
+#line 744 "./parse.yacc"
 {
                            if ((user_matches != -1 || pedantic) &&
                                !add_alias(yyvsp[-3].string, USER_ALIAS, user_matches))
@@ -1595,26 +1703,22 @@ case 65:
                            free(yyvsp[-3].string);
                        }
 break;
-case 66:
-#line 708 "parse.yacc"
-{ ; }
-break;
-case 68:
-#line 712 "parse.yacc"
+case 80:
+#line 757 "./parse.yacc"
 {
                            if (yyvsp[0].BOOLEAN != -1)
                                user_matches = yyvsp[0].BOOLEAN;
                        }
 break;
-case 69:
-#line 716 "parse.yacc"
+case 81:
+#line 761 "./parse.yacc"
 {
                            if (yyvsp[0].BOOLEAN != -1)
                                user_matches = ! yyvsp[0].BOOLEAN;
                        }
 break;
-case 70:
-#line 721 "parse.yacc"
+case 82:
+#line 766 "./parse.yacc"
 {
                            if (strcmp(yyvsp[0].string, user_name) == 0)
                                yyval.BOOLEAN = TRUE;
@@ -1623,8 +1727,8 @@ case 70:
                            free(yyvsp[0].string);
                        }
 break;
-case 71:
-#line 728 "parse.yacc"
+case 83:
+#line 773 "./parse.yacc"
 {
                            if (usergr_matches(yyvsp[0].string, user_name))
                                yyval.BOOLEAN = TRUE;
@@ -1633,8 +1737,8 @@ case 71:
                            free(yyvsp[0].string);
                        }
 break;
-case 72:
-#line 735 "parse.yacc"
+case 84:
+#line 780 "./parse.yacc"
 {
                            if (netgr_matches(yyvsp[0].string, NULL, user_name))
                                yyval.BOOLEAN = TRUE;
@@ -1643,8 +1747,8 @@ case 72:
                            free(yyvsp[0].string);
                        }
 break;
-case 73:
-#line 742 "parse.yacc"
+case 85:
+#line 787 "./parse.yacc"
 {
                            aliasinfo *aip = find_alias(yyvsp[0].string, USER_ALIAS);
 
@@ -1666,13 +1770,13 @@ case 73:
                            free(yyvsp[0].string);
                        }
 break;
-case 74:
-#line 762 "parse.yacc"
+case 86:
+#line 807 "./parse.yacc"
 {
                            yyval.BOOLEAN = TRUE;
                        }
 break;
-#line 1676 "sudo.tab.c"
+#line 1780 "sudo.tab.c"
     }
     yyssp -= yym;
     yystate = *yyssp;
index aa14f7f855675b0029d7b3551c2c75d3ed1f2a32..77ebe4b79bf1b87798bd07a82907bbc77c0ac4f6 100644 (file)
@@ -4,17 +4,20 @@
 #define FQHOST 260
 #define NETGROUP 261
 #define USERGROUP 262
-#define NAME 263
-#define RUNAS 264
-#define NOPASSWD 265
-#define PASSWD 266
-#define ALL 267
-#define COMMENT 268
-#define HOSTALIAS 269
-#define CMNDALIAS 270
-#define USERALIAS 271
-#define RUNASALIAS 272
-#define ERROR 273
+#define WORD 263
+#define DEFAULTS 264
+#define DEFAULTS_HOST 265
+#define DEFAULTS_USER 266
+#define RUNAS 267
+#define NOPASSWD 268
+#define PASSWD 269
+#define ALL 270
+#define COMMENT 271
+#define HOSTALIAS 272
+#define CMNDALIAS 273
+#define USERALIAS 274
+#define RUNASALIAS 275
+#define ERROR 276
 typedef union {
     char *string;
     int BOOLEAN;
index 511a5271e409657d1f968352ca688ce6027f6089..14ca22c2ba0b66687795dce6b216cc310527acac 100644 (file)
@@ -296,9 +296,8 @@ main(argc, argv)
     Argv = argv;
     Argc = argc;
 
-    user_runas = RUNAS_DEFAULT;
     if (Argc >= 6 && strcmp(Argv[1], "-u") == 0) {
-       user_runas = Argv[2];
+       user_runas = &Argv[2];
        pw.pw_name = Argv[3];
        user_host = Argv[4];
        user_cmnd = Argv[5];
@@ -343,6 +342,9 @@ main(argc, argv)
        }
     }
 
+    /* Initialize default values. */
+    init_defaults();
+
     /* Warn about aliases that are used before being defined. */
     pedantic = TRUE;
 
@@ -368,7 +370,7 @@ main(argc, argv)
            (void) printf("cmnd_match : %d\n", cmnd_matches);
            (void) printf("no_passwd  : %d\n", no_passwd);
            (void) printf("runas_match: %d\n", runas_matches);
-           (void) printf("runas      : %s\n", user_runas);
+           (void) printf("runas      : %s\n", *user_runas);
            top--;
        }
     }
diff --git a/version.c b/version.c
deleted file mode 100644 (file)
index 30bdb0c..0000000
--- a/version.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * 4. Products derived from this software may not be called "Sudo" nor
- *    may "Sudo" appear in their names without specific prior written
- *    permission from the author.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif /* HAVE_STRING_H */
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif /* HAVE_STRINGS_H */
-#include <sys/types.h>
-#include <sys/param.h>
-
-#define SYSLOG_NAMES
-
-#include "sudo.h"
-#include "version.h"
-#include "auth/sudo_auth.h"
-
-#ifndef lint
-static const char rcsid[] = "$Sudo$";
-#endif /* lint */
-
-#if (LOGGING & SLOG_SYSLOG) && defined(HAVE_SYSLOG_NAMES)
-static char *num_to_name __P((int, CODE *));
-#endif /* SLOG_SYSLOG && HAVE_SYSLOG_NAMES */
-
-/*
- * Print version and configure info.
- */
-void
-print_version()
-{
-    extern sudo_auth auth_switch[];
-    sudo_auth *auth;
-
-    (void) printf("Sudo version %s\n", version);
-
-    /*
-     * Print compile-time options if root.
-     * At some point these will all be in a structure of some kind
-     * to allow overriding the defaults from sudoers.
-     * XXX - reorganize for readability.
-     */
-    if (getuid() == 0) {
-       (void) printf("\nSudoers file: %s, mode 0%o, uid %d, gid %d\n",
-           _PATH_SUDOERS, SUDOERS_MODE, SUDOERS_UID, SUDOERS_GID);
-       (void) printf("Sudoers temp file: %s\n", _PATH_SUDOERS_TMP);
-
-#ifdef NO_AUTHENTICATION
-       (void) puts("No Authentication required by default.\n");
-#endif
-
-       (void) fputs("Authentication methods:", stdout);
-       for (auth = auth_switch; auth->name; auth++)
-           (void) printf(" '%s'", auth->name);
-       (void) putchar('\n');
-
-       (void) fputs("Logging:\n", stdout);
-#if (LOGGING & SLOG_SYSLOG)
-# ifdef HAVE_SYSLOG_NAMES
-       printf("    syslog: facility '%s', failures to '%s', success to '%s'\n",
-           num_to_name(LOGFAC, facilitynames),
-           num_to_name(PRI_FAILURE, prioritynames),
-           num_to_name(PRI_SUCCESS, prioritynames));
-# else
-       printf("    syslog: facility #%d, failures to #%d, success to #%d\n",
-           LOGFAC, PRI_FAILURE, PRI_SUCCESS);
-# endif /* HAVE_SYSLOG_NAMES */
-#endif /* SLOG_SYSLOG */
-#if (LOGGING & SLOG_FILE)
-       (void) printf("    log file: %s", _PATH_SUDO_LOGFILE);
-# ifdef HOST_IN_LOG
-       (void) fputs(", host in log", stdout);
-# endif
-# ifdef WRAP_LOG
-       (void) printf(", lines wrap after %d characters", MAXLOGFILELEN);
-# endif
-       (void) putchar('\n');
-#endif /* SLOG_FILE */
-
-#ifdef USE_TTY_TICKETS
-       (void) puts("Timestamp type: userdir/tty");
-#else
-       (void) puts("Timestamp type: userdir");
-#endif
-
-#if TIMEOUT
-       (void) printf("Ticket file timeout: %d minutes\n", TIMEOUT);
-#endif
-
-#ifdef USE_INSULTS
-       (void) fputs("Insult types:", stdout);
-# ifdef CLASSIC_INSULTS
-       (void) fputs(" classic", stdout);
-# endif
-# ifdef CSOPS_INSULTS
-       (void) fputs(" CSOps", stdout);
-# endif
-# ifdef HAL_INSULTS
-       (void) fputs(" hal", stdout);
-# endif
-# ifdef GOONS_INSULTS
-       (void) fputs(" goons", stdout);
-# endif
-       (void) putchar('\n');
-# else
-       (void) printf("Incorrect password message: %s\n", INCORRECT_PASSWORD);
-#endif
-
-#ifdef SUDO_UMASK
-       (void) printf("Umask to enforce: 0%o\n", SUDO_UMASK);
-#endif
-
-#if !defined(WITHOUT_PASSWD) && PASSWORD_TIMEOUT
-       (void) printf("Password timeout: %d minutes\n", PASSWORD_TIMEOUT);
-#endif
-
-       (void) printf("Password attempts allowed: %d\n", TRIES_FOR_PASSWORD);
-
-       (void) printf("Default user to run commands as: %s\n", RUNAS_DEFAULT);
-
-#ifdef FQDN
-       (void) puts("Fully qualified hostnames required in sudoers");
-#endif
-
-#ifdef NO_ROOT_SUDO
-       (void) puts("Root may not run sudo");
-#endif
-
-#ifdef EXEMPTGROUP
-       (void) printf("Users in group %s are exempt from password and PATH requirements\n", EXEMPTGROUP);
-#endif
-
-#ifdef ENV_EDITOR
-       (void) printf("Default editor for visudo: %s\n", EDITOR);
-#else
-       (void) printf("Editor for visudo: %s\n", EDITOR);
-#endif
-
-#if defined(IGNORE_DOT_PATH) || defined(DONT_LEAK_PATH_INFO) || defined(SECURE_PATH)
-       puts("$PATH options:");
-#ifdef SECURE_PATH
-       (void) printf("    PATH override: %s\n", SECURE_PATH);
-#endif
-# ifdef IGNORE_DOT_PATH
-       (void) puts("    ignore '.'");
-# endif
-# ifdef DONT_LEAK_PATH_INFO
-       (void) puts("    no information leakage");
-# endif
-#endif
-
-#ifdef _PATH_SENDMAIL
-       (void) printf("Mailer path: %s\n", _PATH_SENDMAIL);
-       (void) printf("Send mail to: %s\n", ALERTMAIL);
-       (void) printf("Mail subject: %s\n", MAILSUBJECT);
-       (void) fputs("Send mail on: 'error'", stdout);
-# ifdef SEND_MAIL_WHEN_NO_USER
-       (void) fputs(" 'unlisted user'", stdout);
-# endif
-# ifdef SEND_MAIL_WHEN_NO_HOST
-       (void) fputs(" 'unlisted on host'", stdout);
-# endif
-# ifdef SEND_MAIL_WHEN_NOT_OK
-       (void) fputs(" 'authentication failure'", stdout);
-# endif
-       (void) putchar('\n');
-#endif
-
-#ifdef SHELL_IF_NO_ARGS
-       puts("When invoked with no arguments sudo will start a shell");
-#endif
-
-#ifdef SHELL_SETS_HOME
-       puts("Sudo will set $HOME to the homedir of the target user");
-#endif
-
-       (void) printf("Default password prompt: %s\n", PASSPROMPT);
-
-       (void) fputs("Lecture user the first time they run sudo? ", stdout);
-#ifndef NO_LECTURE
-       (void) puts("yes");
-#else
-       (void) puts("no");
-#endif
-    }
-}
-
-#if (LOGGING & SLOG_SYSLOG) && defined(HAVE_SYSLOG_NAMES)
-/*
- * Convert a syslog number to a name.  At some point in the
- * future, sudo will have its own tables internally so syslog
- * can be configured at run time.
- */
-static char *
-num_to_name(num, table)
-    int num;
-    CODE *table;
-{
-    CODE *t;
-
-    for (t = table; t->c_name; t++)
-       if (t->c_val == num)
-           return(t->c_name);
-
-    return("unknown");
-}
-#endif /* SLOG_SYSLOG && HAVE_SYSLOG_NAMES */
index 5d0408a7160101e930bdd2fd5a676ce342853283..c8b6641031b192604a07af5a2be8bf3e419f7e85 100644 (file)
--- a/visudo.c
+++ b/visudo.c
@@ -150,7 +150,6 @@ main(argc, argv)
     }
 
     /* Mock up a fake sudo_user struct. */
-    user_runas = RUNAS_DEFAULT;
     user_host = user_shost = user_cmnd = "";
     if ((sudo_user.pw = getpwuid(getuid())) == NULL) {
        (void) fprintf(stderr, "%s: Can't find you in the passwd database.\n",
@@ -273,6 +272,7 @@ main(argc, argv)
            }
 
            /* Clean slate for each parse */
+           init_defaults();
            init_parser();
 
            /* Parse the sudoers file */