The description in the editor option was incorrect and didn't mention env_keep.
Reported by Sander Bos
VISUAL or EDITOR environment variable if possible, or
the first editor in the list that exists and is
executable if not. Unless invoked as s\bsu\bud\bdo\boe\bed\bdi\bit\bt, s\bsu\bud\bdo\bo
- does not preserve the SUDO_EDITOR, VISUAL and EDITOR
- environment variables by default, even when the
- _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt option is enabled. The default is _\bv_\bi.
+ does not preserve the SUDO_EDITOR, VISUAL or EDITOR
+ environment variables unless they are present in the
+ _\be_\bn_\bv_\b__\bk_\be_\be_\bp list or the _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt option is disabled. The
+ default is _\bv_\bi.
iolog_dir The top-level directory to use when constructing the
path name for the input/output log directory. Only
file distributed with s\bsu\bud\bdo\bo 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
.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"
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
.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
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
v\bvi\bis\bsu\bud\bdo\bo. v\bvi\bis\bsu\bud\bdo\bo 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 _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt
- _\bs_\bu_\bd_\bo_\be_\br_\bs option is enabled. The default editor path is _\bv_\bi which
- can be set at compile time via the --with-editor configure
- option.
+ Note that s\bsu\bud\bdo\bo does not preserve the SUDO_EDITOR, VISUAL or
+ EDITOR environment variables unless they are present in the
+ _\be_\bn_\bv_\b__\bk_\be_\be_\bp list or the _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt option is disabled in the
+ _\bs_\bu_\bd_\bo_\be_\br_\bs file. The default editor path is _\bv_\bi which can be set
+ at compile time via the --with-editor configure option.
env_editor
If set, v\bvi\bis\bsu\bud\bdo\bo will use the value of the SUDO_EDITOR, VISUAL 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
.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