Lines Matching refs:groups
120 static int get_groups(const char *username, gid_t rgid, gid_t *groups, int *n) in get_groups() argument
128 m = getgrouplist(username, rgid, groups, n); in get_groups()
136 *n = getgroups(*n, groups); in get_groups()
141 *n = getgroups(0, groups); /* get needed *n */ in get_groups()
196 gid_t *groups; in id_main() local
216 groups = xmalloc(64 * sizeof(groups[0])); in id_main()
218 if (get_groups(username, rgid, groups, &n) < 0) { in id_main()
220 groups = xrealloc(groups, n * sizeof(groups[0])); in id_main()
221 get_groups(username, rgid, groups, &n); in id_main()
227 if (opt && (groups[i] == rgid || groups[i] == egid)) in id_main()
229 status |= print_group(groups[i], opt ? " " : prefix); in id_main()
238 free(groups); in id_main()