A small utility program that sets up a new pid namespace and starts a process within that. Needs root via suid bit but later drops root priviliges to calling user.
MadMaurice
650a576c56
seteuid sets the effective uid but at the same time retains the old effective uid as a so called saved uid, which allows the process to go back to root at a later point in time. As we don't want that, we use the function setresuid and setresgid instead, allowing to set the real, effective and saved uid/gid. We keep the real uid/gid unchanged, but set the effective and saved uid/gid to the value of the real uid. This forbids us to not regain root priviliges. |
||
---|---|---|
.gitignore | ||
main.c | ||
Makefile |