Implement --with-umask-override configure flag.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 14 Sep 2010 21:18:55 +0000 (17:18 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 14 Sep 2010 21:18:55 +0000 (17:18 -0400)
INSTALL
config.h.in
configure
configure.in
doc/sudoers.cat
doc/sudoers.man.in
doc/sudoers.pod
plugins/sudoers/defaults.c

diff --git a/INSTALL b/INSTALL
index b8fc6bf3b07c751a331a69d071198fceca249894..3d982b26914a96f43879abddd79235c8822c4727 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -453,6 +453,11 @@ The following options are also configurable at runtime:
   --without-umask
        Preserves the umask of the user invoking sudo.
 
+  --with-umask-override
+        Use the umask specified in sudoers even if it is less restrictive
+       than the user's.  The default is to use the intersection of the
+       user's umask and the umask specified in sudoers.
+
   --with-runas-default=USER
        The default user to run commands as if the -u flag is not specified
        on the command line.  This defaults to "root".
index 6b7e3f46b118ef1a81a0807f2d290a32a2ffe14e..54a603ef66ed84bc24df98cdf0651a360d0c6db0 100644 (file)
 /* The name of the sudoers plugin, including extension. */
 #undef SUDOERS_PLUGIN
 
-/* The umask that the root-run prog should use. */
+/* The umask that the sudo-run prog should use. */
 #undef SUDO_UMASK
 
 /* The number of minutes before sudo asks for a password again. */
 /* The number of tries a user gets to enter their password. */
 #undef TRIES_FOR_PASSWORD
 
+/* Define to 1 to use the umask specified in sudoers even when it is less
+   restrictive than the invoking user's. */
+#undef UMASK_OVERRIDE
+
 /* Define to 1 if the `unsetenv' function returns void instead of `int'. */
 #undef UNSETENV_VOID
 
index 35981dea342da355be70e8593acb531f07af72a6..a1c87737d6650c122847b43003da6c031379e91d 100755 (executable)
--- a/configure
+++ b/configure
@@ -812,6 +812,7 @@ logfac
 lecture
 long_otp_prompt
 passprompt
+umask_override
 sudo_umask
 password_timeout
 timeout
@@ -956,6 +957,7 @@ with_sudoers_mode
 with_sudoers_uid
 with_sudoers_gid
 with_umask
+with_umask_override
 with_runas_default
 with_exempt
 with_editor
@@ -1717,6 +1719,8 @@ Optional Packages:
   --with-umask            umask with which the prog should run (default is
                           022)
   --without-umask         Preserves the umask of the user invoking sudo.
+  --with-umask-override   Use the umask specified in sudoers even if it is
+                          less restrictive than the user's.
   --with-runas-default    User to run commands as (default is "root")
   --with-exempt=group     no passwd needed for users in this group
   --with-editor=path      Default editor for visudo (defaults to vi)
@@ -2961,6 +2965,7 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;}
 
 
 
+
 
 
 #
@@ -2971,6 +2976,7 @@ timedir=/var/adm/sudo
 timeout=5
 password_timeout=5
 sudo_umask=0022
+umask_override=off
 passprompt="Password:"
 long_otp_prompt=off
 lecture=once
@@ -4787,6 +4793,22 @@ else
 $as_echo "$sudo_umask" >&6; }
 fi
 
+
+# Check whether --with-umask-override was given.
+if test "${with_umask_override+set}" = set; then :
+  withval=$with_umask_override; case $with_umask_override in
+    yes)       $as_echo "#define UMASK_OVERRIDE 1" >>confdefs.h
+
+               umask_override=on
+               ;;
+    no)                umask_override=off
+               ;;
+    *)         as_fn_error "\"--with-umask-override does not take an argument.\"" "$LINENO" 5
+               ;;
+esac
+fi
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default user to run commands as" >&5
 $as_echo_n "checking for default user to run commands as... " >&6; }
 
