]> granicus.if.org Git - sudo/commitdiff
The tty_tickets option is now on by default.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 20 Jul 2010 17:12:28 +0000 (13:12 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 20 Jul 2010 17:12:28 +0000 (13:12 -0400)
--HG--
branch : 1.7

INSTALL
UPGRADE
config.h.in
configure
configure.in
defaults.c
sudoers.cat
sudoers.man.in
sudoers.pod

diff --git a/INSTALL b/INSTALL
index 0e13da0817b1b4d89d8a48ebd5a4f84531c82f99..5cb6666c254f79b1cd58c3e771f2bed787786a9d 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -485,13 +485,10 @@ The following options are also configurable at runtime:
        Number of minutes before the sudo password prompt times out.
        The default is 5, set this to 0 for no password timeout.
 
-  --with-tty-tickets
-       This makes sudo use a different ticket file for each user/tty combo.
-       Ie: instead of the ticket path being "username" it is "username/tty".
-       This is useful for "shared" accounts like "operator".  Note that this
-       means that there will be more files in the timestamp dir.  This is not
-       a problem if your system has a cron job to remove of files from /tmp
-       (or wherever you specified the timestamp dir to be).
+  --without-tty-tickets
+       By default, sudo uses a different ticket file for each user/tty combo.
+       With this option disabled, a single ticket will be used for all
+       of a user's login sessions.
 
   --with-insults
        Define this if you want to be insulted for typing an incorrect password
diff --git a/UPGRADE b/UPGRADE
index cde28f2a892e1c5b392f0de48dd2e34de97aacdf..8f98d2f702d38b71b6c512e5de344f4588483ee5 100644 (file)
--- a/UPGRADE
+++ b/UPGRADE
@@ -10,6 +10,12 @@ o Upgrading from a version prior to 1.7.4:
     system reboots.  Time stamp files older than the boot time are
     ignored on systems where it is possible to determine this.
 
+    Additionally, the tty_tickets sudoers option is now enabled by
+    default.  To restore the old behavior (single time stamp per user),
+    add a line like:
+       Defaults !tty_tickets
+    to sudoers or use the --without-tty-tickets configure option.
+
     The HOME and MAIL environment variables are now reset based on the
     target user's password database entry when the env_reset sudoers option
     is enabled (which is the case in the default configuration).  Users
index 39bd71fd946258f1864b12fd26ae9c1b05872013..ebce631d99da3a9d4583505b22c1b5584f0d71c0 100644 (file)
 /* Define to 1 if root should not be allowed to use sudo. */
 #undef NO_ROOT_SUDO
 
+/* Define to 1 if you want a single ticket file instead of per-tty files. */
+#undef NO_TTY_TICKETS
+
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
 /* Define to 1 if you use GNU stow packaging. */
 #undef USE_STOW
 
-/* Define to 1 if you want a different ticket file for each tty. */
-#undef USE_TTY_TICKETS
-
 /* Define to 1 if using a non-Unix group lookup implementation. */
 #undef USING_NONUNIX_GROUPS
 
index 0707115ceb856eb6316f2f1a37d0cb6783f55bce..4102892037b8e8998cebc761b9896175b6a09f14 100755 (executable)
--- a/configure
+++ b/configure
@@ -2797,7 +2797,7 @@ runas_default=root
 env_editor=off
 editor=vi
 passwd_tries=3
-tty_tickets=off
+tty_tickets=on
 insults=off
 root_sudo=on
 path_info=on
@@ -4794,14 +4794,14 @@ if test "${with_tty_tickets+set}" = set; then :
 esac
 fi
 
-if test "$tty_tickets" = "on"; then
-    $as_echo "#define USE_TTY_TICKETS 1" >>confdefs.h
+if test "$tty_tickets" = "off"; then
+    $as_echo "#define NO_TTY_TICKETS 1" >>confdefs.h
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include insults" >&5
index 9c7c149d980f83f61318e4a9a29bf27165136487..9070fecb10405e4658e7ef97b6962971ec7c37ee 100644 (file)
@@ -115,7 +115,7 @@ runas_default=root
 env_editor=off
 editor=vi
 passwd_tries=3
-tty_tickets=off
+tty_tickets=on
 insults=off
 root_sudo=on
 path_info=on
@@ -910,11 +910,11 @@ AC_ARG_WITH(tty-tickets, [AS_HELP_STRING([--with-tty-tickets], [use a different
     *)         AC_MSG_ERROR(["--with-tty-tickets does not take an argument."])
                ;;
 esac])
-if test "$tty_tickets" = "on"; then
-    AC_DEFINE(USE_TTY_TICKETS)
-    AC_MSG_RESULT(yes)
-else
+if test "$tty_tickets" = "off"; then
+    AC_DEFINE(NO_TTY_TICKETS)
     AC_MSG_RESULT(no)
+else
+    AC_MSG_RESULT(yes)
 fi
 
 AC_MSG_CHECKING(whether to include insults)
@@ -2862,6 +2862,7 @@ AH_TEMPLATE(NO_LECTURE, [Define to 1 if you don't want users to get the lecture
 AH_TEMPLATE(NO_PAM_SESSION, [Define to 1 if you don't want to use sudo's PAM session support])
 AH_TEMPLATE(NO_ROOT_MAILER, [Define to avoid runing the mailer as root.])
 AH_TEMPLATE(NO_ROOT_SUDO, [Define to 1 if root should not be allowed to use sudo.])
+AH_TEMPLATE(NO_TTY_TICKETS, [Define to 1 if you want a single ticket file instead of per-tty files.])
 AH_TEMPLATE(PC_INSULTS, [Define to 1 to replace politically incorrect insults with less offensive ones.])
 AH_TEMPLATE(SECURE_PATH, [Define to 1 to override the user's path with a built-in one.])
 AH_TEMPLATE(SEND_MAIL_WHEN_NOT_OK, [Define to 1 to send mail when the user is not allowed to run a command.])
@@ -2872,7 +2873,6 @@ AH_TEMPLATE(SHELL_SETS_HOME, [Define to 1 if you want sudo to set $HOME in shell
 AH_TEMPLATE(STUB_LOAD_INTERFACES, [Define to 1 if the code in interfaces.c does not compile for you.])
 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.])
-AH_TEMPLATE(USE_TTY_TICKETS, [Define to 1 if you want a different ticket file for each tty.])
 AH_TEMPLATE(WITHOUT_PASSWD, [Define to avoid using the passwd/shadow file for authentication.])
 AH_TEMPLATE(sig_atomic_t, [Define to `int' if <signal.h> does not define.])
 AH_TEMPLATE(__signed, [Define to `signed' or nothing if compiler does not support a signed type qualifier.])
index 1bc99c7bd4f0c8c61d7bf87098e54fb61d40fe5f..10757eefce46e9637f4a596d58e4d99e70b3e653 100644 (file)
@@ -400,7 +400,7 @@ init_defaults()
 #ifdef SEND_MAIL_WHEN_NOT_OK
     def_mail_no_perms = TRUE;
 #endif
-#ifdef USE_TTY_TICKETS
+#ifndef NO_TTY_TICKETS
     def_tty_tickets = TRUE;
 #endif
 #ifndef NO_LECTURE
index abe5a674dad8785712ab147e48c0c18bf19fc092..a9a5190245b180d72a33f93de232cc0ad674e3ee 100644 (file)
@@ -61,7 +61,7 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
 
 
-1.7.4                     July 19, 2010                         1
+1.7.4                     July 20, 2010                         1
 
 
 
@@ -127,7 +127,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                         2
+1.7.4                     July 20, 2010                         2
 
 
 
@@ -193,7 +193,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                         3
+1.7.4                     July 20, 2010                         3
 
 
 
@@ -259,7 +259,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                         4
+1.7.4                     July 20, 2010                         4
 
 
 
@@ -325,7 +325,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                         5
+1.7.4                     July 20, 2010                         5
 
 
 
@@ -391,7 +391,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                         6
+1.7.4                     July 20, 2010                         6
 
 
 
@@ -457,7 +457,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                         7
+1.7.4                     July 20, 2010                         7
 
 
 
@@ -523,7 +523,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                         8
+1.7.4                     July 20, 2010                         8
 
 
 
@@ -589,7 +589,7 @@ S\bSU\bUD\bDO\bOE\bER\bRS\bS O\bOP\bPT\bTI\bIO\bON\bNS\bS
 
 
 
-1.7.4                     July 19, 2010                         9
+1.7.4                     July 20, 2010                         9
 
 
 
@@ -655,7 +655,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        10
+1.7.4                     July 20, 2010                        10
 
 
 
@@ -721,7 +721,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        11
+1.7.4                     July 20, 2010                        11
 
 
 
@@ -787,7 +787,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        12
+1.7.4                     July 20, 2010                        12
 
 
 
@@ -853,7 +853,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        13
+1.7.4                     July 20, 2010                        13
 
 
 
@@ -919,7 +919,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        14
+1.7.4                     July 20, 2010                        14
 
 
 
@@ -940,11 +940,10 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        available logs.
 
        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
-                       user is logged in on in that directory.  This flag is
-                       _\bo_\bf_\bf by default.
+                       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.
 
        umask_override  If set, s\bsu\bud\bdo\bo will set the umask as specified by _\bs_\bu_\bd_\bo_\be_\br_\bs
                        without modification.  This makes it possible to
@@ -985,7 +984,8 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        15
+
+1.7.4                     July 20, 2010                        15
 
 
 
@@ -1051,7 +1051,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        16
+1.7.4                     July 20, 2010                        16
 
 
 
@@ -1117,7 +1117,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        17
+1.7.4                     July 20, 2010                        17
 
 
 
@@ -1183,7 +1183,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        18
+1.7.4                     July 20, 2010                        18
 
 
 
@@ -1249,7 +1249,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        19
+1.7.4                     July 20, 2010                        19
 
 
 
@@ -1315,7 +1315,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        20
+1.7.4                     July 20, 2010                        20
 
 
 
@@ -1381,7 +1381,7 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
 
 
 
-1.7.4                     July 19, 2010                        21
+1.7.4                     July 20, 2010                        21
 
 
 
@@ -1447,7 +1447,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        22
+1.7.4                     July 20, 2010                        22
 
 
 
@@ -1513,7 +1513,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.7.4                     July 19, 2010                        23
+1.7.4                     July 20, 2010                        23
 
 
 
@@ -1579,7 +1579,7 @@ S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY N\bNO\bOT\bTE\bES\bS
 
 
 
-1.7.4                     July 19, 2010                        24
+1.7.4                     July 20, 2010                        24
 
 
 
@@ -1645,7 +1645,7 @@ 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
 
 
 
-1.7.4                     July 19, 2010                        25
+1.7.4                     July 20, 2010                        25
 
 
 
@@ -1711,6 +1711,6 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
 
 
 
-1.7.4                     July 19, 2010                        26
+1.7.4                     July 20, 2010                        26
 
 
index 93724ad5355aceb04806086894fd9b488572488c..a2c1627239912cb72fc7c6f5ded1fe7fe41f06d1 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "SUDOERS @mansectform@"
-.TH SUDOERS @mansectform@ "July 19, 2010" "1.7.4" "MAINTENANCE COMMANDS"
+.TH SUDOERS @mansectform@ "July 20, 2010" "1.7.4" "MAINTENANCE COMMANDS"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -1006,11 +1006,11 @@ Output logs may be viewed with the \fIsudoreplay\fR\|(@mansectsu@) utility, whic
 can also be used to list or search the available logs.
 .IP "tty_tickets" 16
 .IX Item "tty_tickets"
-If set, users must authenticate on a per-tty basis.  Normally,
-\&\fBsudo\fR uses a directory in the ticket dir with the same name as
-the user running it.  With this flag enabled, \fBsudo\fR will use a
-file named for the tty the user is logged in on in that directory.
-This flag is \fI@tty_tickets@\fR by default.
+If set, users must authenticate on a per-tty basis.  With this flag
+enabled, \fBsudo\fR 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
+\&\fI@tty_tickets@\fR by default.
 .IP "umask_override" 16
 .IX Item "umask_override"
 If set, \fBsudo\fR will set the umask as specified by \fIsudoers\fR without
index a8c63a0e5363a12304705130576c169d164b9d16..1a5ab483b0398b8df16b8bc8e7eb879a1372acd6 100644 (file)
@@ -900,11 +900,11 @@ can also be used to list or search the available logs.
 
 =item tty_tickets
 
-If set, users must authenticate on a per-tty basis.  Normally,
-B<sudo> uses a directory in the ticket dir with the same name as
-the user running it.  With this flag enabled, B<sudo> will use a
-file named for the tty the user is logged in on in that directory.
-This flag is I<@tty_tickets@> by default.
+If set, users must authenticate on a per-tty basis.  With this flag
+enabled, B<sudo> 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
+I<@tty_tickets@> by default.
 
 =item umask_override