From 7e1ab295e943753b00ce8c195b67b11b98ff2523 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 6 Aug 2026 17:04:08 +0200 Subject: [PATCH] Never suggest "sudo -E" 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 --- documentation/asciidoc/computers/configuration/firmware.adoc | 2 +- documentation/asciidoc/computers/raspberry-pi/boot-eeprom.adoc | 2 +- .../asciidoc/computers/raspberry-pi/eeprom-bootloader.adoc | 2 +- documentation/asciidoc/computers/raspberry-pi/rtc.adoc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/asciidoc/computers/configuration/firmware.adoc b/documentation/asciidoc/computers/configuration/firmware.adoc index 9b5c9f531..abd04bfad 100644 --- a/documentation/asciidoc/computers/configuration/firmware.adoc +++ b/documentation/asciidoc/computers/configuration/firmware.adoc @@ -145,7 +145,7 @@ The following commands load the current bootloader configuration into a text edi When the editor is closed, `rpi-eeprom-config` applies the updated configuration to the latest available bootloader release and uses `rpi-eeprom-update` to schedule an update when the system is rebooted: [source,console] ---- -$ sudo -E rpi-eeprom-config --edit +$ sudo --preserve-env=EDITOR rpi-eeprom-config --edit $ sudo reboot ---- diff --git a/documentation/asciidoc/computers/raspberry-pi/boot-eeprom.adoc b/documentation/asciidoc/computers/raspberry-pi/boot-eeprom.adoc index 12400fbde..9e8947dee 100644 --- a/documentation/asciidoc/computers/raspberry-pi/boot-eeprom.adoc +++ b/documentation/asciidoc/computers/raspberry-pi/boot-eeprom.adoc @@ -137,7 +137,7 @@ The following command loads the current bootloader configuration into a text edi [source,console] ---- -$ sudo -E rpi-eeprom-config --edit +$ sudo --preserve-env=EDITOR rpi-eeprom-config --edit $ sudo reboot ---- diff --git a/documentation/asciidoc/computers/raspberry-pi/eeprom-bootloader.adoc b/documentation/asciidoc/computers/raspberry-pi/eeprom-bootloader.adoc index 73cc97197..b2b2e6a95 100644 --- a/documentation/asciidoc/computers/raspberry-pi/eeprom-bootloader.adoc +++ b/documentation/asciidoc/computers/raspberry-pi/eeprom-bootloader.adoc @@ -15,7 +15,7 @@ To edit the current EEPROM configuration and apply the updates to latest EEPROM [source,console] ---- -$ sudo -E rpi-eeprom-config --edit +$ sudo rpi-eeprom-config --edit ---- For more information about the EEPROM update process, see xref:raspberry-pi.adoc#raspberry-pi-boot-eeprom[boot EEPROM]. diff --git a/documentation/asciidoc/computers/raspberry-pi/rtc.adoc b/documentation/asciidoc/computers/raspberry-pi/rtc.adoc index b62720bdf..de7b9f056 100644 --- a/documentation/asciidoc/computers/raspberry-pi/rtc.adoc +++ b/documentation/asciidoc/computers/raspberry-pi/rtc.adoc @@ -13,7 +13,7 @@ To support the low-power mode for wake alarms: + [source,console] ---- -$ sudo -E rpi-eeprom-config --edit +$ sudo rpi-eeprom-config --edit ---- . Add the following two lines.