neil
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
acme.sh
|
|
@ -6448,10 +6448,10 @@ _checkSudo() { |
|
|
|
#it's root using sudo, no matter it's using sudo or not, just fine |
|
|
|
return 0 |
|
|
|
fi |
|
|
|
if [ "$SUDO_COMMAND" = "/bin/su" ] || [ "$SUDO_COMMAND" = "/bin/bash" ]; then |
|
|
|
if [ -n "$SUDO_COMMAND" ]; then |
|
|
|
#it's a normal user doing "sudo su", or `sudo -i` or `sudo -s` |
|
|
|
#fine |
|
|
|
return 0 |
|
|
|
_endswith "$SUDO_COMMAND" /bin/su || grep "^$SUDO_COMMAND\$" /etc/shells >/dev/null 2>&1 |
|
|
|
return $? |
|
|
|
fi |
|
|
|
#otherwise |
|
|
|
return 1 |
|
|
|