mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-12-24 12:14:23 +08:00
support `sudo -i` and `sudo -s`
This commit is contained in:
4
acme.sh
4
acme.sh
@@ -6246,8 +6246,8 @@ _checkSudo() {
|
||||
#it's root using sudo, no matter it's using sudo or not, just fine
|
||||
return 0
|
||||
fi
|
||||
if [ "$SUDO_COMMAND" = "/bin/su" ]; then
|
||||
#it's a normal user doing "sudo su"
|
||||
if [ "$SUDO_COMMAND" = "/bin/su" ] || [ "$SUDO_COMMAND" = "/bin/bash" ]; then
|
||||
#it's a normal user doing "sudo su", or `sudo -i` or `sudo -s`
|
||||
#fine
|
||||
return 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user