Lines Matching refs:groups
92 gid_t *groups);
278 * Get effective group ID. The "egid" is groups[0], and could be obtained
808 gid_t *groups;
817 groups = malloc(gidsetsize * sizeof(gid_t), M_TEMP, M_WAITOK);
819 groups = smallgroups;
821 error = copyin(uap->gidset, groups, gidsetsize * sizeof(gid_t));
823 error = kern_setgroups(td, gidsetsize, groups);
826 free(groups, M_TEMP);
831 kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups)
838 AUDIT_ARG_GROUPSET(groups, ngrp);
845 error = mac_cred_check_setgroups(oldcred, ngrp, groups);
857 * groups vector on non-BSD systems (which generally do not
858 * have the egid in the groups[0]). We risk security holes
863 crsetgroups_locked(newcred, ngrp, groups);
1281 * of the supplemental groups. This is possible because we
1282 * sort the groups in crsetgroups().
1979 int groups;
1985 groups = oldcred->cr_agroups;
1987 crextend(cr, groups);
2010 * allocator until we need enough groups to fill a page.
2014 * a real world process that adds thousands of groups one at a
2037 * Copy groups in to a credential, preserving any necessary invariants.
2043 crsetgroups_locked(struct ucred *cr, int ngrp, gid_t *groups)
2051 bcopy(groups, cr->cr_groups, ngrp * sizeof(gid_t));
2055 * Sort all groups except cr_groups[0] to allow groupmember to
2058 * XXX: If large numbers of groups become common this should
2071 * Copy groups in to a credential after expanding it if required.
2075 crsetgroups(struct ucred *cr, int ngrp, gid_t *groups)
2082 crsetgroups_locked(cr, ngrp, groups);