2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Fix details of how EDITOR, VISUAL and SUDO_EDITOR are (or are not) preserved.

The description in the editor option was incorrect and didn't mention env_keep.
Reported by Sander Bos
This commit is contained in:
Todd C. Miller 2019-06-20 11:05:15 -06:00
parent a193f39c83
commit 6fe2223298
6 changed files with 40 additions and 25 deletions

View File

@ -1669,9 +1669,10 @@ SSUUDDOOEERRSS OOPPTTIIOONNSS
VISUAL or EDITOR environment variable if possible, or
the first editor in the list that exists and is
executable if not. Unless invoked as ssuuddooeeddiitt, ssuuddoo
does not preserve the SUDO_EDITOR, VISUAL and EDITOR
environment variables by default, even when the
_e_n_v___r_e_s_e_t option is enabled. The default is _v_i.
does not preserve the SUDO_EDITOR, VISUAL or EDITOR
environment variables unless they are present in the
_e_n_v___k_e_e_p list or the _e_n_v___r_e_s_e_t option is disabled. The
default is _v_i.
iolog_dir The top-level directory to use when constructing the
path name for the input/output log directory. Only
@ -2951,4 +2952,4 @@ DDIISSCCLLAAIIMMEERR
file distributed with ssuuddoo or https://www.sudo.ws/license.html for
complete details.
Sudo 1.8.28 June 19, 2019 Sudo 1.8.28
Sudo 1.8.28 June 20, 2019 Sudo 1.8.28

View File

@ -25,7 +25,7 @@
.nr BA @BAMAN@
.nr LC @LCMAN@
.nr PS @PSMAN@
.TH "SUDOERS" "@mansectform@" "June 19, 2019" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
.TH "SUDOERS" "@mansectform@" "June 20, 2019" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
.nh
.if n .ad l
.SH "NAME"
@ -3453,11 +3453,13 @@ Unless invoked as
does not preserve the
\fRSUDO_EDITOR\fR,
\fRVISUAL\fR
and
or
\fREDITOR\fR
environment variables by default, even when the
environment variables unless they are present in the
\fIenv_keep\fR
list or the
\fIenv_reset\fR
option is enabled.
option is disabled.
The default is
\fI@editor@\fR.
.TP 18n

View File

@ -24,7 +24,7 @@
.nr BA @BAMAN@
.nr LC @LCMAN@
.nr PS @PSMAN@
.Dd June 19, 2019
.Dd June 20, 2019
.Dt SUDOERS @mansectform@
.Os Sudo @PACKAGE_VERSION@
.Sh NAME
@ -3255,11 +3255,13 @@ Unless invoked as
does not preserve the
.Ev SUDO_EDITOR ,
.Ev VISUAL
and
or
.Ev EDITOR
environment variables by default, even when the
environment variables unless they are present in the
.Em env_keep
list or the
.Em env_reset
option is enabled.
option is disabled.
The default is
.Pa @editor@ .
.It iolog_dir

View File

@ -32,11 +32,11 @@ DDEESSCCRRIIPPTTIIOONN
vviissuuddoo. vviissuuddoo will choose the editor that matches the user's
SUDO_EDITOR, VISUAL or EDITOR environment variable if possible,
or the first editor in the list that exists and is executable.
Note that the SUDO_EDITOR, VISUAL and EDITOR environment
variables are not preserved by default when the _e_n_v___r_e_s_e_t
_s_u_d_o_e_r_s option is enabled. The default editor path is _v_i which
can be set at compile time via the --with-editor configure
option.
Note that ssuuddoo does not preserve the SUDO_EDITOR, VISUAL or
EDITOR environment variables unless they are present in the
_e_n_v___k_e_e_p list or the _e_n_v___r_e_s_e_t option is disabled in the
_s_u_d_o_e_r_s file. The default editor path is _v_i which can be set
at compile time via the --with-editor configure option.
env_editor
If set, vviissuuddoo will use the value of the SUDO_EDITOR, VISUAL or

View File

@ -101,15 +101,20 @@ or
\fREDITOR\fR
environment variable if possible, or the first editor in the
list that exists and is executable.
Note that the
Note that
\fBsudo\fR
does not preserve the
\fRSUDO_EDITOR\fR,
\fRVISUAL\fR
and
or
\fREDITOR\fR
environment variables are not preserved by default when the
environment variables unless they are present in the
\fIenv_keep\fR
list or the
\fIenv_reset\fR
option is disabled in the
\fIsudoers\fR
option is enabled.
file.
The default editor path is
\fI@editor@\fR
which can be set at compile time via the

View File

@ -99,15 +99,20 @@ or
.Ev EDITOR
environment variable if possible, or the first editor in the
list that exists and is executable.
Note that the
Note that
.Nm sudo
does not preserve the
.Ev SUDO_EDITOR ,
.Ev VISUAL
and
or
.Ev EDITOR
environment variables are not preserved by default when the
environment variables unless they are present in the
.Em env_keep
list or the
.Em env_reset
option is disabled in the
.Em sudoers
option is enabled.
file.
The default editor path is
.Pa @editor@
which can be set at compile time via the