]> granicus.if.org Git - sudo/commitdiff
Move time stamp files from /var/run/sudo to /var/{db,lib,adm}/sudo.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 14 Jul 2010 19:00:52 +0000 (15:00 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 14 Jul 2010 19:00:52 +0000 (15:00 -0400)
--HG--
branch : 1.7

UPGRADE
aclocal.m4
configure
configure.in
sudo.cat
sudo.man.in
sudoers.cat

diff --git a/UPGRADE b/UPGRADE
index 86e646f353bbf835abce6521e5478f6056ba08c9..3e049d22687a152c916dec61e05d1a9f4e41f5c8 100644 (file)
--- a/UPGRADE
+++ b/UPGRADE
@@ -1,9 +1,18 @@
 Notes on upgrading from an older release
 ========================================
 
+o Upgrading from a version prior to 1.7.4:
+
+    Starting with sudo 1.7.4, the time stamp files have moved from
+    /var/run/sudo to either /var/db/sudo, /var/lib/sudo or /var/adm/sudo.
+    The directories are checked for existence in that order.  This
+    prevents users from receiving the sudo lecture every time the
+    system reboots.  Time stamp files older than the boot time are
+    ignored on systems where it is possible to determine this.
+
 o Upgrading from a version prior to 1.7.0:
 
-    Starting with sudo 1.7.0 comments in the sudoers file must not
+    Starting with sudo 1.7.0, comments in the sudoers file must not
     have a digit or minus sign immediately after the comment character
     ('#').  Otherwise, the comment may be interpreted as a user or
     group ID.
@@ -73,8 +82,8 @@ o Upgrading from a version prior to 1.6.9:
 o Upgrading from a version prior to 1.6.8:
 
     Prior to sudo 1.6.8, if /var/run did not exist, sudo would put
-    the timestamp files in /tmp/.odus.  As of sudo 1.6.8, the
-    timestamp files will be placed in /var/adm/sudo or /usr/adm/sudo
+    the time stamp files in /tmp/.odus.  As of sudo 1.6.8, the
+    time stamp files will be placed in /var/adm/sudo or /usr/adm/sudo
     if there is no /var/run directory.  This directory will be
     created if it does not already exist.
 
@@ -117,10 +126,10 @@ o Upgrading from a version prior to 1.6:
        millert ALL=(daemon) NOPASSWD:/usr/bin/whoami, \
            (root) PASSWD:/bin/ls, /sbin/dump
 
-    Additionally, sudo now uses a per-user timestamp directory
-    instead of a timestamp file.  This allows tty timestamps to
-    simply be files within the user's timestamp dir.  For the
-    default, non-tty case, the timestamp on the directory itself
+    Additionally, sudo now uses a per-user time stamp directory
+    instead of a time stamp file.  This allows tty time stamps to
+    simply be files within the user's time stamp dir.  For the
+    default, non-tty case, the time stamp on the directory itself
     is used.
 
     Also, the temporary file used by visudo is now /etc/sudoers.tmp
index 1bf8a0a022595bd51b5471b176eee0e7edd9fc9b..9e6eca8c07bd1d403d8c66c203da1b14e404f8f8 100644 (file)
@@ -101,27 +101,20 @@ fi
 ])dnl
 
 dnl
-dnl Where the timestamp files go, use /var/run/sudo if /var/run exists,
-dnl else /{var,usr}/adm/sudo
+dnl Where the timestamp files go.
 dnl
 AC_DEFUN(SUDO_TIMEDIR, [AC_MSG_CHECKING(for timestamp file location)
-if test -n "$with_timedir"; then
-    AC_MSG_RESULT($with_timedir)
-    SUDO_DEFINE_UNQUOTED(_PATH_SUDO_TIMEDIR, "$with_timedir")
-    timedir="$with_timedir"
-elif test -d "/var/run"; then
-    AC_MSG_RESULT(/var/run/sudo)
-    SUDO_DEFINE(_PATH_SUDO_TIMEDIR, "/var/run/sudo")
-    timedir="/var/run/sudo"
-elif test -d "/var/adm"; then
-    AC_MSG_RESULT(/var/adm/sudo)
-    SUDO_DEFINE(_PATH_SUDO_TIMEDIR, "/var/adm/sudo")
-    timedir="/var/adm/sudo"
-else
-    AC_MSG_RESULT(/usr/adm/sudo)
-    SUDO_DEFINE(_PATH_SUDO_TIMEDIR, "/usr/adm/sudo")
-    timedir="/usr/adm/sudo"
+timedir="$with_timedir"
+if test -z "$timedir"; then
+    for d in /var/db /var/lib /var/adm /usr/adm; do
+       if test -d "$d"; then
+           timedir="$d/sudo"
+           break;
+       fi
+    done
 fi
+AC_MSG_RESULT([$timedir])
+SUDO_DEFINE_UNQUOTED(_PATH_SUDO_TIMEDIR, "$timedir")
 ])dnl
 
 dnl
