Lines Matching refs:gid

203 static struct kauth_identity *kauth_identity_alloc(uid_t uid, gid_t gid, guid_t *guidp, time_t guid_expiry,
212 static int kauth_identity_find_gid(gid_t gid, struct kauth_identity *kir, char *getname);
777 * translate a user@domain string into a uid/gid/whatever
1073 kauth_identity_alloc(uid_t uid, gid_t gid, guid_t *guidp, time_t guid_expiry, ntsid_t *ntsidp, time_t ntsid_expiry, const char *name, int nametype)
1080 if (gid != KAUTH_GID_NONE) {
1081 kip->ki_gid = gid;
1086 panic("can't allocate kauth identity with both uid and gid");
1512 * Parameters: gid GID to find
1523 kauth_identity_find_gid(uid_t gid, struct kauth_identity *kir, char *getname)
1529 if ((kip->ki_valid & KI_VALID_GID) && (gid == kip->ki_gid)) {
2207 * Parameters: gid GID to examine
2217 kauth_cred_gid2guid(gid_t gid, guid_t *guidp)
2219 return(kauth_cred_cache_lookup(KI_VALID_GID, KI_VALID_GUID, &gid, guidp));
2271 * Parameters: gid GID to examine
2281 kauth_cred_gid2ntsid(gid_t gid, ntsid_t *sidp)
2283 return(kauth_cred_cache_lookup(KI_VALID_GID, KI_VALID_NTSID, &gid, sidp));
2792 * gid GID to check for membership
2816 kauth_cred_ismember_gid(kauth_cred_t cred, gid_t gid, int *resultp)
2828 if (gid == pcred->cr_groups[i]) {
2867 if ((gm->gm_uid == pcred->cr_gmuid) && (gm->gm_gid == gid) && !kauth_groups_expired(gm)) {
2880 DTRACE_PROC2(kauth__group__cache__hit, int, pcred->cr_gmuid, int, gid);
2889 el.el_gid = gid;
2958 gid_t gid;
2978 gid = ki.ki_gid;
2993 if ((error = kauth_cred_guid2gid(guidp, &gid)) != 0) {
2995 * If we have no guid -> gid translation, it's not a group and
3004 error = kauth_cred_ismember_gid(cred, gid, resultp);
3041 gid_t gid;
3047 gid = pcred1->cr_groups[i];
3048 if ((err = kauth_cred_ismember_gid(cred2, gid, &res)) != 0) {
3052 if (!res && gid != pcred2->cr_rgid && gid != pcred2->cr_svgid) {
3058 /* Check real gid */
3069 /* Finally, check saved gid */
3541 * use gid 0 because we always know it will exist and not
3784 * credential when the given gid actually results in changes to the existing
3917 * gid The new GID to use
3943 kauth_cred_setuidgid(kauth_cred_t cred, uid_t uid, gid_t gid)
3958 pcred->cr_gid == gid && pcred->cr_rgid == gid && pcred->cr_svgid == gid) {
3982 if (kauth_cred_change_egid(&temp_cred, gid)) {
3986 temp_pcred->cr_rgid = gid;
3987 temp_pcred->cr_svgid = gid;
3999 * Description: Function used by execve to set the saved uid and gid values
4004 * gid The saved gid to set
4021 kauth_cred_setsvuidgid(kauth_cred_t cred, uid_t uid, gid_t gid)
4031 DEBUG_CRED_ENTER("kauth_cred_setsvuidgid: %p u%d->%d g%d->%d\n", cred, cred->cr_svuid, uid, cred->cr_svgid, gid);
4038 if (pcred->cr_svuid == uid && pcred->cr_svgid == gid) {
4049 temp_pcred->cr_svgid = gid;