From: Todd C. Miller Date: Wed, 18 Apr 2018 15:40:48 +0000 (-0600) Subject: Document that the editor setting is also used by sudoedit. X-Git-Tag: SUDO_1_8_23^2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3194a00e9e9fd47d99ba90fc69cd2bd266e32e12;p=sudo Document that the editor setting is also used by sudoedit. --- diff --git a/doc/sudoers.cat b/doc/sudoers.cat index 8c2f8b980..6ea4e2102 100644 --- a/doc/sudoers.cat +++ b/doc/sudoers.cat @@ -1623,13 +1623,18 @@ SSUUDDOOEERRSS OOPPTTIIOONNSS password. The default is Sorry, try again. unless insults are enabled. - editor A colon (`:') separated list of editors allowed to be - used with 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 + editor A colon (`:') separated list of editors path names used + by ssuuddooeeddiitt and vviissuuddoo. For ssuuddooeeddiitt, this list is + used to find an editor when none of the SUDO_EDITOR, + VISUAL or EDITOR environment variables are set to an + editor that exists and is executable. For vviissuuddoo, it + is used as a white list of allowed editors; 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 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. iolog_dir The top-level directory to use when constructing the @@ -2908,4 +2913,4 @@ DDIISSCCLLAAIIMMEERR file distributed with ssuuddoo or https://www.sudo.ws/license.html for complete details. -Sudo 1.8.23 March 21, 2018 Sudo 1.8.23 +Sudo 1.8.23 April 17, 2018 Sudo 1.8.23 diff --git a/doc/sudoers.man.in b/doc/sudoers.man.in index 165d6a1da..12fecc8b7 100644 --- a/doc/sudoers.man.in +++ b/doc/sudoers.man.in @@ -21,7 +21,29 @@ .\" Agency (DARPA) and Air Force Research Laboratory, Air Force .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" -.TH "SUDOERS" "5" "March 21, 2018" "Sudo @PACKAGE_VERSION@" "File Formats Manual" +.\" Automatically generated from an mdoc input file. Do not edit. +.\" +.\" Copyright (c) 1994-1996, 1998-2005, 2007-2018 +.\" Todd C. Miller +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" Sponsored in part by the Defense Advanced Research Projects +.\" Agency (DARPA) and Air Force Research Laboratory, Air Force +.\" Materiel Command, USAF, under agreement number F39502-99-1-0512. +.\" +.TH "SUDOERS" "5" "April 17, 2018" "Sudo @PACKAGE_VERSION@" "File Formats Manual" .nh .if n .ad l .SH "NAME" @@ -3327,8 +3349,21 @@ unless insults are enabled. editor A colon (\(oq:\&\(cq) -separated list of editors allowed to be used with +separated list of editors path names used by +\fBsudoedit\fR +and \fBvisudo\fR. +For +\fBsudoedit\fR, +this list is used to find an editor when none of the +\fRSUDO_EDITOR\fR, +\fRVISUAL\fR +or +\fREDITOR\fR +environment variables are set to an editor that exists and is executable. +For +\fBvisudo\fR, +it is used as a white list of allowed editors; \fBvisudo\fR will choose the editor that matches the user's \fRSUDO_EDITOR\fR, @@ -3336,13 +3371,16 @@ will choose the editor that matches the user's or \fREDITOR\fR environment variable if possible, or the first editor in the -list that exists and is executable. -Note that the +list that exists and is executable if not. +Unless invoked as +\fBsudoedit\fR, +\fBsudo\fR +does not preserve the \fRSUDO_EDITOR\fR, \fRVISUAL\fR and \fREDITOR\fR -environment variables are not preserved by default when the +environment variables by default, even when the \fIenv_reset\fR option is enabled. The default is diff --git a/doc/sudoers.mdoc.in b/doc/sudoers.mdoc.in index 443a6da84..c63ba4b24 100644 --- a/doc/sudoers.mdoc.in +++ b/doc/sudoers.mdoc.in @@ -19,7 +19,7 @@ .\" Agency (DARPA) and Air Force Research Laboratory, Air Force .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" -.Dd March 21, 2018 +.Dd April 17, 2018 .Dt SUDOERS @mansectform@ .Os Sudo @PACKAGE_VERSION@ .Sh NAME @@ -3129,8 +3129,21 @@ unless insults are enabled. .It editor A colon .Pq Ql :\& -separated list of editors allowed to be used with +separated list of editors path names used by +.Nm sudoedit +and .Nm visudo . +For +.Nm sudoedit , +this list is used to find an editor when none of the +.Ev SUDO_EDITOR , +.Ev VISUAL +or +.Ev EDITOR +environment variables are set to an editor that exists and is executable. +For +.Nm visudo , +it is used as a white list of allowed editors; .Nm visudo will choose the editor that matches the user's .Ev SUDO_EDITOR , @@ -3138,13 +3151,16 @@ will choose the editor that matches the user's or .Ev EDITOR environment variable if possible, or the first editor in the -list that exists and is executable. -Note that the +list that exists and is executable if not. +Unless invoked as +.Nm sudoedit , +.Nm sudo +does not preserve the .Ev SUDO_EDITOR , .Ev VISUAL and .Ev EDITOR -environment variables are not preserved by default when the +environment variables by default, even when the .Em env_reset option is enabled. The default is