index 872124f2b2d6002d6097c9d8923b41294e4d416e..086998a485433115311c78380d8de3e7700fc10d 100755 (executable)
--- a/configure
+++ b/configure
@@ -2775,7 +2775,7 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;}
 #
 # Begin initial values for man page substitution
 #
-timedir=/var/run/sudo
+timedir=/var/adm/sudo
 timeout=5
 password_timeout=5
 sudo_umask=0022
@@ -13154,8 +13154,6 @@ done
                CHECKSHADOW="false"
                test -z "$with_pam" && AUTH_EXCL_DEF="PAM"
                : ${with_logincap='yes'}
-               # Apple sudo timedir location
-               : ${with_timedir='/var/db/sudo'}
                ;;
     *-*-nextstep*)
                # lockf() on is broken on the NeXT -- use flock instead
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timestamp file location" >&5
 $as_echo_n "checking for timestamp file location... " >&6; }
-if test -n "$with_timedir"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_timedir" >&5
-$as_echo "$with_timedir" >&6; }
-    cat >>confdefs.h <<EOF
-#define _PATH_SUDO_TIMEDIR "$with_timedir"
-EOF
-
-    timedir="$with_timedir"
-elif test -d "/var/run"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /var/run/sudo" >&5
-$as_echo "/var/run/sudo" >&6; }
-    cat >>confdefs.h <<\EOF
-#define _PATH_SUDO_TIMEDIR "/var/run/sudo"
-EOF
-
-    timedir="/var/run/sudo"
-elif test -d "/var/adm"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /var/adm/sudo" >&5
-$as_echo "/var/adm/sudo" >&6; }
-    cat >>confdefs.h <<\EOF
-#define _PATH_SUDO_TIMEDIR "/var/adm/sudo"
-EOF
-
-    timedir="/var/adm/sudo"
-else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/adm/sudo" >&5
-$as_echo "/usr/adm/sudo" >&6; }
-    cat >>confdefs.h <<\EOF
-#define _PATH_SUDO_TIMEDIR "/usr/adm/sudo"
+timedir="$with_timedir"
+if test -z "$timedir"; then
+    for d in /var/db /var/lib /var/adm /usr/adm; do
+       if test -d "$d"; then
+           timedir="$d/sudo"
+           break;
+       fi
+    done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $timedir" >&5
+$as_echo "$timedir" >&6; }
+cat >>confdefs.h <<EOF
+#define _PATH_SUDO_TIMEDIR "$timedir"
 EOF
 
-    timedir="/usr/adm/sudo"
-fi
 
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for I/O log dir location" >&5
index 2307d4856b77e302dfc146b95ae037d1cfe4b0e2..3ea79a8174fd703d9ecd4363b87669adcbaf0473 100644 (file)
@@ -92,7 +92,7 @@ AC_SUBST([editor])
 #
 # Begin initial values for man page substitution
 #
-timedir=/var/run/sudo
+timedir=/var/adm/sudo
 timeout=5
 password_timeout=5
 sudo_umask=0022
@@ -1763,8 +1763,6 @@ case "$host" in
                CHECKSHADOW="false"
                test -z "$with_pam" && AUTH_EXCL_DEF="PAM"
                : ${with_logincap='yes'}
-               # Apple sudo timedir location
-               : ${with_timedir='/var/db/sudo'}
                ;;
     *-*-nextstep*)
                # lockf() on is broken on the NeXT -- use flock instead
index 5b0d4fb76f7d63b024c384970cc21fd5687da478..951b18278b112817c13cbd9d9b13fa5e58a01536 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.4                     July 12, 2010                         1
+1.7.4                     July 14, 2010                         1
 
 
 
@@ -127,7 +127,7 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
 
 
 
-1.7.4                     July 12, 2010                         2
+1.7.4                     July 14, 2010                         2
 
 
 
@@ -193,7 +193,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
 
-1.7.4                     July 12, 2010                         3
+1.7.4                     July 14, 2010                         3
 
 
 
@@ -259,7 +259,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
 
-1.7.4                     July 12, 2010                         4
+1.7.4                     July 14, 2010                         4
 
 
 
