Use /run in preference to /var/run if it exists.

Bug #822
This commit is contained in:
Todd C. Miller
2018-02-19 10:59:12 -07:00
parent 59086e9c8a
commit 525c6a3d94
7 changed files with 18 additions and 14 deletions

View File

@@ -134,11 +134,11 @@ Directory and file names:
do not survive a system reboot. This is typically where
the time stamp directory is located. By default, configure
will use the first existing directory in the following list:
/var/run, /var/db, /var/lib, /var/adm, /usr/adm
/run /var/run, /var/db, /var/lib, /var/adm, /usr/adm
This directory should be cleared when the system reboots.
On systems that lack /var/run, the default rundir and vardir
may be the same. In this case, only the ts directory inside
the rundir needs to be cleared at boot time.
On systems that lack /run or /var/run, the default rundir and
vardir may be the same. In this case, only the ts directory
inside the rundir needs to be cleared at boot time.
--with-vardir=DIR
Set the directory to be used for sudo-specific files that

4
configure vendored
View File

@@ -25259,7 +25259,7 @@ fi
$as_echo_n "checking for sudo run dir location... " >&6; }
rundir="$with_rundir"
if test -z "$rundir"; then
for d in /var/run /var/db /var/lib /var/adm /usr/adm; do
for d in /run /var/run /var/db /var/lib /var/adm /usr/adm; do
if test -d "$d"; then
rundir="$d/sudo"
break
@@ -28659,7 +28659,7 @@ $as_echo "$as_me: You will need to customize examples/pam.conf and install it as
esac
fi
case "$rundir" in
/var/run*)
/run/*|/var/run/*)
clear_rundir=0
;;
*)

View File

@@ -4382,7 +4382,7 @@ dnl
dnl Warn user if they may need to clear rundir manually.
dnl
case "$rundir" in
/var/run*)
/run/*|/var/run/*)
clear_rundir=0
;;
*)

View File

@@ -2766,9 +2766,9 @@ SSEECCUURRIITTYY NNOOTTEESS
ownership of files they create.
While the time stamp directory _s_h_o_u_l_d be cleared at reboot time, not all
systems contain a _/_v_a_r_/_r_u_n directory. To avoid potential problems,
ssuuddooeerrss will ignore time stamp files that date from before the machine
booted on systems where the boot time is available.
systems contain a _/_r_u_n or _/_v_a_r_/_r_u_n directory. To avoid potential
problems, ssuuddooeerrss will ignore time stamp files that date from before the
machine booted on systems where the boot time is available.
Some systems with graphical desktop environments allow unprivileged users
to change the system clock. Since ssuuddooeerrss relies on the system clock for
@@ -2897,4 +2897,4 @@ DDIISSCCLLAAIIMMEERR
file distributed with ssuuddoo or https://www.sudo.ws/license.html for
complete details.
Sudo 1.8.23 January 30, 2018 Sudo 1.8.23
Sudo 1.8.23 February 19, 2018 Sudo 1.8.23

View File

@@ -21,7 +21,7 @@
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
.TH "SUDOERS" "5" "January 30, 2018" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
.TH "SUDOERS" "5" "February 19, 2018" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
.nh
.if n .ad l
.SH "NAME"
@@ -5484,6 +5484,8 @@ unprivileged users to change the ownership of files they create.
While the time stamp directory
\fIshould\fR
be cleared at reboot time, not all systems contain a
\fI/run\fR
or
\fI/var/run\fR
directory.
To avoid potential problems,

View File

@@ -19,7 +19,7 @@
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
.Dd January 30, 2018
.Dd February 19, 2018
.Dt SUDOERS @mansectform@
.Os Sudo @PACKAGE_VERSION@
.Sh NAME
@@ -5075,6 +5075,8 @@ unprivileged users to change the ownership of files they create.
While the time stamp directory
.Em should
be cleared at reboot time, not all systems contain a
.Pa /run
or
.Pa /var/run
directory.
To avoid potential problems,

View File

@@ -108,7 +108,7 @@ dnl
AC_DEFUN([SUDO_RUNDIR], [AC_MSG_CHECKING(for sudo run dir location)
rundir="$with_rundir"
if test -z "$rundir"; then
for d in /var/run /var/db /var/lib /var/adm /usr/adm; do
for d in /run /var/run /var/db /var/lib /var/adm /usr/adm; do
if test -d "$d"; then
rundir="$d/sudo"
break