mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +00:00
Meta: Don't depend on sudo for privileged operations
We previously depended on sudo's specific -E flag to keep all the environment variables when performing a privilege escalation. We now incorporate the -E flag into the $SUDO variable, allowing for other privilege escalation binaries (such as doas) to be used (as long as they preserve the current environment variables).
This commit is contained in:
parent
7a51e846b2
commit
88c9e4f3b0
6 changed files with 10 additions and 7 deletions
|
@ -25,7 +25,7 @@ if [ "$(id -u)" != 0 ]; then
|
|||
USE_FUSE2FS=1
|
||||
else
|
||||
set +e
|
||||
${SUDO} -E -- sh -c "\"$0\" $* || exit 42"
|
||||
${SUDO} -- sh -c "\"$0\" $* || exit 42"
|
||||
case $? in
|
||||
1)
|
||||
die "this script needs to run as root"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue