Imported Upstream version 1.7.2p2 upstream/1.7.2p2
authorBdale Garbee <bdale@gag.com>
Mon, 7 Dec 2009 15:31:13 +0000 (16:31 +0100)
committerBdale Garbee <bdale@gag.com>
Mon, 7 Dec 2009 15:31:13 +0000 (16:31 +0100)
18 files changed:
ChangeLog
Makefile.in
auth/kerb5.c
auth/pam.c
configure
configure.in
match.c
sudo.c
sudo.cat
sudo.man.in
sudo.man.pl [new file with mode: 0644]
sudo.pod
sudo_edit.c
sudoers.cat
sudoers.man.in
sudoers.man.pl [new file with mode: 0644]
sudoers.pod
toke.l

index f513fa2a4df8cbffd4263b3700ed9e5fe0422638..8a5a0aaf2d526832f3edd9486d74788016efdbde 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,75 @@
+2009-11-23 10:56  millert
+
+       * match.c: cmnd_matches() already deals with negation so
+         _cmndlist_matches() does not need to do so itself.  Fixes a bug
+         with negated entries in a Cmnd_List.
+
+2009-11-22 11:12  millert
+
+       * sudo.c: Don't exit() from open_sudoers, just return NULL for all
+         errors.
+
+2009-11-22 09:54  millert
+
+       * toke.c, toke.l: Add missing extern def for parse_error
+
+2009-11-20 19:11  millert
+
+       * toke.c, toke.l: Avoid a parse error when #includedir doesn't find
+         any files.  Closes bug #375
+
+2009-11-20 19:03  millert
+
+       * Makefile.in: Include sudo.man.pl and sudoers.man.pl in the
+         distribution tarball.
+
+2009-11-04 09:42  millert
+
+       * configure, configure.in: Fix a few typos in the descriptions;
+         from Jeff Makey Only do the check for
+         krb5_get_init_creds_opt_free() taking two arguments if we find
+         krb5_get_init_creds_opt_alloc().  Otherwise we will get a false
+         positive when using our own krb5_get_init_creds_opt_free which
+         takes only a single argument.
+
+2009-11-03 09:58  millert
+
+       * configure, configure.in: Remove a spurious comma in the kerb5
+         bits.
+
+2009-11-03 09:51  millert
+
+       * auth/kerb5.c: Call krb5_get_init_creds_opt_init() in our emulated
+         krb5_get_init_creds_opt_alloc() for MIT kerberos.
+
+2009-09-30 09:50  millert
+
+       * sudo_edit.c: Always update the stashed mtime of the temp file
+         instead of using what we have for the original because the time
+         resolution of the filesystem the temporary is on may not match
+         that of the filesystem that holds the original.  Should fix bz
+         #371 found by Philippe Levan.
+
+2009-09-24 21:11  millert
+
+       * configure, configure.in, sudoers.man.pl, sudoers.pod: Substitute
+         in default value for secure_path
+
+2009-09-24 20:31  millert
+
+       * sudo.pod: Mention that the password must be followed by a newline
+         with the -S option.
+
+2009-08-07 10:21  millert
+
+       * auth/pam.c: Set PAM_RUSER and PAM_RHOST early so they can be used
+         during authentication.  Based on a patch from Jamie Beverly.
+
+2009-08-07 09:25  millert
+
+       * match.c: Close dir before returning if strlcpy() reports
+         overflow.  From Martynas Venckus.
+
 2009-07-18 09:55  millert
 
        * toke.c, toke.l: Fix expansion of %h in #include names.  Fixes
index c7fc8d91ef7c8d5d4051399bdd07d7e517696057..245e77e28a961654128a7ca1e8ac73de050ed948 100644 (file)
@@ -153,7 +153,7 @@ DISTFILES = $(SRCS) $(HDRS) ChangeLog HISTORY INSTALL INSTALL.configure \
            sudo.man.in sudo.pod sudo.psf sudo_usage.h.in sudoers sudoers.cat \
             sudoers.man.in sudoers.pod sudoers.ldap.cat sudoers.ldap.man.in \
            sudoers.ldap.pod sudoers2ldif visudo.cat visudo.man.in visudo.pod \
-           auth/API
+           auth/API sudo.man.pl sudoers.man.pl
 
 BINFILES= ChangeLog HISTORY LICENSE README TROUBLESHOOTING \
          UPGRADE install-sh mkinstalldirs sample.syslog.conf sample.sudoers \
index 5e17685bc06b31ec143c892f05b0209025ccb9db..fd43950d55bd5539f1a1987219953ed8eab650ee 100644 (file)
@@ -54,7 +54,7 @@
 #include "sudo_auth.h"
 
 #ifndef lint
-__unused static const char rcsid[] = "$Sudo: kerb5.c,v 1.36 2008/11/09 14:13:13 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: kerb5.c,v 1.37 2009/11/03 14:51:20 millert Exp $";
 #endif /* lint */
 
 #ifdef HAVE_HEIMDAL
@@ -81,6 +81,7 @@ krb5_get_init_creds_opt_alloc(context, opts)
     krb5_get_init_creds_opt   **opts;
 {
     *opts = emalloc(sizeof(krb5_get_init_creds_opt));
+    krb5_get_init_creds_opt_init(*opts);
     return 0;
 }
 
index 47820ba8a842a516c04f231883d54b02abd43daf..b03a1f75b1272dee331fed2a94a1e97e9a36540a 100644 (file)
@@ -73,7 +73,7 @@
 #endif
 
 #ifndef lint
