Never suggest "sudo -E" - #4323
Conversation
Passing the full environment from the user session to the root session is seen as potential privacy and security issue. If a particular environment variable is intended to be passed through, `sudo --preserve-env=VAR` can be used, or `sudo VAR=value` to set it explicitly. The prior is used in the two cases, where the `EDITOR` environment variable is mentioned in the context. Signed-off-by: MichaIng <micha@dietpi.com>
|
HI @MichaIng Thank you for your contribution. I'll check with our engineers which variables need to be passed in some of these cases and we'll progress these updates to publish shortly. |
|
Thanks for the hint, which confirms that it is about the sudo EDITOR=vi rpi-eeprom-config --editto set it directly? Wording could be aligned and changed to something like
|
|
There are some other places in the docs where we already listed this command without -E. So I'm wondering if telling folks how to set their editor is beyond our scope here. Perhaps best to just have the simplest version of the command consistently throughout? ( |
|
Being a Regarding how to pass the environment variable through |
Passing the full environment from the user session to the root session is seen as potential privacy and security issue.
If a particular environment variable is intended to be passed through,
sudo --preserve-env=VARcan be used, orsudo VAR=valueto set it explicitly. The prior is used in the two cases, where theEDITORenvironment variable is mentioned in the context.