@@ -6748,13 +6770,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:6751: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:6773: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:6754: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:6776: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:6757: output\"" >&5)
+  (eval echo "\"\$as_me:6779: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -7959,7 +7981,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 7962 "configure"' > conftest.$ac_ext
+  echo '#line 7984 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -9351,11 +9373,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:9354: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9376: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9358: \$? = $ac_status" >&5
+   echo "$as_me:9380: \$? = $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.
@@ -9690,11 +9712,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:9693: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9715: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9697: \$? = $ac_status" >&5
+   echo "$as_me:9719: \$? = $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.
@@ -9795,11 +9817,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:9798: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9820: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9802: \$? = $ac_status" >&5
+   echo "$as_me:9824: \$? = $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
@@ -9850,11 +9872,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:9853: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9875: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9857: \$? = $ac_status" >&5
+   echo "$as_me:9879: \$? = $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
@@ -12217,7 +12239,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12220 "configure"
+#line 12242 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12313,7 +12335,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12316 "configure"
+#line 12338 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -20537,5 +20559,6 @@ fi
 
 
 
+
 
 
index eb6c9cb906b3c3d9c13fcea84f435c577caf2834..6a4a2c74dcaab7d45b763a16a6d4c1c524122a3b 100644 (file)
@@ -69,6 +69,7 @@ AC_SUBST([timedir])dnl real initial value from SUDO_TIMEDIR
 AC_SUBST([timeout])
 AC_SUBST([password_timeout])
 AC_SUBST([sudo_umask])
+AC_SUBST([umask_override])
 AC_SUBST([passprompt])
 AC_SUBST([long_otp_prompt])
 AC_SUBST([lecture])
@@ -105,6 +106,7 @@ timedir=/var/adm/sudo
 timeout=5
 password_timeout=5
 sudo_umask=0022
+umask_override=off
 passprompt="Password:"
 long_otp_prompt=off
 lecture=once
@@ -796,13 +798,24 @@ AS_HELP_STRING([--without-umask], [Preserves the umask of the user invoking sudo
     *)         AC_MSG_ERROR(["you must enter a numeric mask."])
                ;;
 esac])
-AC_DEFINE_UNQUOTED(SUDO_UMASK, $sudo_umask, [The umask that the root-run prog should use.])
+AC_DEFINE_UNQUOTED(SUDO_UMASK, $sudo_umask, [The umask that the sudo-run prog should use.])
 if test "$sudo_umask" = "0777"; then
     AC_MSG_RESULT(user)
 else
     AC_MSG_RESULT($sudo_umask)
 fi
 
