commit | 91ec53d1a811594976df4811a43113a0913da222 | [log] [tgz] |
---|---|---|
author | Garrett Cooper <yanegomi@gmail.com> | Sun Mar 07 14:19:11 2010 -0800 |
committer | Garrett Cooper <yanegomi@gmail.com> | Sun Mar 07 14:19:11 2010 -0800 |
tree | 89f99a68b0cf7c1816c3018c987bd16d1e1f7c23 | |
parent | 373c91c072a7a85dfe2719dc8dee4e8cdd066d94 [diff] |
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>