shadowbrokers-exploits/windows/Resources/Dsz/Scripts/Include/unix/_ProcessesUnix.dsi

21 lines
498 B
Text
Raw Normal View History

@include "_Users.dsi";
#-------------------------------------------------------------------------------
# _IsProcessRunningAsRoot
# Determines whether the current process is running as root
#-------------------------------------------------------------------------------
Sub _IsProcessRunningAsRoot()
{
string $user;
if (_GetCurrentUser($user) &&
defined($user) &&
($user == "root")) {
return true;
} else {
return false;
}
} /* END _IsProcessRunningAsRoot */