as_root()
{
if [ $EUID = 0 ]; then $*
elif [ -x /usr/bin/sudo ]; then sudo $*
else su -c \\"$*\\"
fi
}
export -f as_root
Created
October 19, 2021 19:32
-
-
Save stephen-hannam/1d6ae9544ec9acf2fedb67e087b9efac to your computer and use it in GitHub Desktop.
Procedural Privilege Escalation (as seen in LFS)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment