Lines Matching defs:ngrps
152 int dbmember, i, ngrps;
194 if ((ngrps = getgroups(ngrps_max, (gid_t *)grps)) < 0) {
200 if (grp->gr_gid != egid && inarray(grp->gr_gid, grps, ngrps)) {
201 for (i = 0; i < ngrps; i++)
204 ngrps--;
205 memmove(&grps[i], &grps[i + 1], (ngrps - i) * sizeof(gid_t));
207 if (setgroups(ngrps, (const gid_t *)grps) < 0) {
225 if (egid != grp->gr_gid && !inarray(egid, grps, ngrps)) {
226 if (ngrps == ngrps_max)
229 grps[ngrps++] = egid;
231 if (setgroups(ngrps, (const gid_t *)grps)) {
244 inarray(gid_t gid, const gid_t grps[], int ngrps)
248 for (i = 0; i < ngrps; i++)