Correct setuid() logic for "nobody" uid.

The problem with the previous logic is that it was incorrectly hardcoding uid_t -> 99 for nobody, and thus on systems with nobody -> 65535, this is incorrect. Use getpwnam(3) to derive the correct value for the nobody's uid_t.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
2 files changed