@@ -325,7 +325,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
 
-1.7.4                     July 12, 2010                         5
+1.7.4                     July 14, 2010                         5
 
 
 
@@ -391,7 +391,7 @@ S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY N\bNO\bOT\bTE\bES\bS
 
 
 
-1.7.4                     July 12, 2010                         6
+1.7.4                     July 14, 2010                         6
 
 
 
@@ -426,7 +426,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
        program that s\bsu\bud\bdo\bo executes.
 
        s\bsu\bud\bdo\bo will check the ownership of its time stamp directory
-       (_\b/_\bv_\ba_\br_\b/_\br_\bu_\bn_\b/_\bs_\bu_\bd_\bo by default) and ignore the directory's contents if it is
+       (_\b/_\bv_\ba_\br_\b/_\ba_\bd_\bm_\b/_\bs_\bu_\bd_\bo by default) and ignore the directory's contents if it is
        not owned by root or if it is writable by a user other than root.  On
        systems that allow non-root users to give away files via _\bc_\bh_\bo_\bw_\bn(2), if
        the time stamp directory is located in a directory writable by anyone
@@ -438,7 +438,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
        by root and inaccessible by any other user, the user placing files
        there would be unable to get them back out.  To get around this issue
        you can use a directory that is not world-writable for the time stamps
-       (_\b/_\bv_\ba_\br_\b/_\ba_\bd_\bm_\b/_\bs_\bu_\bd_\bo for instance) or create _\b/_\bv_\ba_\br_\b/_\br_\bu_\bn_\b/_\bs_\bu_\bd_\bo with the
+       (_\b/_\bv_\ba_\br_\b/_\ba_\bd_\bm_\b/_\bs_\bu_\bd_\bo for instance) or create _\b/_\bv_\ba_\br_\b/_\ba_\bd_\bm_\b/_\bs_\bu_\bd_\bo with the
        appropriate owner (root) and permissions (0700) in the system startup
        files.
 
@@ -457,7 +457,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
 
-1.7.4                     July 12, 2010                         7
+1.7.4                     July 14, 2010                         7
 
 
 
@@ -523,7 +523,7 @@ E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
 
 
 
-1.7.4                     July 12, 2010                         8
+1.7.4                     July 14, 2010                         8
 
 
 
@@ -543,7 +543,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 F\bFI\bIL\bLE\bES\bS
        _\b/_\be_\bt_\bc_\b/_\bs_\bu_\bd_\bo_\be_\br_\bs            List of who can run what
 
-       _\b/_\bv_\ba_\br_\b/_\br_\bu_\bn_\b/_\bs_\bu_\bd_\bo           Directory containing time stamps
+       _\b/_\bv_\ba_\br_\b/_\ba_\bd_\bm_\b/_\bs_\bu_\bd_\bo           Directory containing time stamps
 
        _\b/_\be_\bt_\bc_\b/_\be_\bn_\bv_\bi_\br_\bo_\bn_\bm_\be_\bn_\bt        Initial environment for -\b-i\bi mode on Linux and
                                AIX
@@ -589,7 +589,7 @@ S\bSE\bEE\bE A\bAL\bLS\bSO\bO
 
 
 
-1.7.4                     July 12, 2010                         9
+1.7.4                     July 14, 2010                         9
 
 
 
@@ -655,6 +655,6 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
 
 
 
-1.7.4                     July 12, 2010                        10
+1.7.4                     July 14, 2010                        10
 
 
index 9f873c4eead2d34c9cacb3868995df9d46ccb089..e58aa1d600b7cbf6cd7a155d4eda9c6e903e9696 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "SUDO @mansectsu@"
-.TH SUDO @mansectsu@ "July 12, 2010" "1.7.4" "MAINTENANCE COMMANDS"
+.TH SUDO @mansectsu@ "July 14, 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
index 037afadebbab8d0518173ec202a26c9310bf5780..211a66daa0e4fc34a7dde5ad83e259adc2e10314 100644 (file)
@@ -1108,7 +1108,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
                        interpreted.  Defaults to "C".
 
        timestampdir    The directory in which s\bsu\bud\bdo\bo stores its timestamp files.
-                       The default is _\b/_\bv_\ba_\br_\b/_\br_\bu_\bn_\b/_\bs_\bu_\bd_\bo.
+                       The default is _\b/_\bv_\ba_\br_\b/_\ba_\bd_\bm_\b/_\bs_\bu_\bd_\bo.
 
        timestampowner  The owner of the timestamp directory and the timestamps
                        stored therein.  The default is root.