On 2007/01/22 12:19, Alexander Farber wrote:
> 5) Finally call setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid)
>    and setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)
> 
> 1) Can't a compromised process change back to its saved root uid?

setresuid/setresgid: set real, effective, *and saved* uid/gid

> 2) Why is setresuid() used and not setuid()?

to set the saved uid, so there isn't a saved root uid to change back to.

Reply via email to