mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-25 22:27:34 +00:00
fix sudo execution (patch by robertmx in #223)
tested also in #228, this stops overwriting the $USERNAME variable which is not really useful (it was used in the previous privilege escalation model)
This commit is contained in:
parent
7e88c5d07b
commit
844a886da1
8
tomb
8
tomb
@ -210,10 +210,10 @@ _whoami() {
|
|||||||
_verbose "Identified caller: ::1 username:: (::2 UID:::::3 GID::)" $_USER $_UID $_GID
|
_verbose "Identified caller: ::1 username:: (::2 UID:::::3 GID::)" $_USER $_UID $_GID
|
||||||
|
|
||||||
# Update USERNAME accordingly if possible
|
# Update USERNAME accordingly if possible
|
||||||
[[ $EUID == 0 && $_USER != $USERNAME ]] && {
|
# [[ $EUID == 0 && $_USER != $USERNAME ]] && {
|
||||||
_verbose "Updating USERNAME from '::1 USERNAME::' to '::2 _USER::')" $USERNAME $_USER
|
# _verbose "Updating USERNAME from '::1 USERNAME::' to '::2 _USER::')" $USERNAME $_USER
|
||||||
USERNAME=$_USER
|
# USERNAME=$_USER
|
||||||
}
|
# }
|
||||||
|
|
||||||
# Force HOME to _USER's HOME if necessary
|
# Force HOME to _USER's HOME if necessary
|
||||||
local home=$(awk -F: "/^$_USER:/ { print \$6 }" /etc/passwd 2>/dev/null)
|
local home=$(awk -F: "/^$_USER:/ { print \$6 }" /etc/passwd 2>/dev/null)
|
||||||
|
Loading…
Reference in New Issue
Block a user