svn commit: r226416 - head/usr.bin/newgrp
Xin LI
delphij at FreeBSD.org
Sun Oct 16 07:05:43 UTC 2011
Author: delphij
Date: Sun Oct 16 07:05:43 2011
New Revision: 226416
URL: http://svn.freebsd.org/changeset/base/226416
Log:
Partially revert r226274, the old code was right.
Modified:
head/usr.bin/newgrp/newgrp.c
Modified: head/usr.bin/newgrp/newgrp.c
==============================================================================
--- head/usr.bin/newgrp/newgrp.c Sun Oct 16 05:37:56 2011 (r226415)
+++ head/usr.bin/newgrp/newgrp.c Sun Oct 16 07:05:43 2011 (r226416)
@@ -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;
More information about the svn-src-all
mailing list