Our sudo executable would be owned by root with the setuid bit. The executable would do 2 things:
- check if the user is allowed
Normally this would allow a normal user to run a program as root. The problem is how to check if the user is allowed, since we are root at startup due to setuid and therefore don't know who is the user?