-__unused static const char rcsid[] = "$Sudo: pam.c,v 1.68 2009/05/25 12:02:42 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: pam.c,v 1.69 2009/08/07 14:21:51 millert Exp $";
 #endif /* lint */
 
 static int sudo_conv __P((int, PAM_CONST struct pam_message **,
@@ -105,6 +105,14 @@ pam_init(pw, promptp, auth)
        log_error(USE_ERRNO|NO_EXIT|NO_MAIL, "unable to initialize PAM");
        return(AUTH_FATAL);
     }
+
+    /*
+     * Set PAM_RUSER to the invoking user (the "from" user).
+     * We set PAM_RHOST to avoid a bug in Solaris 7 and below.
+     */
+    (void) pam_set_item(pamh, PAM_RUSER, user_name);
+    (void) pam_set_item(pamh, PAM_RHOST, user_host);
+
     /*
      * Some versions of pam_lastlog have a bug that
      * will cause a crash if PAM_TTY is not set so if
@@ -203,13 +211,10 @@ pam_prep_user(pw)
        pam_init(pw, NULL, NULL);
 
     /*
-     * Set PAM_USER to the user we are changing *to* and
-     * set PAM_RUSER to the user we are coming *from*.
-     * We set PAM_RHOST to avoid a bug in Solaris 7 and below.
+     * Update PAM_USER to reference the user we are running the command
+     * as, as opposed to the user we authenticated as.
      */
     (void) pam_set_item(pamh, PAM_USER, pw->pw_name);
-    (void) pam_set_item(pamh, PAM_RUSER, user_name);
-    (void) pam_set_item(pamh, PAM_RHOST, user_host);
 
     /*
      * Set credentials (may include resource limits, device ownership, etc).
index 3dccf96595abf45818ed2250c67763472a8dbc82..b9e0fddbd00398f900e6d732f2397e24f2155ff7 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for sudo 1.7.2p1.
+# Generated by GNU Autoconf 2.61 for sudo 1.7.2p2.
 #
 # Report bugs to <http://www.sudo.ws/bugs/>.
 #
@@ -724,8 +724,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='sudo'
 PACKAGE_TARNAME='sudo'
-PACKAGE_VERSION='1.7.2p1'
-PACKAGE_STRING='sudo 1.7.2p1'
+PACKAGE_VERSION='1.7.2p2'
+PACKAGE_STRING='sudo 1.7.2p2'
 PACKAGE_BUGREPORT='http://www.sudo.ws/bugs/'
 
 # Factoring default headers for most tests.
@@ -869,6 +869,7 @@ ldap_conf
 ldap_secret
 nsswitch_conf
 netsvc_conf
+secure_path
 EGREPPROG
 CC
 ac_ct_CC
@@ -1416,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sudo 1.7.2p1 to adapt to many kinds of systems.
+\`configure' configures sudo 1.7.2p2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1481,7 +1482,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of sudo 1.7.2p1:";;
+     short | recursive ) echo "Configuration of sudo 1.7.2p2:";;
    esac
   cat <<\_ACEOF
 
@@ -1683,7 +1684,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sudo configure 1.7.2p1
+sudo configure 1.7.2p2
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1697,7 +1698,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sudo $as_me 1.7.2p1, which was
+It was created by sudo $as_me 1.7.2p2, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2120,6 +2121,7 @@ echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;}
 
 
 
+
 
 
 timeout=5
@@ -2147,6 +2149,7 @@ tty_tickets=off
 insults=off
 root_sudo=on
 path_info=on
+secure_path="not set"
 INSTALL_NOEXEC=
 devdir='$(srcdir)'
 PROGS="sudo visudo"
@@ -3695,12 +3698,14 @@ echo $ECHO_N "checking whether to override the user's path... $ECHO_C" >&6; }
 # Check whether --with-secure-path was given.
 if test "${with_secure_path+set}" = set; then
   withval=$with_secure_path; case $with_secure_path in
-    yes)       cat >>confdefs.h <<_ACEOF
-#define SECURE_PATH "/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc"
+    yes)       with_secure_path="/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc"
+               cat >>confdefs.h <<_ACEOF
+#define SECURE_PATH "$with_secure_path"
 _ACEOF
 
-               { echo "$as_me:$LINENO: result: :/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc" >&5
-echo "${ECHO_T}:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc" >&6; }
+               { echo "$as_me:$LINENO: result: $with_secure_path" >&5
+echo "${ECHO_T}$with_secure_path" >&6; }
+               secure_path="set to $with_secure_path"
                ;;
     no)                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
@@ -3711,6 +3716,7 @@ _ACEOF
 
                { echo "$as_me:$LINENO: result: $with_secure_path" >&5
 echo "${ECHO_T}$with_secure_path" >&6; }
+               secure_path="set to F<$with_secure_path>"
                ;;
 esac
 else
@@ -6262,7 +6268,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6265 "configure"' > conftest.$ac_ext
+  echo '#line 6271 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8126,11 +8132,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8129: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8135: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8133: \$? = $ac_status" >&5
+   echo "$as_me:8139: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8416,11 +8422,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8419: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8425: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8423: \$? = $ac_status" >&5
+   echo "$as_me:8429: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8520,11 +8526,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8523: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8529: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8527: \$? = $ac_status" >&5
+   echo "$as_me:8533: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -10880,7 +10886,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10883 "configure"
+#line 10889 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10980,7 +10986,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10983 "configure"
+#line 10989 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -21523,7 +21529,7 @@ fi
 { echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_main" >&5
 echo "${ECHO_T}$ac_cv_lib_krb5support_main" >&6; }
 if test $ac_cv_lib_krb5support_main = yes; then
-  SUDO_LIBS="${SUDO_LIBS} -lkrb5support,"
+  SUDO_LIBS="${SUDO_LIBS} -lkrb5support"
 fi
 
 
@@ -21535,8 +21541,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     LIBS="${LIBS} ${SUDO_LIBS}"
 
 
-
-for ac_func in krb5_verify_user krb5_init_secure_context krb5_get_init_creds_opt_alloc
+for ac_func in krb5_verify_user krb5_init_secure_context
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -21629,13 +21634,104 @@ _ACEOF
 fi
 done
 
-    { echo "$as_me:$LINENO: checking whether krb5_get_init_creds_opt_free takes a two argument2" >&5
-echo $ECHO_N "checking whether krb5_get_init_creds_opt_free takes a two argument2... $ECHO_C" >&6; }
+
+for ac_func in krb5_get_init_creds_opt_alloc
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+       { echo "$as_me:$LINENO: checking whether krb5_get_init_creds_opt_free takes a context" >&5
+echo $ECHO_N "checking whether krb5_get_init_creds_opt_free takes a context... $ECHO_C" >&6; }
 if test "${sudo_cv_krb5_get_init_creds_opt_free_two_args+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-           cat >conftest.$ac_ext <<_ACEOF
+               cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -21645,11 +21741,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-
-                   krb5_context context = NULL;
-                   krb5_get_init_creds_opt *opts = NULL;
-                   krb5_get_init_creds_opt_free(context, opts);
-
+krb5_get_init_creds_opt_free(NULL, NULL);
   ;
   return 0;
 }
@@ -21686,6 +21778,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { echo "$as_me:$LINENO: result: $sudo_cv_krb5_get_init_creds_opt_free_two_args" >&5
 echo "${ECHO_T}$sudo_cv_krb5_get_init_creds_opt_free_two_args" >&6; }
+
+fi
+done
+
     if test X"$sudo_cv_krb5_get_init_creds_opt_free_two_args" = X"yes"; then
        cat >>confdefs.h <<\_ACEOF
 #define HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_TWO_ARGS 1
@@ -24462,7 +24558,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sudo $as_me 1.7.2p1, which was
+This file was extended by sudo $as_me 1.7.2p2, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -24511,7 +24607,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-sudo config.status 1.7.2p1
+sudo config.status 1.7.2p2
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -24833,6 +24929,7 @@ ldap_conf!$ldap_conf$ac_delim
 ldap_secret!$ldap_secret$ac_delim
 nsswitch_conf!$nsswitch_conf$ac_delim
 netsvc_conf!$netsvc_conf$ac_delim
+secure_path!$secure_path$ac_delim
 EGREPPROG!$EGREPPROG$ac_delim
 CC!$CC$ac_delim
 ac_ct_CC!$ac_ct_CC$ac_delim
@@ -24868,7 +24965,7 @@ KRB5CONFIG!$KRB5CONFIG$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 41; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 42; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index a59f37aa9e40332458ed01c2ed7e4d05f1d223f5..f9a7d31a17f067a3f3abf5c70d515904cfb882bb 100644 (file)
@@ -4,7 +4,7 @@ dnl $Sudo: configure.in,v 1.549 2009/06/13 20:52:50 millert Exp $
 dnl
 dnl Copyright (c) 1994-1996,1998-2009 Todd C. Miller <Todd.Miller@courtesan.com>
 dnl
-AC_INIT([sudo], [1.7.2p1], [http://www.sudo.ws/bugs/], [sudo])
+AC_INIT([sudo], [1.7.2p2], [http://www.sudo.ws/bugs/], [sudo])
 AC_CONFIG_HEADER(config.h pathnames.h)
 dnl
 dnl This won't work before AC_INIT
@@ -85,6 +85,7 @@ AC_SUBST(ldap_conf)
 AC_SUBST(ldap_secret)
 AC_SUBST(nsswitch_conf)
 AC_SUBST(netsvc_conf)
+AC_SUBST(secure_path)
 dnl
 dnl Initial values for above
 dnl
@@ -113,6 +114,7 @@ tty_tickets=off
 insults=off
 root_sudo=on
 path_info=on
+secure_path="not set"
 INSTALL_NOEXEC=
 devdir='$(srcdir)'
 dnl
@@ -988,13 +990,16 @@ fi
 AC_MSG_CHECKING(whether to override the user's path)
 AC_ARG_WITH(secure-path, [AS_HELP_STRING([--with-secure-path], [override the user's path with a built-in one])],
 [case $with_secure_path in
-    yes)       AC_DEFINE_UNQUOTED(SECURE_PATH, "/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc")
-               AC_MSG_RESULT([:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc])
+    yes)       with_secure_path="/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:/usr/etc:/etc"
+               AC_DEFINE_UNQUOTED(SECURE_PATH, "$with_secure_path")
+               AC_MSG_RESULT([$with_secure_path])
+               secure_path="set to $with_secure_path"
                ;;
     no)                AC_MSG_RESULT(no)
                ;;
     *)         AC_DEFINE_UNQUOTED(SECURE_PATH, "$with_secure_path")
                AC_MSG_RESULT([$with_secure_path])
+               secure_path="set to F<$with_secure_path>"
                ;;
 esac], AC_MSG_RESULT(no))
 
@@ -2234,25 +2239,23 @@ if test ${with_kerb5-'no'} != "no" -a -z "$KRB5CONFIG"; then
        ], [
            AC_MSG_RESULT(no)
            SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err"
-           AC_CHECK_LIB(krb5support, main, [SUDO_LIBS="${SUDO_LIBS} -lkrb5support,"])
+           AC_CHECK_LIB(krb5support, main, [SUDO_LIBS="${SUDO_LIBS} -lkrb5support"])
     ])
     AUTH_OBJS="$AUTH_OBJS kerb5.o"
     _LIBS="$LIBS"
     LIBS="${LIBS} ${SUDO_LIBS}"
-    AC_CHECK_FUNCS(krb5_verify_user krb5_init_secure_context krb5_get_init_creds_opt_alloc)
-    AC_CACHE_CHECK(whether krb5_get_init_creds_opt_free takes a two argument2,
-       sudo_cv_krb5_get_init_creds_opt_free_two_args, [
-           AC_TRY_COMPILE([#include <krb5.h>],
-               [
-                   krb5_context context = NULL;
-                   krb5_get_init_creds_opt *opts = NULL;
-                   krb5_get_init_creds_opt_free(context, opts);
-               ],
-               [sudo_cv_krb5_get_init_creds_opt_free_two_args=yes],
-               [sudo_cv_krb5_get_init_creds_opt_free_two_args=no]
-           )
-       ]
-    )
+    AC_CHECK_FUNCS(krb5_verify_user krb5_init_secure_context)
+    AC_CHECK_FUNCS(krb5_get_init_creds_opt_alloc, [
+       AC_CACHE_CHECK([whether krb5_get_init_creds_opt_free takes a context],
+           sudo_cv_krb5_get_init_creds_opt_free_two_args, [
+               AC_TRY_COMPILE([#include <krb5.h>],
+                   [krb5_get_init_creds_opt_free(NULL, NULL);],
+                   [sudo_cv_krb5_get_init_creds_opt_free_two_args=yes],
+                   [sudo_cv_krb5_get_init_creds_opt_free_two_args=no]
+               )
+           ]
+       )
+    ])
     if test X"$sudo_cv_krb5_get_init_creds_opt_free_two_args" = X"yes"; then
        AC_DEFINE(HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_TWO_ARGS)
     fi
@@ -2663,7 +2666,7 @@ AH_TEMPLATE(HAVE_ISSECURE, [Define to 1 if you have the `issecure' function. (Su
 AH_TEMPLATE(HAVE_KERB4, [Define to 1 if you use Kerberos IV.])
 AH_TEMPLATE(HAVE_KERB5, [Define to 1 if you use Kerberos V.])
 AH_TEMPLATE(HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC, [Define to 1 if you have the `krb5_get_init_creds_opt_alloc' function.])
-AH_TEMPLATE(HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_TWO_ARGS, [Define to 1 if your `krb5_get_init_creds_opt_alloc' function takes two arguments.])
+AH_TEMPLATE(HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_TWO_ARGS, [Define to 1 if your `krb5_get_init_creds_opt_free' function takes two arguments.])
 AH_TEMPLATE(HAVE_KRB5_INIT_SECURE_CONTEXT, [Define to 1 if you have the `krb5_init_secure_context' function.])
 AH_TEMPLATE(HAVE_KRB5_VERIFY_USER, [Define to 1 if you have the `krb5_verify_user' function.])
 AH_TEMPLATE(HAVE_LBER_H, [Define to 1 if your LDAP needs <lber.h>. (OpenLDAP does not)])
diff --git a/match.c b/match.c
index fd60fdbd28edb54e0c9641247662d8d3fabe6603..c0f917b25bb52ba54f2960c3043e15041f640660 100644 (file)
--- a/match.c
+++ b/match.c
@@ -94,7 +94,7 @@
 #endif /* USING_NONUNIX_GROUPS */
 
 #ifndef lint
-__unused static const char rcsid[] = "$Sudo: match.c,v 1.46 2009/05/27 00:49:07 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: match.c,v 1.48 2009/11/23 15:56:14 millert Exp $";
 #endif /* lint */
 
 static struct member_list empty;
@@ -318,14 +318,12 @@ _cmndlist_matches(list)
     struct member_list *list;
 {
     struct member *m;
-    int rval, matched = UNSPEC;
+    int matched = UNSPEC;
 
     tq_foreach_rev(list, m) {
-       rval = cmnd_matches(m);
-       if (rval != UNSPEC) {
-           matched = m->negated ? !rval : rval;
+       matched = cmnd_matches(m);
+       if (matched != UNSPEC)
            break;
-       }
     }
     return(matched);
 }
@@ -580,8 +578,10 @@ command_matches_dir(sudoers_dir, dlen)
     if (dirp == NULL)
        return(FALSE);
 
-    if (strlcpy(buf, sudoers_dir, sizeof(buf)) >= sizeof(buf))
+    if (strlcpy(buf, sudoers_dir, sizeof(buf)) >= sizeof(buf)) {
+       closedir(dirp);
        return(FALSE);
+    }
     while ((dent = readdir(dirp)) != NULL) {
        /* ignore paths > PATH_MAX (XXX - log) */
        buf[dlen] = '\0';
diff --git a/sudo.c b/sudo.c
index 66a1121dcf13ce89d4112b95b3977f570a5a16c2..27af77a68c4712e68f9d1d0653ea2578d73d59e6 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -648,7 +648,8 @@ init_vars(sudo_mode, envp)
        }
     }
 
