m...@netbsd.org writes: > On Wed, Feb 06, 2019 at 12:56:57PM -0500, Christos Zoulas wrote: > D.org> > > @@ -66,7 +66,7 @@ crgetgroups(cred_t *cr) > > { > > static gid_t gids[NGROUPS_MAX]; > > I feel uncomfortable seeing unnecessary use of static. > (I find it too magical) > > What do others think? > > > > > - memset(gids, 0, NGROUPS_MAX); > > + memset(gids, 0, sizeof(gids)); > > if (kauth_cred_getgroups(cr, gids, NGROUPS_MAX, UIO_SYSSPACE) != 0) > > return NULL;
in particular, it seems broken because concurrent users will stomp over each other, but i couldn't figure out the paths that lead to this code easily. .mrg.