+AC_ARG_WITH(umask-override, [AS_HELP_STRING([--with-umask-override], [Use the umask specified in sudoers even if it is less restrictive than the user's.])],
+[case $with_umask_override in
+    yes)       AC_DEFINE(UMASK_OVERRIDE)
+               umask_override=on
+               ;;
+    no)                umask_override=off
+               ;;
+    *)         AC_MSG_ERROR(["--with-umask-override does not take an argument."])
+               ;;
+esac])
+
 AC_MSG_CHECKING(for default user to run commands as)
 AC_ARG_WITH(runas-default, [AS_HELP_STRING([--with-runas-default], [User to run commands as (default is "root")])],
 [case $with_runas_default in
@@ -2868,6 +2881,7 @@ AH_TEMPLATE(SEND_MAIL_WHEN_NO_USER, [Define to 1 to send mail when the user is n
 AH_TEMPLATE(SHELL_IF_NO_ARGS, [Define to 1 if you want sudo to start a shell if given no arguments.])
 AH_TEMPLATE(SHELL_SETS_HOME, [Define to 1 if you want sudo to set $HOME in shell mode.])
 AH_TEMPLATE(STUB_LOAD_INTERFACES, [Define to 1 if the code in interfaces.c does not compile for you.])
+AH_TEMPLATE(UMASK_OVERRIDE, [Define to 1 to use the umask specified in sudoers even when it is less restrictive than the invoking user's.])
 AH_TEMPLATE(USE_ADMIN_FLAG, [Define to 1 if you want to create ~/.sudo_as_admin_successful if the user is in the admin group the first time they run sudo.])
 AH_TEMPLATE(USE_INSULTS, [Define to 1 if you want to insult the user for entering an incorrect password.])
 AH_TEMPLATE(USE_STOW, [Define to 1 if you use GNU stow packaging.])
index 602c328bde6f9017b16dbb4bcc6b51d9263df5e8..b0a2acaf4e5de5d5d0308261483be7eeb76664c7 100644 (file)
@@ -61,7 +61,7 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
 
 
-1.8.0b1                   July 21, 2010                         1
+1.8.0b1                 September 14, 2010                      1
 
 
 
@@ -127,7 +127,7 @@ S\bSU\bUD\bDO\bOE\bER\bRS\bS F\bFI\bIL\bLE\bE F\bFO\bOR\bRM\bMA\bAT\bT
 
 
 
-1.8.0b1                   July 21, 2010                         2
+1.8.0b1                 September 14, 2010                      2
 
 
 
@@ -193,7 +193,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.8.0b1                   July 21, 2010                         3
+1.8.0b1                 September 14, 2010                      3
 
 
 
@@ -259,7 +259,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.8.0b1                   July 21, 2010                         4
+1.8.0b1                 September 14, 2010                      4
 
 
 
@@ -325,7 +325,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.8.0b1                   July 21, 2010                         5
+1.8.0b1                 September 14, 2010                      5
 
 
 
@@ -391,7 +391,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.8.0b1                   July 21, 2010                         6
+1.8.0b1                 September 14, 2010                      6
 
 
 
@@ -457,7 +457,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.8.0b1                   July 21, 2010                         7
+1.8.0b1                 September 14, 2010                      7
 
 
 
@@ -523,7 +523,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.8.0b1                   July 21, 2010                         8
+1.8.0b1                 September 14, 2010                      8
 
 
 
@@ -589,7 +589,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.8.0b1                   July 21, 2010                         9
+1.8.0b1                 September 14, 2010                      9
 
 
 
@@ -655,7 +655,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.8.0b1                   July 21, 2010                        10
+1.8.0b1                 September 14, 2010                     10
 
 
 
@@ -716,12 +716,12 @@ S\bSU\bUD\bDO\bOE\bER\bRS\bS O\bOP\bPT\bTI\bIO\bON\bNS\bS
                        that the -\b-H\bH option is always implied.  Note that HOME
                        is already set when the the _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt option is
                        enabled, so _\ba_\bl_\bw_\ba_\by_\bs_\b__\bs_\be_\bt_\b__\bh_\bo_\bm_\be is only effective for
-                       configurations where _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt is disabled.  This flag
-                       is _\bo_\bf_\bf by default.
+                       configurations where either _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt is disabled or
+                       HOME is present in the _\be_\bn_\bv_\b__\bk_\be_\be_\bp list.  This flag is _\bo_\bf_\bf
 
 
 
-1.8.0b1                   July 21, 2010                        11
+1.8.0b1                 September 14, 2010                     11
 
 
 
@@ -730,6 +730,8 @@ S\bSU\bUD\bDO\bOE\bER\bRS\bS O\bOP\bPT\bTI\bIO\bON\bNS\bS
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+                       by default.
+
        authenticate    If set, users must authenticate themselves via a
                        password (or other means of authentication) before they
                        may run commands.  This default may be overridden via
@@ -782,12 +784,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        the negation operator, '!', as such rules can be
                        trivially bypassed.  As such, this option should not be
                        used when _\bs_\bu_\bd_\bo_\be_\br_\bs contains rules that contain negated
-                       path names which include globbing characters.  This
-                       flag is _\bo_\bf_\bf by default.
 
 
 
-1.8.0b1                   July 21, 2010                        12
+1.8.0b1                 September 14, 2010                     12
 
 
 
@@ -796,6 +796,9 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+                       path names which include globbing characters.  This
+                       flag is _\bo_\bf_\bf by default.
+
        fqdn            Set this flag if you want to put fully qualified host
                        names in the _\bs_\bu_\bd_\bo_\be_\br_\bs file.  I.e., instead of myhost you
                        would use myhost.mydomain.edu.  You may still use the
@@ -848,12 +851,9 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        mail_always     Send mail to the _\bm_\ba_\bi_\bl_\bt_\bo user every time a users runs
                        s\bsu\bud\bdo\bo.  This flag is _\bo_\bf_\bf by default.
 
-       mail_badpass    Send mail to the _\bm_\ba_\bi_\bl_\bt_\bo user if the user running s\bsu\bud\bdo\bo
-                       does not enter the correct password.  This flag is _\bo_\bf_\bf
-
 
 
-1.8.0b1                   July 21, 2010                        13
+1.8.0b1                 September 14, 2010                     13
 
 
 
@@ -862,6 +862,8 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+       mail_badpass    Send mail to the _\bm_\ba_\bi_\bl_\bt_\bo user if the user running s\bsu\bud\bdo\bo
+                       does not enter the correct password.  This flag is _\bo_\bf_\bf
                        by default.
 
        mail_no_host    If set, mail will be sent to the _\bm_\ba_\bi_\bl_\bt_\bo user if the
@@ -914,12 +916,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        the return (or enter) key.  Some users become confused
                        by this as it appears to them that s\bsu\bud\bdo\bo has hung at
                        this point.  When _\bp_\bw_\bf_\be_\be_\bd_\bb_\ba_\bc_\bk is set, s\bsu\bud\bdo\bo will provide
-                       visual feedback when the user presses a key.  Note that
-                       this does have a security impact as an onlooker may be
 
 
 
-1.8.0b1                   July 21, 2010                        14
+1.8.0b1                 September 14, 2010                     14
 
 
 
@@ -928,6 +928,8 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+                       visual feedback when the user presses a key.  Note that
+                       this does have a security impact as an onlooker may be
                        able to determine the length of the password being
                        entered.  This flag is _\bo_\bf_\bf by default.
 
@@ -961,8 +963,9 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        -\b-u\bu option is used).  This effectively makes the -\b-s\bs
                        option imply -\b-H\bH.  Note that HOME is already set when
                        the the _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt option is enabled, so _\bs_\be_\bt_\b__\bh_\bo_\bm_\be is
-                       only effective for configurations where _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt is
-                       disabled.  This flag is _\bo_\bf_\bf by default.
+                       only effective for configurations where either
+                       _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt is disabled or HOME is present in the
+                       _\be_\bn_\bv_\b__\bk_\be_\be_\bp list.  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
@@ -979,13 +982,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        command line via the -\b-E\bE option.  Additionally,
                        environment variables set via the command line are not
                        subject to the restrictions imposed by _\be_\bn_\bv_\b__\bc_\bh_\be_\bc_\bk,
-                       _\be_\bn_\bv_\b__\bd_\be_\bl_\be_\bt_\be, or _\be_\bn_\bv_\b__\bk_\be_\be_\bp.  As such, only trusted users
-                       should be allowed to set variables in this manner.
-                       This flag is _\bo_\bf_\bf by default.
 
 
 
-1.8.0b1                   July 21, 2010                        15
+1.8.0b1                 September 14, 2010                     15
 
 
 
@@ -994,6 +994,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+                       _\be_\bn_\bv_\b__\bd_\be_\bl_\be_\bt_\be, or _\be_\bn_\bv_\b__\bk_\be_\be_\bp.  As such, only trusted users
+                       should be allowed to set variables in this manner.
+                       This flag is _\bo_\bf_\bf by default.
+
        shell_noargs    If set and s\bsu\bud\bdo\bo is invoked with no arguments it acts as
                        if the -\b-s\bs option had been given.  That is, it runs a
                        shell as root (the shell is determined by the SHELL
@@ -1044,14 +1048,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
                        Output logs may be viewed with the _\bs_\bu_\bd_\bo_\br_\be_\bp_\bl_\ba_\by(1m)
                        utility, which can also be used to list or search the
-                       available logs.
 
-       tty_tickets     If set, users must authenticate on a per-tty basis.
-                       With this flag enabled, s\bsu\bud\bdo\bo will use a file named for
 
 
-
-1.8.0b1                   July 21, 2010                        16
+1.8.0b1                 September 14, 2010                     16
 
 
 
@@ -1060,6 +1060,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+                       available logs.
+
+       tty_tickets     If set, users must authenticate on a per-tty basis.
+                       With this flag enabled, s\bsu\bud\bdo\bo will use a file named for
                        the tty the user is logged in on in the user's time
                        stamp directory.  If disabled, the time stamp of the
                        directory is used instead.  This flag is _\bo_\bn by default.
@@ -1110,14 +1114,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        loglinelen      Number of characters per line for the file log.  This
                        value is used to decide when to wrap lines for nicer
                        log files.  This has no effect on the syslog log file,
-                       only the file log.  The default is 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
 
 
 
-1.8.0b1                   July 21, 2010                        17
+1.8.0b1                 September 14, 2010                     17
 
 
 
@@ -1126,6 +1126,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+                       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, or 0 for no timeout.  The timeout may include a
                        fractional component if minute granularity is
                        insufficient, for example 2.5.  The default is 5.
@@ -1176,14 +1180,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        passprompt      The default prompt to use when asking for a password;
                        can be overridden via the -\b-p\bp option or the SUDO_PROMPT
                        environment variable.  The following percent (`%')
-                       escapes are supported:
-
-                       %H  expanded to the local host name including the
-                           domain name (on if the machine's host name is fully
 
 
 
-1.8.0b1                   July 21, 2010                        18
+1.8.0b1                 September 14, 2010                     18
 
 
 
@@ -1192,6 +1192,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+                       escapes are supported:
+
+                       %H  expanded to the local host name including the
+                           domain name (on if the machine's host name is fully
                            qualified or the _\bf_\bq_\bd_\bn option is set)
 
                        %h  expanded to the local host name without the domain
@@ -1242,21 +1246,21 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        security context to run the command.  The default type
                        may be overridden on a per-command basis in _\bs_\bu_\bd_\bo_\be_\br_\bs or
                        via command line options.  This option is only
-                       available whe s\bsu\bud\bdo\bo is built with SELinux support.
 
-       S\bSt\btr\bri\bin\bng\bgs\bs t\bth\bha\bat\bt c\bca\ban\bn b\bbe\be u\bus\bse\bed\bd i\bin\bn a\ba b\bbo\boo\bol\ble\bea\ban\bn c\bco\bon\bnt\bte\bex\bxt\bt:
 
 
+1.8.0b1                 September 14, 2010                     19
 
 
-1.8.0b1                   July 21, 2010                        19
 
 
 
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
+                       available whe s\bsu\bud\bdo\bo is built with SELinux support.
 
+       S\bSt\btr\bri\bin\bng\bgs\bs t\bth\bha\bat\bt c\bca\ban\bn b\bbe\be u\bus\bse\bed\bd i\bin\bn a\ba b\bbo\boo\bol\ble\bea\ban\bn c\bco\bon\bnt\bte\bex\bxt\bt:
 
        askpass     The _\ba_\bs_\bk_\bp_\ba_\bs_\bs option specifies the fully qualified path to a
                    helper program used to read the user's password when no
@@ -1308,14 +1312,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
                    once    Only lecture the user the first time they run s\bsu\bud\bdo\bo.
 
-                   If no value is specified, a value of _\bo_\bn_\bc_\be is implied.
-                   Negating the option results in a value of _\bn_\be_\bv_\be_\br being used.
-                   The default value is _\bo_\bn_\bc_\be.
 
 
 
-
-1.8.0b1                   July 21, 2010                        20
+1.8.0b1                 September 14, 2010                     20
 
 
 
@@ -1324,6 +1324,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+                   If no value is specified, a value of _\bo_\bn_\bc_\be is implied.
+                   Negating the option results in a value of _\bn_\be_\bv_\be_\br being used.
+                   The default value is _\bo_\bn_\bc_\be.
+
        lecture_file
                    Path to a file containing an alternate s\bsu\bud\bdo\bo lecture that
                    will be used in place of the standard lecture if the named
@@ -1374,14 +1378,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                    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
-                   _\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
-                   option is not set by default.
-
-       syslog      Syslog facility if syslog is being used for logging (negate
 
 
 
-1.8.0b1                   July 21, 2010                        21
+1.8.0b1                 September 14, 2010                     21
 
 
 
@@ -1390,6 +1390,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+                   _\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
+                   option is not set by default.
+
+       syslog      Syslog facility if syslog is being used for logging (negate
                    to disable syslog logging).  Defaults to auth.
 
        verifypw    This option controls when a password will be required when
@@ -1440,14 +1444,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        default list of environment variables to remove is
                        displayed when s\bsu\bud\bdo\bo is run by root with the _\b-_\bV option.
                        Note that many operating systems will remove
-                       potentially dangerous variables from the environment of
-                       any setuid process (such as s\bsu\bud\bdo\bo).
-
-       env_keep        Environment variables to be preserved in the user's
 
 
 
-1.8.0b1                   July 21, 2010                        22
+1.8.0b1                 September 14, 2010                     22
 
 
 
@@ -1456,6 +1456,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+                       potentially dangerous variables from the environment of
+                       any setuid process (such as s\bsu\bud\bdo\bo).
+
+       env_keep        Environment variables to be preserved in the user's
                        environment when the _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt option is in effect.
                        This allows fine-grained control over the environment
                        s\bsu\bud\bdo\bo-spawned processes will receive.  The argument may
@@ -1506,14 +1510,10 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
         # Runas alias specification
         Runas_Alias    OP = root, operator
         Runas_Alias    DB = oracle, sybase
-        Runas_Alias    ADMINGRP = adm, oper
-
-        # Host alias specification
-        Host_Alias     SPARC = bigtime, eclipse, moet, anchor :\
 
 
 
-1.8.0b1                   July 21, 2010                        23
+1.8.0b1                 September 14, 2010                     23
 
 
 
@@ -1522,6 +1522,10 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+        Runas_Alias    ADMINGRP = adm, oper
+
+        # Host alias specification
+        Host_Alias     SPARC = bigtime, eclipse, moet, anchor :\
                        SGI = grolsch, dandelion, black :\
                        ALPHA = widget, thalamus, foobar :\
                        HPPA = boa, nag, python
@@ -1572,14 +1576,10 @@ 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
-
-       Full time sysadmins (m\bmi\bil\bll\ble\ber\brt\bt, m\bmi\bik\bke\bef\bf, and d\bdo\bow\bwd\bdy\by) may run any command on
-       any host without authenticating themselves.
 
 
 
-1.8.0b1                   July 21, 2010                        24
+1.8.0b1                 September 14, 2010                     24
 
 
 
@@ -1588,6 +1588,11 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+        FULLTIMERS     ALL = NOPASSWD: ALL
+
+       Full time sysadmins (m\bmi\bil\bll\ble\ber\brt\bt, m\bmi\bik\bke\bef\bf, and d\bdo\bow\bwd\bdy\by) may run any command on
+       any host without authenticating themselves.
+
         PARTTIMERS     ALL = ALL
 
        Part time sysadmins (b\bbo\bos\bst\btl\ble\bey\by, j\bjw\bwf\bfo\box\bx, and c\bcr\bra\baw\bwl\bl) may run any command on
@@ -1637,22 +1642,22 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
         jim            +biglab = ALL
 
-       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.
 
-        +secretaries   ALL = PRINTING, /usr/bin/adduser, /usr/bin/rmuser
 
 
+1.8.0b1                 September 14, 2010                     25
 
 
-1.8.0b1                   July 21, 2010                        25
 
 
 
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-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.
 
+        +secretaries   ALL = PRINTING, /usr/bin/adduser, /usr/bin/rmuser
 
        Users in the s\bse\bec\bcr\bre\bet\bta\bar\bri\bie\bes\bs netgroup need to help manage the printers as
        well as add and remove users, so they are allowed to run those commands
@@ -1703,15 +1708,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
        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
-       '!' operator.  A user can trivially circumvent this by copying the
-       desired command to a different name and then executing that.  For
-       example:
 
 
 
-1.8.0b1                   July 21, 2010                        26
+1.8.0b1                 September 14, 2010                     26
 
 
 
@@ -1720,6 +1720,12 @@ S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY N\bNO\bOT\bTE\bES\bS
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+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
+       '!' operator.  A user can trivially circumvent this by copying the
+       desired command to a different name and then executing that.  For
+       example:
+
            bill        ALL = ALL, !SU, !SHELLS
 
        Doesn't really prevent b\bbi\bil\bll\bl from running the commands listed in _\bS_\bU or
@@ -1768,23 +1774,24 @@ 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
                  any other programs.  Note, however, that this applies only to
                  native dynamically-linked executables.  Statically-linked
                  executables and foreign executables running under binary
-                 emulation are not affected.
 
-                 To tell whether or not s\bsu\bud\bdo\bo supports _\bn_\bo_\be_\bx_\be_\bc, you can run the
-                 following as root:
 
-                     sudo -V | grep "dummy exec"
 
+1.8.0b1                 September 14, 2010                     27
 
 
-1.8.0b1                   July 21, 2010                        27
 
 
 
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
-SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
+                 emulation are not affected.
 
+                 To tell whether or not s\bsu\bud\bdo\bo supports _\bn_\bo_\be_\bx_\be_\bc, you can run the
+                 following as root:
+
+                     sudo -V | grep "dummy exec"
 
                  If the resulting output contains a line that begins with:
 
@@ -1834,16 +1841,9 @@ S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY N\bNO\bOT\bTE\bES\bS
        by root and inaccessible by any other user, the user placing files
        there would be unable to get them back out.
 
-       _\bs_\bu_\bd_\bo_\be_\br_\bs will not honor time stamps set far in the future.  Time stamps
-       with a date greater than current_time + 2 * TIMEOUT will be ignored and
-       sudo will log and complain.  This is done to keep a user from creating
-       his/her own time stamp with a bogus date on systems that allow users to
-       give away files if the time stamp directory is located in a world-
-       writable directory.
-
 
 
-1.8.0b1                   July 21, 2010                        28
+1.8.0b1                 September 14, 2010                     28
 
 
 
@@ -1852,6 +1852,13 @@ S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY N\bNO\bOT\bTE\bES\bS
 SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
+       _\bs_\bu_\bd_\bo_\be_\br_\bs will not honor time stamps set far in the future.  Time stamps
+       with a date greater than current_time + 2 * TIMEOUT will be ignored and
+       sudo will log and complain.  This is done to keep a user from creating
+       his/her own time stamp with a bogus date on systems that allow users to
+       give away files if the time stamp directory is located in a world-
+       writable directory.
+
        On systems where the boot time is available, _\bs_\bu_\bd_\bo_\be_\br_\bs will ignore time
        stamps that date from before the machine booted.
 
@@ -1899,6 +1906,18 @@ S\bSU\bUP\bPP\bPO\bOR\bRT\bT
        http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search
        the archives.
 
+
+
+
+1.8.0b1                 September 14, 2010                     29
+
+
+
+
+
+SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
+
+
 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
@@ -1909,6 +1928,53 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
 
 
 
-1.8.0b1                   July 21, 2010                        29
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1.8.0b1                 September 14, 2010                     30
 
 
index e89c403f51c05737a2bc2f25b2404dae5c138e4a..a4c169a1ad301c7f27d9ba81d87e66307dd50e7f 100644 (file)
@@ -22,7 +22,7 @@
 .nr BA @BAMAN@
 .nr LC @LCMAN@
 .\"
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\" ========================================================================
 .\"
 .IX Title "SUDOERS @mansectform@"
-.TH SUDOERS @mansectform@ "July 21, 2010" "1.8.0b1" "MAINTENANCE COMMANDS"
+.TH SUDOERS @mansectform@ "September 14, 2010" "1.8.0b1" "MAINTENANCE COMMANDS"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -837,7 +837,8 @@ home directory of the target user (which is root unless the \fB\-u\fR
 option is used).  This effectively means that the \fB\-H\fR option is
 always implied.  Note that \f(CW\*(C`HOME\*(C'\fR is already set when the the
 \&\fIenv_reset\fR option is enabled, so \fIalways_set_home\fR is only
-effective for configurations where \fIenv_reset\fR is disabled.
+effective for configurations where either \fIenv_reset\fR is disabled
+or \f(CW\*(C`HOME\*(C'\fR is present in the \fIenv_keep\fR list.
 This flag is \fIoff\fR by default.
 .IP "authenticate" 16
 .IX Item "authenticate"
@@ -1033,7 +1034,8 @@ environment variable will be set to the home directory of the target
 user (which is root unless the \fB\-u\fR option is used).  This effectively
 makes the \fB\-s\fR option imply \fB\-H\fR.  Note that \f(CW\*(C`HOME\*(C'\fR is already
 set when the the \fIenv_reset\fR option is enabled, so \fIset_home\fR is
-only effective for configurations where \fIenv_reset\fR is disabled.
+only effective for configurations where either \fIenv_reset\fR is disabled
+or \f(CW\*(C`HOME\*(C'\fR is present in the \fIenv_keep\fR list.
 This flag is \fIoff\fR by default.
 .IP "set_logname" 16
 .IX Item "set_logname"
@@ -1119,7 +1121,7 @@ modification.  This makes it possible to specify a more permissive
 umask in \fIsudoers\fR than the user's own umask and matches historical
 behavior.  If \fIumask_override\fR is not set, \fBsudo\fR will set the
 umask to be the union of the user's umask and what is specified in
-\&\fIsudoers\fR.  This flag is \fIoff\fR by default.
+\&\fIsudoers\fR.  This flag is \fI@umask_override@\fR by default.
 .if \n(LC \{\
 .IP "use_loginclass" 16
 .IX Item "use_loginclass"
index 3d794212f45b6acf06b7fd20f54291780ad5b8a4..ee8755a5553ed08b889c0692e845821528839f9c 100644 (file)
@@ -1019,7 +1019,7 @@ modification.  This makes it possible to specify a more permissive
 umask in I<sudoers> than the user's own umask and matches historical
 behavior.  If I<umask_override> is not set, B<sudo> will set the
 umask to be the union of the user's umask and what is specified in
-I<sudoers>.  This flag is I<off> by default.
+I<sudoers>.  This flag is I<@umask_override@> by default.
 
 =item use_loginclass
 
index 8f39242a98158c4d9095a8d07011beaa9b1bbfc0..d204da5654d2896a6dc601de6548c2f1d8a3fcda 100644 (file)
@@ -439,6 +439,9 @@ init_defaults(void)
 #endif
 #ifdef ENV_EDITOR
     def_env_editor = TRUE;
+#endif
+#ifdef UMASK_OVERRIDE
+    def_umask_override = TRUE;
 #endif
     def_sudoers_locale = estrdup("C");
     def_env_reset = TRUE;