]> granicus.if.org Git - sudo/commitdiff
sudoedit should be used for editing files instead of "sudo editor"
authorTodd C. Miller <Todd.Miller@sudo.ws>
Fri, 21 Jun 2019 20:54:09 +0000 (14:54 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Fri, 21 Jun 2019 20:54:09 +0000 (14:54 -0600)
That way the user's editor config files are used by the editor.

doc/TROUBLESHOOTING
doc/sudoers.man.in
doc/sudoers.mdoc.in

index d436dc450a192cd53f8bfa4cf2d5a90f39c6fcf0..817f7deebfb09d10c2c47c07f4a846db69ebf42c 100644 (file)
@@ -137,7 +137,9 @@ A) Many programs use the HOME environment variable to locate
 
    While it is possible to preserve the value of the HOME environment
    variable by adding it to the "env_keep" list in the sudoers file,
-   doing so is strongly discouraged.
+   doing so is strongly discouraged.  Users wishing to edit files
+   with sudo should run sudoedit (or sudo -e) to get their accustomed
+   editor configuration instead of invoking the editor directly.
 
 Q) How can I keep sudo from asking for a password?
 A) To specify this on a per-user (and per-command) basis, use the
index d8be52feb9179defed7582381a6c82d670b3ca08..31986c82368ce7482188dd1267e4ad8c13528ea6 100644 (file)
@@ -25,7 +25,7 @@
 .nr BA @BAMAN@
 .nr LC @LCMAN@
 .nr PS @PSMAN@
-.TH "SUDOERS" "@mansectform@" "June 20, 2019" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
+.TH "SUDOERS" "@mansectform@" "June 21, 2019" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
 .nh
 .if n .ad l
 .SH "NAME"
@@ -4384,7 +4384,7 @@ option.
 Preserving the
 \fRHOME\fR
 environment variable has security implications since many programs use it
-when searching for configuration files.
+when searching for configuration or data files.
 Adding
 \fRHOME\fR
 to
@@ -4392,6 +4392,14 @@ to
 may enable a user to run unrestricted commands via
 \fBsudo\fR
 and is strongly discouraged.
+Users wishing to edit files with
+\fBsudo\fR
+should run
+\fBsudoedit\fR
+(or
+\fBsudo\fR \fB\-e\fR)
+to get their accustomed editor configuration instead of
+invoking the editor directly.
 .SH "GROUP PROVIDER PLUGINS"
 The
 \fBsudoers\fR
index add04fdb9225d4e72c16b6c549a0c700f225bae0..c0a3bba4493355a91a94d2b41529511730e977bd 100644 (file)
@@ -24,7 +24,7 @@
 .nr BA @BAMAN@
 .nr LC @LCMAN@
 .nr PS @PSMAN@
-.Dd June 20, 2019
+.Dd June 21, 2019
 .Dt SUDOERS @mansectform@
 .Os Sudo @PACKAGE_VERSION@
 .Sh NAME
@@ -4089,7 +4089,7 @@ option.
 Preserving the
 .Ev HOME
 environment variable has security implications since many programs use it
-when searching for configuration files.
+when searching for configuration or data files.
 Adding
 .Ev HOME
 to
@@ -4097,6 +4097,14 @@ to
 may enable a user to run unrestricted commands via
 .Nm sudo
 and is strongly discouraged.
+Users wishing to edit files with
+.Nm sudo
+should run
+.Nm sudoedit
+(or
+.Nm sudo Fl e )
+to get their accustomed editor configuration instead of
+invoking the editor directly.
 .El
 .Sh GROUP PROVIDER PLUGINS
 The