Partially revert r226274, the old code was right.

This commit is contained in:
delphij 2011-10-16 07:05:43 +00:00
parent 1e6760c16a
commit 3192efecae

View File

@ -220,7 +220,7 @@ addgroup(const char *grpname)
/* Add old effective gid to supp. list if it does not exist. */
if (egid != grp->gr_gid && !inarray(egid, grps, ngrps)) {
if (ngrps + 1 >= ngrps_max)
if (ngrps == ngrps_max)
warnx("too many groups");
else {
grps[ngrps++] = egid;