joyent/node — pull request #4025 by jrozner (2012-09-15 01:02:11+00:00)
Title: add proper group dropping for *nix

setgid only drops the gid rather than the supplementary groups as well. Using initgroups() will set the supplementary groups so that the process will not have the supplementary groups of the user that it was dropped from (usually root) resulting in ensuring that it only has the permissions intended.