-    if ((p = ttyname(STDIN_FILENO)) || (p = ttyname(STDOUT_FILENO))) {
+    if ((p = ttyname(STDIN_FILENO)) || (p = ttyname(STDOUT_FILENO)) ||
+       (p = ttyname(STDERR_FILENO))) {
        user_tty = user_ttypath = estrdup(p);
        if (strncmp(user_tty, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
            user_tty += sizeof(_PATH_DEV) - 1;
@@ -1139,17 +1140,21 @@ open_sudoers(sudoers, doedit, keepopen)
        log_error(NO_EXIT, "%s is owned by gid %lu, should be %lu", sudoers,
            (unsigned long) statbuf.st_gid, (unsigned long) SUDOERS_GID);
     else if ((fp = fopen(sudoers, "r")) == NULL)
-       log_error(USE_ERRNO, "can't open %s", sudoers);
+       log_error(USE_ERRNO|NO_EXIT, "can't open %s", sudoers);
     else {
        /*
         * Make sure we can actually read sudoers so we can present the
         * user with a reasonable error message (unlike the lexer).
         */
-       if (statbuf.st_size != 0) {
-           if (fgetc(fp) == EOF)
-               log_error(USE_ERRNO, "can't read %s", sudoers);
-           rewind(fp);
+       if (statbuf.st_size != 0 && fgetc(fp) == EOF) {
+           log_error(USE_ERRNO|NO_EXIT, "can't read %s", sudoers);
+           fclose(fp);
+           fp = NULL;
        }
+    }
+
+    if (fp != NULL) {
+       rewind(fp);
        (void) fcntl(fileno(fp), F_SETFD, 1);
     }
 
index 4c9151c30b10c7af00dbdb67b0063ad506428b0a..24e18e3463fa60d7de81825c483eec504c6e27f0 100644 (file)
--- a/sudo.cat
+++ b/sudo.cat
@@ -61,7 +61,7 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
 
 
-1.7.2p1                   June 15, 2009                         1
+1.7.2p2                 November 24, 2009                       1
 
 
 
@@ -127,7 +127,7 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
 
 
 
-1.7.2p1                   June 15, 2009                         2
+1.7.2p2                 November 24, 2009                       2
 
 
 
@@ -193,7 +193,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
 
-1.7.2p1                   June 15, 2009                         3
+1.7.2p2                 November 24, 2009                       3
 
 
 
@@ -259,7 +259,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
 
-1.7.2p1                   June 15, 2009                         4
+1.7.2p2                 November 24, 2009                       4
 
 
 
@@ -291,7 +291,8 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
                    the _\bp_\ba_\bs_\bs_\bp_\br_\bo_\bm_\bp_\bt_\b__\bo_\bv_\be_\br_\br_\bi_\bd_\be flag is disabled in _\bs_\bu_\bd_\bo_\be_\br_\bs.
 
        -S          The -\b-S\bS (_\bs_\bt_\bd_\bi_\bn) option causes s\bsu\bud\bdo\bo to read the password from
-                   the standard input instead of the terminal device.
+                   the standard input instead of the terminal device.  The
+                   password must be followed by a newline character.
 
        -s [command]
                    The -\b-s\bs (_\bs_\bh_\be_\bl_\bl) option runs the shell specified by the _\bS_\bH_\bE_\bL_\bL
@@ -321,11 +322,10 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
        -v          If given the -\b-v\bv (_\bv_\ba_\bl_\bi_\bd_\ba_\bt_\be) option, s\bsu\bud\bdo\bo will update the
                    user's timestamp, prompting for the user's password if
-                   necessary.  This extends the s\bsu\bud\bdo\bo timeout for another 5
 
 
 
-1.7.2p1                   June 15, 2009                         5
+1.7.2p2                 November 24, 2009                       5
 
 
 
@@ -334,6 +334,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
+                   necessary.  This extends the s\bsu\bud\bdo\bo timeout for another 5
                    minutes (or whatever the timeout is set to in _\bs_\bu_\bd_\bo_\be_\br_\bs) but
                    does not run a command.
 
@@ -387,11 +388,10 @@ S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY N\bNO\bOT\bTE\bES\bS
        environment variables that s\bsu\bud\bdo\bo allows or denies is contained in the
        output of sudo -V when run as root.
 
-       Note that the dynamic linker on most operating systems will remove
 
 
 
-1.7.2p1                   June 15, 2009                         6
+1.7.2p2                 November 24, 2009                       6
 
 
 
@@ -400,6 +400,7 @@ S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY N\bNO\bOT\bTE\bES\bS
 SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
+       Note that the dynamic linker on most operating systems will remove
        variables that can control dynamic linking from the environment of
        setuid executables, including s\bsu\bud\bdo\bo.  Depending on the operating system
        this may include _RLD*, DYLD_*, LD_*, LDR_*, LIBPATH, SHLIB_PATH, and
@@ -453,11 +454,10 @@ E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
 
        HOME            In -\b-s\bs or -\b-H\bH mode (or if sudo was configured with the
                        --enable-shell-sets-home option), set to homedir of the
-                       target user
 
 
 
-1.7.2p1                   June 15, 2009                         7
+1.7.2p2                 November 24, 2009                       7
 
 
 
@@ -466,6 +466,8 @@ E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
 SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
+                       target user
+
        PATH            Set to a sane value if the _\bs_\be_\bc_\bu_\br_\be_\b__\bp_\ba_\bt_\bh sudoers option
                        is set.
 
@@ -518,12 +520,10 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
 
        To edit the _\bi_\bn_\bd_\be_\bx_\b._\bh_\bt_\bm_\bl file as user www:
 
-        $ sudo -u www vi ~www/htdocs/index.html
-
 
 
 
-1.7.2p1                   June 15, 2009                         8
+1.7.2p2                 November 24, 2009                       8
 
 
 
@@ -532,6 +532,8 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
 SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
+        $ sudo -u www vi ~www/htdocs/index.html
+
        To view system logs only accessible to root and users in the adm group:
 
         $ sudo -g adm view /var/log/syslog
@@ -584,12 +586,10 @@ C\bCA\bAV\bVE\bEA\bAT\bTS\bS
 
        Running shell scripts via s\bsu\bud\bdo\bo can expose the same kernel bugs that
        make setuid shell scripts unsafe on some operating systems (if your OS
-       has a /dev/fd/ directory, setuid shell scripts are generally safe).
-
 
 
 
-1.7.2p1                   June 15, 2009                         9
+1.7.2p2                 November 24, 2009                       9
 
 
 
@@ -598,6 +598,8 @@ C\bCA\bAV\bVE\bEA\bAT\bTS\bS
 SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
+       has a /dev/fd/ directory, setuid shell scripts are generally safe).
+
 B\bBU\bUG\bGS\bS
        If you feel you have found a bug in s\bsu\bud\bdo\bo, please submit a bug report at
        http://www.sudo.ws/sudo/bugs/
@@ -653,8 +655,6 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
 
 
 
-
-
-1.7.2p1                   June 15, 2009                        10
+1.7.2p2                 November 24, 2009                      10
 
 
index 1188947ce9fd391819f8c3927f3e798a73765daa..dc40aa83c1e1970cdb39c58494546caf245c784d 100644 (file)
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\" 
-.\" $Sudo: sudo.man.in,v 1.56 2009/06/29 13:36:42 millert Exp $
-.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
+.\" $Sudo: sudo.pod,v 1.125 2009/09/25 00:31:35 millert Exp $
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
@@ -74,7 +66,7 @@
 .el       .ds Aq '
 .\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
 .ie \nF \{\
 .\" ========================================================================
 .\"
 .IX Title "SUDO @mansectsu@"
-.TH SUDO @mansectsu@ "June 15, 2009" "1.7.2p1" "MAINTENANCE COMMANDS"
+.TH SUDO @mansectsu@ "November 24, 2009" "1.7.2p2" "MAINTENANCE COMMANDS"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -442,7 +434,8 @@ password prompt on systems that support \s-1PAM\s0 unless the
 .IP "\-S" 12
 .IX Item "-S"
 The \fB\-S\fR (\fIstdin\fR) option causes \fBsudo\fR to read the password from
-the standard input instead of the terminal device.
+the standard input instead of the terminal device.  The password must
+be followed by a newline character.
 .IP "\-s [command]" 12
 .IX Item "-s [command]"
 The \fB\-s\fR (\fIshell\fR) option runs the shell specified by the \fI\s-1SHELL\s0\fR
diff --git a/sudo.man.pl b/sudo.man.pl
new file mode 100644 (file)
index 0000000..4d23fbd
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/perl -p
+
+BEGIN {
+    %tags = ( 'a', '@BAMAN@', 'c', '@LCMAN@', 'r', '@SEMAN@', 't', '@SEMAN@');
+    $t = undef;
+}
+if (/^\.IP(.*-([acrt]))?/) {
+    $t = $1 ? $tags{$2} : undef;
+} elsif (/-a.*auth_type/) {
+    $_ = $tags{'a'} . $_;
+} elsif (/(-c.*class.*\||login_cap)/) {
+    $_ = $tags{'c'} . $_;
+} elsif (/-r.*role.*-t.*type/) {
+    $_ = $tags{'r'} . $_;
+}
+
+# Fix up broken pod2man formatting of F<@foo@/bar>
+s/\\fI\\f(\(C)?I\@([^\@]*)\\fI\@/\\fI\@$2\@/g;
+
+# comment out Compile-time-specific lines in DESCRIPTION
+if ($t) {
+    $_ = $t . $_;
+}
index c8b370d2e7b0a2ba8213a97f19072e0c2972b467..390499258ff5e06de474d7a9877e2c898896dbf5 100644 (file)
--- a/sudo.pod
+++ b/sudo.pod
@@ -18,7 +18,7 @@ Sponsored in part by the Defense Advanced Research Projects
 Agency (DARPA) and Air Force Research Laboratory, Air Force
 Materiel Command, USAF, under agreement number F39502-99-1-0512.
 
-$Sudo: sudo.pod,v 1.124 2009/06/15 21:19:47 millert Exp $
+$Sudo: sudo.pod,v 1.125 2009/09/25 00:31:35 millert Exp $
 =pod
 
 =head1 NAME
@@ -337,7 +337,8 @@ have the role specified by I<role>.
 =item -S
 
 The B<-S> (I<stdin>) option causes B<sudo> to read the password from
-the standard input instead of the terminal device.
+the standard input instead of the terminal device.  The password must
+be followed by a newline character.
 
 =item -s [command]
 
index fba5a1b945cf4eb87ea0ca75e38bfa72edf477f8..d6a4da66a8a3770670a162d11388a2dea63493e4 100644 (file)
@@ -56,7 +56,7 @@
 #include "sudo.h"
 
 #ifndef lint
-__unused static const char rcsid[] = "$Sudo: sudo_edit.c,v 1.37 2008/11/09 14:13:12 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: sudo_edit.c,v 1.39 2009/09/30 13:50:58 millert Exp $";
 #endif /* lint */
 
 extern sigaction_t saved_sa_int, saved_sa_quit, saved_sa_tstp;
@@ -171,21 +171,23 @@ sudo_edit(argc, argv, envp)
            }
            close(ofd);
        }
-#ifdef HAVE_FSTAT
        /*
-        * If we are unable to set the mtime on the temp file to the value
-        * of the original file just make the stashed mtime match the temp
-        * file's mtime.  It is better than nothing and we only use the info
+        * We always update the stashed mtime because the time
+        * resolution of the filesystem the temporary file is on may
+        * not match that of the filesystem where the file to be edited
+        * resides.  It is OK if touch() fails since we only use the info
         * to determine whether or not a file has been modified.
         */
-       if (touch(tfd, NULL, &tf[i].omtim) == -1) {
-           if (fstat(tfd, &sb) == 0) {
-               tf[i].omtim.tv_sec = mtim_getsec(sb);
-               tf[i].omtim.tv_nsec = mtim_getnsec(sb);
-           }
-           /* XXX - else error? */
-       }
+       (void) touch(tfd, NULL, &tf[i].omtim);
+#ifdef HAVE_FSTAT
+       error = fstat(tfd, &sb);
+#else
+       error = stat(tf[i].tfile, &sb);
 #endif
+       if (!error) {
+           tf[i].omtim.tv_sec = mtim_getsec(sb);
+           tf[i].omtim.tv_nsec = mtim_getnsec(sb);
+       }
        close(tfd);
     }
     if (argc == 1)
@@ -233,7 +235,7 @@ sudo_edit(argc, argv, envp)
        (void) sigaction(SIGINT, &saved_sa_int, NULL);
        (void) sigaction(SIGQUIT, &saved_sa_quit, NULL);
        set_perms(PERM_FULL_USER);
-       closefrom(def_closefrom + 1);
+       closefrom(def_closefrom);
        execvp(nargv[0], nargv);
        warning("unable to execute %s", nargv[0]);
        _exit(127);
index 324b278744ddb3017d9efeb46d3348c45c017b6a..5889d22aebf130776158500d4712b8e5614ebec4 100644 (file)
@@ -20,8 +20,7 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        Form (EBNF).  Don't despair if you don't know what EBNF is; it is
        fairly simple, and the definitions below are annotated.
 
-       Q\bQu\bui\bic\bck\bk g\bgu\bui\bid\bde\be t\bto\bo E\bEB\bBN\bNF\bF
-
+   Q\bQu\bui\bic\bck\bk g\bgu\bui\bid\bde\be t\bto\bo E\bEB\bBN\bNF\bF
        EBNF is a concise and exact way of describing the grammar of a
        language.  Each EBNF definition is made up of _\bp_\br_\bo_\bd_\bu_\bc_\bt_\bi_\bo_\bn _\br_\bu_\bl_\be_\bs.  E.g.,
 
@@ -45,8 +44,7 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        will use single quotes ('') to designate what is a verbatim character
        string (as opposed to a symbol name).
 
-       A\bAl\bli\bia\bas\bse\bes\bs
-
+   A\bAl\bli\bia\bas\bse\bes\bs
        There are four kinds of aliases: User_Alias, Runas_Alias, Host_Alias
        and Cmnd_Alias.
 
@@ -59,19 +57,19 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
         Runas_Alias ::= NAME '=' Runas_List
 
+        Host_Alias ::= NAME '=' Host_List
 
 
-1.7.2p1                   June 30, 2009                         1
 
+1.7.2p2                 November 24, 2009                       1
 
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-        Host_Alias ::= NAME '=' Host_List
 
         Cmnd_Alias ::= NAME '=' Cmnd_List
 
@@ -124,10 +122,12 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        Note that quotes around group names are optional.  Unquoted strings
        must use a backslash (\) to escape spaces and the '@' symbol.
 
+        Runas_List ::= Runas_Member |
+                       Runas_Member ',' Runas_List
 
 
 
-1.7.2p1                   June 30, 2009                         2
+1.7.2p2                 November 24, 2009                       2
 
 
 
@@ -136,8 +136,6 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-        Runas_List ::= Runas_Member |
-                       Runas_Member ',' Runas_List
 
         Runas_Member ::= '!'* username |
                          '!'* '#'uid |
@@ -190,10 +188,12 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        other aliases.  A commandname is a fully qualified filename which may
        include shell-style wildcards (see the Wildcards section below).  A
        simple filename allows the user to run the command with any arguments
+       he/she wishes.  However, you may also specify command line arguments
+       (including wildcards).  Alternately, you can specify "" to indicate
 
 
 
-1.7.2p1                   June 30, 2009                         3
+1.7.2p2                 November 24, 2009                       3
 
 
 
@@ -202,8 +202,6 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-       he/she wishes.  However, you may also specify command line arguments
-       (including wildcards).  Alternately, you can specify "" to indicate
        that the command may only be run w\bwi\bit\bth\bho\bou\but\bt command line arguments.  A
        directory is a fully qualified pathname ending in a '/'.  When you
        specify a directory in a Cmnd_List, the user will be able to run any
@@ -217,8 +215,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        to permit a user to run s\bsu\bud\bdo\bo with the -\b-e\be option (or as s\bsu\bud\bdo\boe\bed\bdi\bit\bt).  It
        may take command line arguments just as a normal command does.
 
-       D\bDe\bef\bfa\bau\bul\blt\bts\bs
-
+   D\bDe\bef\bfa\bau\bul\blt\bts\bs
        Certain configuration options may be changed from their default values
        at runtime via one or more Default_Entry lines.  These may affect all
        users on any host, all users on a specific host, a specific user, a
@@ -256,24 +253,22 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        not exist in a list.
 
        Defaults entries are parsed in the following order: generic, host and
+       user Defaults first, then runas Defaults and finally command defaults.
 
+       See "SUDOERS OPTIONS" for a list of supported Defaults parameters.
 
 
-1.7.2p1                   June 30, 2009                         4
 
+1.7.2p2                 November 24, 2009                       4
 
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-       user Defaults first, then runas Defaults and finally command defaults.
-
-       See "SUDOERS OPTIONS" for a list of supported Defaults parameters.
-
-       U\bUs\bse\ber\br S\bSp\bpe\bec\bci\bif\bfi\bic\bca\bat\bti\bio\bon\bn
 
+   U\bUs\bse\ber\br S\bSp\bpe\bec\bci\bif\bfi\bic\bca\bat\bti\bio\bon\bn
         User_Spec ::= User_List Host_List '=' Cmnd_Spec_List \
                       (':' Host_List '=' Cmnd_Spec_List)*
 
@@ -294,8 +289,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        The basic structure of a user specification is `who = where (as_whom)
        what'.  Let's break that down into its constituent parts:
 
-       R\bRu\bun\bna\bas\bs_\b_S\bSp\bpe\bec\bc
-
+   R\bRu\bun\bna\bas\bs_\b_S\bSp\bpe\bec\bc
        A Runas_Spec determines the user and/or the group that a command may be
        run as.  A fully-specified Runas_Spec consists of two Runas_Lists (as
        defined above) separated by a colon (':') and enclosed in a set of
@@ -323,21 +317,22 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        It is also possible to override a Runas_Spec later on in an entry.  If
        we modify the entry like so:
 
+        dgb    boulder = (operator) /bin/ls, (root) /bin/kill, /usr/bin/lprm
 
+       Then user d\bdg\bgb\bb is now allowed to run _\b/_\bb_\bi_\bn_\b/_\bl_\bs as o\bop\bpe\ber\bra\bat\bto\bor\br, but  _\b/_\bb_\bi_\bn_\b/_\bk_\bi_\bl_\bl
+       and _\b/_\bu_\bs_\br_\b/_\bb_\bi_\bn_\b/_\bl_\bp_\br_\bm as r\bro\boo\bot\bt.
 
-1.7.2p1                   June 30, 2009                         5
 
 
 
+1.7.2p2                 November 24, 2009                       5
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-        dgb    boulder = (operator) /bin/ls, (root) /bin/kill, /usr/bin/lprm
 
-       Then user d\bdg\bgb\bb is now allowed to run _\b/_\bb_\bi_\bn_\b/_\bl_\bs as o\bop\bpe\ber\bra\bat\bto\bor\br, but  _\b/_\bb_\bi_\bn_\b/_\bk_\bi_\bl_\bl
-       and _\b/_\bu_\bs_\br_\b/_\bb_\bi_\bn_\b/_\bl_\bp_\br_\bm as r\bro\boo\bot\bt.
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
+
 
        We can extend this to allow d\bdg\bgb\bb to run /bin/ls with either the user or
        group set to o\bop\bpe\ber\bra\bat\bto\bor\br:
@@ -352,8 +347,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
         tcm    boulder = (:dialer) /usr/bin/tip, /usr/bin/cu, \
                /usr/local/bin/minicom
 
-       T\bTa\bag\bg_\b_S\bSp\bpe\bec\bc
-
+   T\bTa\bag\bg_\b_S\bSp\bpe\bec\bc
        A command may have zero or more tags associated with it.  There are
        eight possible tag values, NOPASSWD, PASSWD, NOEXEC, EXEC, SETENV and
        NOSETENV.  Once a tag is set on a Cmnd, subsequent Cmnds in the
@@ -389,22 +383,23 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
        _\bN_\bO_\bE_\bX_\bE_\bC _\ba_\bn_\bd _\bE_\bX_\bE_\bC
 
+       If s\bsu\bud\bdo\bo has been compiled with _\bn_\bo_\be_\bx_\be_\bc support and the underlying
+       operating system supports it, the NOEXEC tag can be used to prevent a
+       dynamically-linked executable from running further commands itself.
 
+       In the following example, user a\baa\bar\bro\bon\bn may run _\b/_\bu_\bs_\br_\b/_\bb_\bi_\bn_\b/_\bm_\bo_\br_\be and
 
-1.7.2p1                   June 30, 2009                         6
 
 
+1.7.2p2                 November 24, 2009                       6
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-       If s\bsu\bud\bdo\bo has been compiled with _\bn_\bo_\be_\bx_\be_\bc support and the underlying
-       operating system supports it, the NOEXEC tag can be used to prevent a
-       dynamically-linked executable from running further commands itself.
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
+
 
-       In the following example, user a\baa\bar\bro\bon\bn may run _\b/_\bu_\bs_\br_\b/_\bb_\bi_\bn_\b/_\bm_\bo_\br_\be and
        _\b/_\bu_\bs_\br_\b/_\bb_\bi_\bn_\b/_\bv_\bi but shell escapes will be disabled.
 
         aaron  shanty = NOEXEC: /usr/bin/more, /usr/bin/vi
@@ -422,8 +417,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        If the command matched is A\bAL\bLL\bL, the SETENV tag is implied for that
        command; this default may be overridden by use of the UNSETENV tag.
 
-       W\bWi\bil\bld\bdc\bca\bar\brd\bds\bs
-
+   W\bWi\bil\bld\bdc\bca\bar\brd\bds\bs
        s\bsu\bud\bdo\bo allows shell-style _\bw_\bi_\bl_\bd_\bc_\ba_\br_\bd_\bs (aka meta or glob characters) to be
        used in hostnames, pathnames and command line arguments in the _\bs_\bu_\bd_\bo_\be_\br_\bs
        file.  Wildcard matching is done via the P\bPO\bOS\bSI\bIX\bX _\bg_\bl_\bo_\bb(3) and _\bf_\bn_\bm_\ba_\bt_\bc_\bh(3)
@@ -454,30 +448,28 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
            /usr/bin/*
 
+       match _\b/_\bu_\bs_\br_\b/_\bb_\bi_\bn_\b/_\bw_\bh_\bo but not _\b/_\bu_\bs_\br_\b/_\bb_\bi_\bn_\b/_\bX_\b1_\b1_\b/_\bx_\bt_\be_\br_\bm.
 
+   E\bEx\bxc\bce\bep\bpt\bti\bio\bon\bns\bs t\bto\bo w\bwi\bil\bld\bdc\bca\bar\brd\bd r\bru\bul\ble\bes\bs
+       The following exceptions apply to the above rules:
 
-
-1.7.2p1                   June 30, 2009                         7
+       ""      If the empty string "" is the only command line argument in the
 
 
 
+1.7.2p2                 November 24, 2009                       7
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-       match _\b/_\bu_\bs_\br_\b/_\bb_\bi_\bn_\b/_\bw_\bh_\bo but not _\b/_\bu_\bs_\br_\b/_\bb_\bi_\bn_\b/_\bX_\b1_\b1_\b/_\bx_\bt_\be_\br_\bm.
 
-       E\bEx\bxc\bce\bep\bpt\bti\bio\bon\bns\bs t\bto\bo w\bwi\bil\bld\bdc\bca\bar\brd\bd r\bru\bul\ble\bes\bs
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-       The following exceptions apply to the above rules:
 
-       ""      If the empty string "" is the only command line argument in the
                _\bs_\bu_\bd_\bo_\be_\br_\bs entry it means that command is not allowed to be run
                with a\ban\bny\by arguments.
 
-       I\bIn\bnc\bcl\blu\bud\bdi\bin\bng\bg o\bot\bth\bhe\ber\br f\bfi\bil\ble\bes\bs f\bfr\bro\bom\bm w\bwi\bit\bth\bhi\bin\bn s\bsu\bud\bdo\boe\ber\brs\bs
-
+   I\bIn\bnc\bcl\blu\bud\bdi\bin\bng\bg o\bot\bth\bhe\ber\br f\bfi\bil\ble\bes\bs f\bfr\bro\bom\bm w\bwi\bit\bth\bhi\bin\bn s\bsu\bud\bdo\boe\ber\brs\bs
        It is possible to include other _\bs_\bu_\bd_\bo_\be_\br_\bs files from within the _\bs_\bu_\bd_\bo_\be_\br_\bs
        file currently being parsed using the #include and #includedir
        directives.
@@ -520,27 +512,26 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        in the file names can be used to avoid such problems.
 
        Note that unlike files included via #include, v\bvi\bis\bsu\bud\bdo\bo will not edit the
+       files in a #includedir directory unless one of them contains a syntax
+       error.  It is still possible to run v\bvi\bis\bsu\bud\bdo\bo with the -f flag to edit the
+       files directly.
 
+   O\bOt\bth\bhe\ber\br s\bsp\bpe\bec\bci\bia\bal\bl c\bch\bha\bar\bra\bac\bct\bte\ber\brs\bs a\ban\bnd\bd r\bre\bes\bse\ber\brv\bve\bed\bd w\bwo\bor\brd\bds\bs
+       The pound sign ('#') is used to indicate a comment (unless it is part
+       of a #include directive or unless it occurs in the context of a user
+       name and is followed by one or more digits, in which case it is treated
 
 
-1.7.2p1                   June 30, 2009                         8
-
 
+1.7.2p2                 November 24, 2009                       8
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-       files in a #includedir directory unless one of them contains a syntax
-       error.  It is still possible to run v\bvi\bis\bsu\bud\bdo\bo with the -f flag to edit the
-       files directly.
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-       O\bOt\bth\bhe\ber\br s\bsp\bpe\bec\bci\bia\bal\bl c\bch\bha\bar\bra\bac\bct\bte\ber\brs\bs a\ban\bnd\bd r\bre\bes\bse\ber\brv\bve\bed\bd w\bwo\bor\brd\bds\bs
 
-       The pound sign ('#') is used to indicate a comment (unless it is part
-       of a #include directive or unless it occurs in the context of a user
-       name and is followed by one or more digits, in which case it is treated
        as a uid).  Both the comment character and any text after it, up to the
        end of the line, are ignored.
 
@@ -587,25 +578,26 @@ S\bSU\bUD\bDO\bOE\bER\bRS\bS O\bOP\bPT\bTI\bIO\bON\bNS\bS
                        the PASSWD and NOPASSWD tags.  This flag is _\bo_\bn by
                        default.
 
+       closefrom_override
+                       If set, the user may use s\bsu\bud\bdo\bo's -\b-C\bC option which
+                       overrides the default starting point at which s\bsu\bud\bdo\bo
+                       begins closing open file descriptors.  This flag is _\bo_\bf_\bf
+                       by default.
+
+       env_editor      If set, v\bvi\bis\bsu\bud\bdo\bo will use the value of the EDITOR or
+                       VISUAL environment variables before falling back on the
 
 
-1.7.2p1                   June 30, 2009                         9
 
+1.7.2p2                 November 24, 2009                       9
 
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-       closefrom_override
-                       If set, the user may use s\bsu\bud\bdo\bo's -\b-C\bC option which
-                       overrides the default starting point at which s\bsu\bud\bdo\bo
-                       begins closing open file descriptors.  This flag is _\bo_\bf_\bf
-                       by default.
 
-       env_editor      If set, v\bvi\bis\bsu\bud\bdo\bo will use the value of the EDITOR or
-                       VISUAL environment variables before falling back on the
                        default editor list.  Note that this may create a
                        security hole as it allows the user to run any
                        arbitrary command as root without logging.  A safer
@@ -652,25 +644,25 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        operators who would attempt to add roles to
                        _\b/_\be_\bt_\bc_\b/_\bs_\bu_\bd_\bo_\be_\br_\bs.  When this option is present,
                        _\b/_\be_\bt_\bc_\b/_\bs_\bu_\bd_\bo_\be_\br_\bs does not even need to exist. Since this
+                       option tells s\bsu\bud\bdo\bo how to behave when no specific LDAP
+                       entries have been matched, this sudoOption is only
+                       meaningful for the cn=defaults section.  This flag is
+                       _\bo_\bf_\bf by default.
 
+       insults         If set, s\bsu\bud\bdo\bo will insult users when they enter an
+                       incorrect password.  This flag is _\bo_\bf_\bf by default.
 
 
-1.7.2p1                   June 30, 2009                        10
 
 
+1.7.2p2                 November 24, 2009                      10
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-                       option tells s\bsu\bud\bdo\bo how to behave when no specific LDAP
-                       entries have been matched, this sudoOption is only
-                       meaningful for the cn=defaults section.  This flag is
-                       _\bo_\bf_\bf by default.
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-       insults         If set, s\bsu\bud\bdo\bo will insult users when they enter an
-                       incorrect password.  This flag is _\bo_\bf_\bf by default.
 
        log_host        If set, the hostname will be logged in the (non-syslog)
                        s\bsu\bud\bdo\bo log file.  This flag is _\bo_\bf_\bf by default.
@@ -718,10 +710,18 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        sites may wish to disable this as it could be used to
                        gather information on the location of executables that
                        the normal user does not have access to.  The
+                       disadvantage is that if the executable is simply not in
+                       the user's PATH, s\bsu\bud\bdo\bo will tell the user that they are
+                       not allowed to run it, which can be confusing.  This
+                       flag is _\bo_\bn by default.
+
+       passprompt_override
+                       The password prompt specified by _\bp_\ba_\bs_\bs_\bp_\br_\bo_\bm_\bp_\bt will
+                       normally only be used if the passwod prompt provided by
 
 
 
-1.7.2p1                   June 30, 2009                        11
+1.7.2p2                 November 24, 2009                      11
 
 
 
@@ -730,14 +730,6 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-                       disadvantage is that if the executable is simply not in
-                       the user's PATH, s\bsu\bud\bdo\bo will tell the user that they are
-                       not allowed to run it, which can be confusing.  This
-                       flag is _\bo_\bn by default.
-
-       passprompt_override
-                       The password prompt specified by _\bp_\ba_\bs_\bs_\bp_\br_\bo_\bm_\bp_\bt will
-                       normally only be used if the passwod prompt provided by
                        systems such as PAM matches the string "Password:".  If
                        _\bp_\ba_\bs_\bs_\bp_\br_\bo_\bm_\bp_\bt_\b__\bo_\bv_\be_\br_\br_\bi_\bd_\be is set, _\bp_\ba_\bs_\bs_\bp_\br_\bo_\bm_\bp_\bt will always be
                        used.  This flag is _\bo_\bf_\bf by default.
@@ -784,26 +776,26 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        flag is _\bo_\bf_\bf by default.
 
        set_home        If set and s\bsu\bud\bdo\bo is invoked with the -\b-s\bs option the HOME
+                       environment variable will be set to the home directory
+                       of the target user (which is root unless the -\b-u\bu option
+                       is used).  This effectively makes the -\b-s\bs option imply
+                       -\b-H\bH.  This flag is _\bo_\bf_\bf by default.
 
+       set_logname     Normally, s\bsu\bud\bdo\bo will set the LOGNAME, USER and USERNAME
+                       environment variables to the name of the target user
+                       (usually root unless the -\b-u\bu option is given).  However,
 
 
-1.7.2p1                   June 30, 2009                        12
 
+1.7.2p2                 November 24, 2009                      12
 
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-                       environment variable will be set to the home directory
-                       of the target user (which is root unless the -\b-u\bu option
-                       is used).  This effectively makes the -\b-s\bs option imply
-                       -\b-H\bH.  This flag is _\bo_\bf_\bf by default.
 
-       set_logname     Normally, s\bsu\bud\bdo\bo will set the LOGNAME, USER and USERNAME
-                       environment variables to the name of the target user
-                       (usually root unless the -\b-u\bu option is given).  However,
                        since some programs (including the RCS revision control
                        system) use LOGNAME to determine the real identity of
                        the user, it may be desirable to change this behavior.
@@ -850,10 +842,18 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        with either the _\bs_\be_\bt_\br_\be_\bu_\bi_\bd_\b(_\b) or _\bs_\be_\bt_\br_\be_\bs_\bu_\bi_\bd_\b(_\b) function.
                        This flag is _\bo_\bf_\bf by default.
 
+       targetpw        If set, s\bsu\bud\bdo\bo will prompt for the password of the user
+                       specified by the -\b-u\bu option (defaults to root) instead
+                       of the password of the invoking user.  Note that this
+                       precludes the use of a uid not listed in the passwd
+                       database as an argument to the -\b-u\bu option.  This flag is
+                       _\bo_\bf_\bf by default.
+
+       tty_tickets     If set, users must authenticate on a per-tty basis.
 
 
 
-1.7.2p1                   June 30, 2009                        13
+1.7.2p2                 November 24, 2009                      13
 
 
 
@@ -862,14 +862,6 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-       targetpw        If set, s\bsu\bud\bdo\bo will prompt for the password of the user
-                       specified by the -\b-u\bu option (defaults to root) instead
-                       of the password of the invoking user.  Note that this
-                       precludes the use of a uid not listed in the passwd
-                       database as an argument to the -\b-u\bu option.  This flag is
-                       _\bo_\bf_\bf by default.
-
-       tty_tickets     If set, users must authenticate on a per-tty basis.
                        Normally, s\bsu\bud\bdo\bo uses a directory in the ticket dir with
                        the same name as the user running it.  With this flag
                        enabled, s\bsu\bud\bdo\bo will use a file named for the tty the
@@ -916,26 +908,26 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        value is used to decide when to wrap lines for nicer
                        log files.  This has no effect on the syslog log file,
                        only the file log.  The default is 80 (use 0 or negate
+                       the option to disable word wrap).
 
+       passwd_timeout  Number of minutes before the s\bsu\bud\bdo\bo password prompt times
+                       out.  The default is 5; set this to 0 for no password
+                       timeout.
 
+       timestamp_timeout
+                       Number of minutes that can elapse before s\bsu\bud\bdo\bo will ask
 
-1.7.2p1                   June 30, 2009                        14
 
 
+1.7.2p2                 November 24, 2009                      14
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-                       the option to disable word wrap).
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-       passwd_timeout  Number of minutes before the s\bsu\bud\bdo\bo password prompt times
-                       out.  The default is 5; set this to 0 for no password
-                       timeout.
 
-       timestamp_timeout
-                       Number of minutes that can elapse before s\bsu\bud\bdo\bo will ask
                        for a passwd again.  The default is 5.  Set this to 0
                        to always prompt for a password.  If set to a value
                        less than 0 the user's timestamp will never expire.
@@ -982,26 +974,26 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        escapes are supported:
 
                        %H  expanded to the local hostname including the domain
+                           name (on if the machine's hostname is fully
+                           qualified or the _\bf_\bq_\bd_\bn option is set)
 
+                       %h  expanded to the local hostname without the domain
+                           name
 
+                       %p  expanded to the user whose password is being asked
+                           for (respects the _\br_\bo_\bo_\bt_\bp_\bw, _\bt_\ba_\br_\bg_\be_\bt_\bp_\bw and _\br_\bu_\bn_\ba_\bs_\bp_\bw
 
-1.7.2p1                   June 30, 2009                        15
 
 
+1.7.2p2                 November 24, 2009                      15
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-                           name (on if the machine's hostname is fully
-                           qualified or the _\bf_\bq_\bd_\bn option is set)
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-                       %h  expanded to the local hostname without the domain
-                           name
 
-                       %p  expanded to the user whose password is being asked
-                           for (respects the _\br_\bo_\bo_\bt_\bp_\bw, _\bt_\ba_\br_\bg_\be_\bt_\bp_\bw and _\br_\bu_\bn_\ba_\bs_\bp_\bw
                            flags in _\bs_\bu_\bd_\bo_\be_\br_\bs)
 
                        %U  expanded to the login name of the user the command
@@ -1048,24 +1040,25 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                    variable.
 
        env_file    The _\be_\bn_\bv_\b__\bf_\bi_\bl_\be options specifies the fully qualified path to
+                   a file containing variables to be set in the environment of
+                   the program being run.  Entries in this file should either
+                   be of the form VARIABLE=value or export VARIABLE=value.
+                   The value may optionally be surrounded by single or double
+                   quotes.  Variables in this file are subject to other s\bsu\bud\bdo\bo
+                   environment settings such as _\be_\bn_\bv_\b__\bk_\be_\be_\bp and _\be_\bn_\bv_\b__\bc_\bh_\be_\bc_\bk.
 
 
 
-1.7.2p1                   June 30, 2009                        16
 
 
+1.7.2p2                 November 24, 2009                      16
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-                   a file containing variables to be set in the environment of
-                   the program being run.  Entries in this file should either
-                   be of the form VARIABLE=value or export VARIABLE=value.
-                   The value may optionally be surrounded by single or double
-                   quotes.  Variables in this file are subject to other s\bsu\bud\bdo\bo
-                   environment settings such as _\be_\bn_\bv_\b__\bk_\be_\be_\bp and _\be_\bn_\bv_\b__\bc_\bh_\be_\bc_\bk.
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
+
 
        exempt_group
                    Users in this group are exempt from password and PATH
@@ -1114,24 +1107,24 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
        logfile     Path to the s\bsu\bud\bdo\bo log file (not the syslog log file).
                    Setting a path turns on logging to a file; negating this
+                   option turns it off.  By default, s\bsu\bud\bdo\bo logs via syslog.
 
+       mailerflags Flags to use when invoking mailer. Defaults to -\b-t\bt.
 
+       mailerpath  Path to mail program used to send warning mail.  Defaults
+                   to the path to sendmail found at configure time.
 
-1.7.2p1                   June 30, 2009                        17
 
 
 
+1.7.2p2                 November 24, 2009                      17
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-                   option turns it off.  By default, s\bsu\bud\bdo\bo logs via syslog.
 
-       mailerflags Flags to use when invoking mailer. Defaults to -\b-t\bt.
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-       mailerpath  Path to mail program used to send warning mail.  Defaults
-                   to the path to sendmail found at configure time.
 
        mailfrom    Address to use for the "from" address when sending warning
                    and error mail.  The address should be enclosed in double
@@ -1148,7 +1141,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                    is if you want to have the "root path" be separate from the
                    "user path."  Users in the group specified by the
                    _\be_\bx_\be_\bm_\bp_\bt_\b__\bg_\br_\bo_\bu_\bp option are not affected by _\bs_\be_\bc_\bu_\br_\be_\b__\bp_\ba_\bt_\bh.  This
-                   is not set by default.
+                   option is not set by default.
 
        syslog      Syslog facility if syslog is being used for logging (negate
                    to disable syslog logging).  Defaults to local2.
@@ -1180,10 +1173,17 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        env_check       Environment variables to be removed from the user's
                        environment if the variable's value contains % or /
                        characters.  This can be used to guard against printf-
+                       style format vulnerabilities in poorly-written
+                       programs.  The argument may be a double-quoted, space-
+                       separated list or a single value without double-quotes.
+                       The list can be replaced, added to, deleted from, or
+                       disabled by using the =, +=, -=, and ! operators
+                       respectively.  Regardless of whether the env_reset
+                       option is enabled or disabled, variables specified by
 
 
 
-1.7.2p1                   June 30, 2009                        18
+1.7.2p2                 November 24, 2009                      18
 
 
 
@@ -1192,13 +1192,6 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-                       style format vulnerabilities in poorly-written
-                       programs.  The argument may be a double-quoted, space-
-                       separated list or a single value without double-quotes.
-                       The list can be replaced, added to, deleted from, or
-                       disabled by using the =, +=, -=, and ! operators
-                       respectively.  Regardless of whether the env_reset
-                       option is enabled or disabled, variables specified by
                        env_check will be preserved in the environment if they
                        pass the aforementioned check.  The default list of
                        environment variables to check is displayed when s\bsu\bud\bdo\bo
@@ -1245,11 +1238,18 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
        Below are example _\bs_\bu_\bd_\bo_\be_\br_\bs entries.  Admittedly, some of these are a bit
        contrived.  First, we define our _\ba_\bl_\bi_\ba_\bs_\be_\bs:
 
+        # User alias specification
+        User_Alias     FULLTIMERS = millert, mikef, dowdy
+        User_Alias     PARTTIMERS = bostley, jwfox, crawl
+        User_Alias     WEBMASTERS = will, wendy, wim
 
+        # Runas alias specification
+        Runas_Alias    OP = root, operator
+        Runas_Alias    DB = oracle, sybase
 
 
 
-1.7.2p1                   June 30, 2009                        19
+1.7.2p2                 November 24, 2009                      19
 
 
 
@@ -1258,14 +1258,6 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-        # User alias specification
-        User_Alias     FULLTIMERS = millert, mikef, dowdy
-        User_Alias     PARTTIMERS = bostley, jwfox, crawl
-        User_Alias     WEBMASTERS = will, wendy, wim
-
-        # Runas alias specification
-        Runas_Alias    OP = root, operator
-        Runas_Alias    DB = oracle, sybase
         Runas_Alias    ADMINGRP = adm, oper
 
         # Host alias specification
@@ -1312,25 +1304,25 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
         Defaults!PAGERS        noexec
 
        The _\bU_\bs_\be_\br _\bs_\bp_\be_\bc_\bi_\bf_\bi_\bc_\ba_\bt_\bi_\bo_\bn is the part that actually determines who may run
+       what.
 
+        root           ALL = (ALL) ALL
+        %wheel         ALL = (ALL) ALL
 
+       We let r\bro\boo\bot\bt and any user in group w\bwh\bhe\bee\bel\bl run any command on any host as
+       any user.
 
-1.7.2p1                   June 30, 2009                        20
 
 
 
+1.7.2p2                 November 24, 2009                      20
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-       what.
 
-        root           ALL = (ALL) ALL
-        %wheel         ALL = (ALL) ALL
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-       We let r\bro\boo\bot\bt and any user in group w\bwh\bhe\bee\bel\bl run any command on any host as
-       any user.
 
         FULLTIMERS     ALL = NOPASSWD: ALL
 
@@ -1379,23 +1371,24 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        the _\bH_\bP_\bP_\bA machines.  Note that this assumes _\bp_\ba_\bs_\bs_\bw_\bd(1) does not take
        multiple usernames on the command line.
 
+        bob            SPARC = (OP) ALL : SGI = (OP) ALL
 
+       The user b\bbo\bob\bb may run anything on the _\bS_\bP_\bA_\bR_\bC and _\bS_\bG_\bI machines as any user
+       listed in the _\bO_\bP Runas_Alias (r\bro\boo\bot\bt and o\bop\bpe\ber\bra\bat\bto\bor\br).
 
-1.7.2p1                   June 30, 2009                        21
+        jim            +biglab = ALL
 
 
 
 
+1.7.2p2                 November 24, 2009                      21
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-        bob            SPARC = (OP) ALL : SGI = (OP) ALL
 
-       The user b\bbo\bob\bb may run anything on the _\bS_\bP_\bA_\bR_\bC and _\bS_\bG_\bI machines as any user
-       listed in the _\bO_\bP Runas_Alias (r\bro\boo\bot\bt and o\bop\bpe\ber\bra\bat\bto\bor\br).
 
-        jim            +biglab = ALL
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
+
 
        The user j\bji\bim\bm may run any command on machines in the _\bb_\bi_\bg_\bl_\ba_\bb netgroup.
        s\bsu\bud\bdo\bo knows that "biglab" is a netgroup due to the '+' prefix.
@@ -1443,26 +1436,25 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        and wim), may run any command as user www (which owns the web pages) or
        simply _\bs_\bu(1) to www.
 
+        ALL            CDROM = NOPASSWD: /sbin/umount /CDROM,\
+                       /sbin/mount -o nosuid\,nodev /dev/cd0a /CDROM
 
+       Any user may mount or unmount a CD-ROM on the machines in the CDROM
+       Host_Alias (orion, perseus, hercules) without entering a password.
+       This is a bit tedious for users to type, so it is a prime candidate for
+       encapsulating in a shell script.
 
 
 
-1.7.2p1                   June 30, 2009                        22
-
 
+1.7.2p2                 November 24, 2009                      22
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-        ALL            CDROM = NOPASSWD: /sbin/umount /CDROM,\
-                       /sbin/mount -o nosuid\,nodev /dev/cd0a /CDROM
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-       Any user may mount or unmount a CD-ROM on the machines in the CDROM
-       Host_Alias (orion, perseus, hercules) without entering a password.
-       This is a bit tedious for users to type, so it is a prime candidate for
-       encapsulating in a shell script.
 
 S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY N\bNO\bOT\bTE\bES\bS
        It is generally not effective to "subtract" commands from ALL using the
@@ -1510,26 +1502,26 @@ P\bPR\bRE\bEV\bVE\bEN\bNT\bTI\bIN\bNG\bG S\bSH\bHE\bEL\bLL\bL E\bES\bSC\bCA\bAP\bPE\bES\bS
 
                      sudo -V | grep "dummy exec"
 
+                 If the resulting output contains a line that begins with:
 
+                     File containing dummy exec functions:
 
+                 then s\bsu\bud\bdo\bo may be able to replace the exec family of functions
+                 in the standard library with its own that simply return an
+                 error.  Unfortunately, there is no foolproof way to know
+                 whether or not _\bn_\bo_\be_\bx_\be_\bc will work at compile-time.  _\bn_\bo_\be_\bx_\be_\bc
 
-1.7.2p1                   June 30, 2009                        23
 
 
+1.7.2p2                 November 24, 2009                      23
 
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-                 If the resulting output contains a line that begins with:
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
-                     File containing dummy exec functions:
 
-                 then s\bsu\bud\bdo\bo may be able to replace the exec family of functions
-                 in the standard library with its own that simply return an
-                 error.  Unfortunately, there is no foolproof way to know
-                 whether or not _\bn_\bo_\be_\bx_\be_\bc will work at compile-time.  _\bn_\bo_\be_\bx_\be_\bc
                  should work on SunOS, Solaris, *BSD, Linux, IRIX, Tru64 UNIX,
                  MacOS X, and HP-UX 11.x.  It is known n\bno\bot\bt to work on AIX and
                  UnixWare.  _\bn_\bo_\be_\bx_\be_\bc is expected to work on most operating
@@ -1576,10 +1568,18 @@ B\bBU\bUG\bGS\bS
 
 S\bSU\bUP\bPP\bPO\bOR\bRT\bT
        Limited free support is available via the sudo-users mailing list, see
+       http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search
+       the archives.
+
+D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
+       s\bsu\bud\bdo\bo 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.
+       See the LICENSE file distributed with s\bsu\bud\bdo\bo or
 
 
 
-1.7.2p1                   June 30, 2009                        24
+1.7.2p2                 November 24, 2009                      24
 
 
 
@@ -1588,14 +1588,6 @@ S\bSU\bUP\bPP\bPO\bOR\bRT\bT
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-       http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search
-       the archives.
-
-D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
-       s\bsu\bud\bdo\bo 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.
-       See the LICENSE file distributed with s\bsu\bud\bdo\bo or
        http://www.sudo.ws/sudo/license.html for complete details.
 
 
@@ -1645,6 +1637,14 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
 
 
 
-1.7.2p1                   June 30, 2009                        25
+
+
+
+
+
+
+
+
+1.7.2p2                 November 24, 2009                      25
 
 
index 7b21d20a2b7f48f04f0000748615a6090c7eda05..97c577aea0441814d68f2474faf27788691ca339 100644 (file)
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\" 
-.\" $Sudo: sudoers.man.in,v 1.80 2009/06/30 12:41:09 millert Exp $
-.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
+.\" $Sudo: sudoers.pod,v 1.173 2009/06/30 12:41:09 millert Exp $
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
@@ -74,7 +66,7 @@
 .el       .ds Aq '
 .\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
 .ie \nF \{\
 .\" ========================================================================
 .\"
 .IX Title "SUDOERS @mansectform@"
-.TH SUDOERS @mansectform@ "June 30, 2009" "1.7.2p1" "MAINTENANCE COMMANDS"
+.TH SUDOERS @mansectform@ "November 24, 2009" "1.7.2p2" "MAINTENANCE COMMANDS"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -173,7 +165,7 @@ not necessarily the most specific match).
 The \fIsudoers\fR grammar will be described below in Extended Backus-Naur
 Form (\s-1EBNF\s0).  Don't despair if you don't know what \s-1EBNF\s0 is; it is
 fairly simple, and the definitions below are annotated.
-.Sh "Quick guide to \s-1EBNF\s0"
+.SS "Quick guide to \s-1EBNF\s0"
 .IX Subsection "Quick guide to EBNF"
 \&\s-1EBNF\s0 is a concise and exact way of describing the grammar of a language.
 Each \s-1EBNF\s0 definition is made up of \fIproduction rules\fR.  E.g.,
@@ -206,7 +198,7 @@ one or more times.
 Parentheses may be used to group symbols together.  For clarity,
 we will use single quotes ('') to designate what is a verbatim character
 string (as opposed to a symbol name).
-.Sh "Aliases"
+.SS "Aliases"
 .IX Subsection "Aliases"
 There are four kinds of aliases: \f(CW\*(C`User_Alias\*(C'\fR, \f(CW\*(C`Runas_Alias\*(C'\fR,
 \&\f(CW\*(C`Host_Alias\*(C'\fR and \f(CW\*(C`Cmnd_Alias\*(C'\fR.
@@ -358,7 +350,7 @@ arguments: ',', ':', '=', '\e'.  The special command \f(CW"sudoedit"\fR
 is used to permit a user to run \fBsudo\fR with the \fB\-e\fR option (or
 as \fBsudoedit\fR).  It may take command line arguments just as
 a normal command does.
-.Sh "Defaults"
+.SS "Defaults"
 .IX Subsection "Defaults"
 Certain configuration options may be changed from their default
 values at runtime via one or more \f(CW\*(C`Default_Entry\*(C'\fR lines.  These
@@ -403,7 +395,7 @@ and user Defaults first, then runas Defaults and finally command
 defaults.
 .PP
 See \*(L"\s-1SUDOERS\s0 \s-1OPTIONS\s0\*(R" for a list of supported Defaults parameters.
-.Sh "User Specification"
+.SS "User Specification"
 .IX Subsection "User Specification"
 .Vb 2
 \& User_Spec ::= User_List Host_List \*(Aq=\*(Aq Cmnd_Spec_List \e
@@ -426,7 +418,7 @@ run as \fBroot\fR, but this can be changed on a per-command basis.
 .PP
 The basic structure of a user specification is `who = where (as_whom)
 what'.  Let's break that down into its constituent parts:
-.Sh "Runas_Spec"
+.SS "Runas_Spec"
 .IX Subsection "Runas_Spec"
 A \f(CW\*(C`Runas_Spec\*(C'\fR determines the user and/or the group that a command
 may be run as.  A fully-specified \f(CW\*(C`Runas_Spec\*(C'\fR consists of two
@@ -484,7 +476,7 @@ only the group will be set, the command still runs as user \fBtcm\fR.
 \& tcm    boulder = (:dialer) /usr/bin/tip, /usr/bin/cu, \e
 \&        /usr/local/bin/minicom
 .Ve
-.Sh "Tag_Spec"
+.SS "Tag_Spec"
 .IX Subsection "Tag_Spec"
 A command may have zero or more tags associated with it.  There are
 eight possible tag values, \f(CW\*(C`NOPASSWD\*(C'\fR, \f(CW\*(C`PASSWD\*(C'\fR, \f(CW\*(C`NOEXEC\*(C'\fR, \f(CW\*(C`EXEC\*(C'\fR,
@@ -555,7 +547,7 @@ to the restrictions imposed by \fIenv_check\fR, \fIenv_delete\fR, or
 variables in this manner.  If the command matched is \fB\s-1ALL\s0\fR, the
 \&\f(CW\*(C`SETENV\*(C'\fR tag is implied for that command; this default may
 be overridden by use of the \f(CW\*(C`UNSETENV\*(C'\fR tag.
-.Sh "Wildcards"
+.SS "Wildcards"
 .IX Subsection "Wildcards"
 \&\fBsudo\fR allows shell-style \fIwildcards\fR (aka meta or glob characters)
 to be used in hostnames, pathnames and command line arguments in
@@ -605,7 +597,7 @@ wildcards.  This is to make a path like:
 .Ve
 .PP
 match \fI/usr/bin/who\fR but not \fI/usr/bin/X11/xterm\fR.
-.Sh "Exceptions to wildcard rules"
+.SS "Exceptions to wildcard rules"
 .IX Subsection "Exceptions to wildcard rules"
 The following exceptions apply to the above rules:
 .ie n .IP """""" 8
@@ -614,7 +606,7 @@ The following exceptions apply to the above rules:
 If the empty string \f(CW""\fR is the only command line argument in the
 \&\fIsudoers\fR entry it means that command is not allowed to be run
 with \fBany\fR arguments.
-.Sh "Including other files from within sudoers"
+.SS "Including other files from within sudoers"
 .IX Subsection "Including other files from within sudoers"
 It is possible to include other \fIsudoers\fR files from within the
 \&\fIsudoers\fR file currently being parsed using the \f(CW\*(C`#include\*(C'\fR and
@@ -666,7 +658,7 @@ Note that unlike files included via \f(CW\*(C`#include\*(C'\fR, \fBvisudo\fR wil
 edit the files in a \f(CW\*(C`#includedir\*(C'\fR directory unless one of them
 contains a syntax error.  It is still possible to run \fBvisudo\fR
 with the \f(CW\*(C`\-f\*(C'\fR flag to edit the files directly.
-.Sh "Other special characters and reserved words"
+.SS "Other special characters and reserved words"
 .IX Subsection "Other special characters and reserved words"
 The pound sign ('#') is used to indicate a comment (unless it is
 part of a #include directive or unless it occurs in the context of
@@ -1216,7 +1208,7 @@ people running \fBsudo\fR to have a sane \f(CW\*(C`PATH\*(C'\fR environment vari
 want to use this.  Another use is if you want to have the \*(L"root path\*(R"
 be separate from the \*(L"user path.\*(R"  Users in the group specified by the
 \&\fIexempt_group\fR option are not affected by \fIsecure_path\fR.
-This is not set by default.
+This option is @secure_path@ by default.
 .IP "syslog" 12
 .IX Item "syslog"
 Syslog facility if syslog is being used for logging (negate to
diff --git a/sudoers.man.pl b/sudoers.man.pl
new file mode 100644 (file)
index 0000000..9ee210a
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/perl -p
+
+BEGIN {
+    $t = undef;
+}
+
+if (/^\./) {
+    if (/^\.I[PX].*use_loginclass/) {
+       $t = '@LCMAN@';
+    } elsif (/^\.I[PX].*(role|type)/) {
+       $t = '@SEMAN@';
+    } else {
+       $t = undef;
+    }
+}
+
+# Fix up broken pod2man formatting of F<@foo@/bar>
+s/\\fI\\f(\(C)?I\@([^\@]*)\\fI\@/\\fI\@$2\@/g;
+s/\\f\(\CW\@([^\@]*)\\fR\@/\@$1\@/g;
+#\f(CW@secure_path\fR@
+
+# Comment out Compile-time-specific lines in DESCRIPTION
+if ($t) {
+    $_ = $t . $_;
+}
index a55ce0e6c60f4a92636d6be91aafe156d1c0d413..bbc2264d2bda249219b768ce2cf91f53909226fe 100644 (file)
@@ -1166,7 +1166,7 @@ people running B<sudo> to have a sane C<PATH> environment variable you may
 want to use this.  Another use is if you want to have the "root path"
 be separate from the "user path."  Users in the group specified by the
 I<exempt_group> option are not affected by I<secure_path>.
-This is not set by default.
+This option is @secure_path@ by default.
 
 =item syslog
 
diff --git a/toke.l b/toke.l
index 3fbfd2c36b7efeec2b72407bd46cbd6f3f55b1ea..bb89a2fc8000d6c85d8082e895eb0cd963524267 100644 (file)
--- a/toke.l
+++ b/toke.l
 #include <gram.h>
 
 #ifndef lint
-__unused static const char rcsid[] = "$Sudo: toke.l,v 1.38 2009/07/18 13:55:37 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: toke.l,v 1.40 2009/11/22 14:54:04 millert Exp $";
 #endif /* lint */
 
 extern YYSTYPE yylval;
+extern int parse_error;
 int sudolineno = 1;
 char *sudoers;
 static int sawspace = 0;
@@ -253,8 +254,11 @@ DEFVAR                     [a-z_]+
 
                            LEXTRACE("INCLUDEDIR\n");
 
-                           /* Push current buffer and switch to include file */
-                           if (!push_includedir(path))
+                           /*
+                            * Push current buffer and switch to include file.
+                            * We simply ignore empty directories.
+                            */
+                           if (!push_includedir(path) && parse_error)
                                yyterminate();
                        }
 
@@ -748,7 +752,7 @@ switch_dir(stack, dirpath)
 
     if (!(dir = opendir(dirpath))) {
        yyerror(dirpath);
-       return(FALSE);
+       return(NULL);
     }
     while ((dent = readdir(dir))) {
        /* Ignore files that end in '~' or have a '.' in them. */
@@ -873,12 +877,12 @@ _push_include(path, isdir)
     }
     if (isdir) {
        if (!(path = switch_dir(&istack[idepth], path))) {
-           yyerror(path);
+           /* switch_dir() called yyerror() for us */
            return(FALSE);
        }
        if ((fp = open_sudoers(path, FALSE, &keepopen)) == NULL) {
            yyerror(path);
-           return(FALSE); /* XXX - just to go next one? */
+           return(FALSE); /* XXX - just to go next one */
        }
     } else {
        if ((fp = open_sudoers(path, TRUE, &keepopen)) == NULL) {
@@ -918,7 +922,7 @@ pop_include()
        istack[idepth - 1].more = pl->next;
        if ((fp = open_sudoers(pl->path, FALSE, &keepopen)) == NULL) {
            yyerror(pl->path);
-           return(FALSE); /* XXX - just to go next one? */
+           return(FALSE); /* XXX - just to go next one */
        }
        efree(sudoers);
        sudoers = pl->path;