Lines Matching refs:groups
90 if (strcmp(myname, "groups") == 0) {
235 (void)printf("groups\t");
261 (void)printf("groups\t");
274 gid_t *groups;
287 if ((groups = malloc(sizeof(gid_t) * ngroups_max)) == NULL)
292 getgrouplist(pw->pw_name, gid, groups, &ngroups);
295 ngroups = getgroups(ngroups_max, groups);
315 fmt = " groups=%u";
317 if (lastgid == (gid = groups[cnt]))
326 free(groups);
383 gid_t *groups;
387 if ((groups = malloc(sizeof(gid_t) * (ngroups_max))) == NULL)
392 (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
394 ngroups = getgroups(ngroups_max, groups);
398 if (lastid == (id = groups[cnt]))
414 free(groups);
482 (void)fprintf(stderr, "usage: groups [user]\n");