Lines Matching refs:gid
119 int groupmember(gid_t gid, kauth_cred_t cred);
344 * uap->gidp Address of gid_t to get gid
379 * Returns: gid_t The real gid of the caller
397 * Returns: gid_t The effective gid of the caller
399 * Notes: As an implementation detail, the effective gid is stored as
440 * As an implementation detail, the effective gid is stored as
655 * Description: Is current process tainted by uid or gid changes system call
1034 * Parameters: uap->gid gid to set
1040 * real, effective, and saved gid to the requested value.
1042 * If called from an unprivileged process, but gid is equal to the
1043 * real or saved gid, then the effective gid will be set to the
1044 * requested value, but the real and saved gid will not change.
1049 * As an implementation detail, the effective gid is stored as
1057 gid_t gid;
1063 DEBUG_CRED_ENTER("setgid(%d/%d): %d\n", p->p_pid, (p->p_pptr ? p->p_pptr->p_pid : 0), uap->gid);
1065 gid = uap->gid;
1066 AUDIT_ARG(gid, gid, 0, 0, 0);
1070 if (gid != my_cred->cr_rgid && /* allow setgid(getgid()) */
1071 gid != my_cred->cr_svgid && /* allow setgid(saved gid) */
1082 svgid = gid;
1083 rgid = gid;
1096 my_new_cred = kauth_cred_setresgid(my_cred, rgid, gid, svgid);
1134 * Parameters: uap->egid effective gid to set
1141 * gid, then the effective gid will be set to the requested
1142 * value, but the real and saved gid will not change.
1147 * As an implementation detail, the effective gid is stored as
1162 AUDIT_ARG(gid, 0, egid, 0, 0);
1220 * Parameters: uap->rgid real gid to set
1221 * uap->egid effective gid to set
1226 * Notes: A value of -1 is a special case indicating that the gid for
1230 * If called by a privileged process, the real and effective gid
1233 * If called from an unprivileged process, the real gid may be
1234 * set to the current value of the real gid, or to the current
1235 * value of the saved gid. The effective gid may be set to the
1236 * current value of any of the effective, real, or saved gid.
1238 * If the new real and effective gid will not be equal, or the
1239 * new real or effective gid is not the same as the saved gid,
1240 * then the saved gid will be updated to reflect the new
1241 * effective gid (potentially unrecoverably dropping saved
1247 * As an implementation detail, the effective gid is stored as
1268 AUDIT_ARG(gid, egid, rgid, 0, 0);
1311 * If the newly requested real gid or effective gid does
1312 * not match the saved gid, then set the saved gid to the
1313 * new effective gid. We are protected from escalation
1368 gid_t gid;
1371 gid = uap->gid;
1372 AUDIT_ARG(uid, uid, gid, gid, 0);
1405 my_new_cred = kauth_cred_setuidgid(my_cred, uid, gid);
1526 * gmuid Base gid (initgroups only!)
1667 * uap->gmuid Base gid
1753 * Check if gid is a member of the group set.
1759 groupmember(gid_t gid, kauth_cred_t cred)
1763 if (kauth_cred_ismember_gid(cred, gid, &is_member) == 0 && is_member)