Commit 996f5337 authored by neilpang's avatar neilpang
Browse files
parent 6f55370a
...@@ -6649,8 +6649,8 @@ _checkSudo() { ...@@ -6649,8 +6649,8 @@ _checkSudo() {
return 0 return 0
fi fi
if [ -n "$SUDO_COMMAND" ]; then if [ -n "$SUDO_COMMAND" ]; then
#it's a normal user doing "sudo su", or `sudo -i` or `sudo -s` #it's a normal user doing "sudo su", or `sudo -i` or `sudo -s`, or `sudo su acmeuser1`
_endswith "$SUDO_COMMAND" /bin/su || grep "^$SUDO_COMMAND\$" /etc/shells >/dev/null 2>&1 _endswith "$SUDO_COMMAND" /bin/su || _contains "$SUDO_COMMAND" "/bin/su " || grep "^$SUDO_COMMAND\$" /etc/shells >/dev/null 2>&1
return $? return $?
fi fi
#otherwise #otherwise
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment