Marc and I also discussed this on IRC wrt setgroups(0, NULL) and initgroups() to the user's groups. IME, if the requirements/expectations of the code in question is fine with just the primary group, setgroups(0, NULL) is safest, but if that isn't the case, we should consider initgroups.
Marc and I also discussed this on IRC wrt setgroups(0, NULL) and initgroups() to the user's groups. IME, if the requirements/ expectations of the code in question is fine with just the primary group, setgroups(0, NULL) is safest, but if that isn't the case, we should consider initgroups.