Lines Matching refs:el
253 static void kauth_groups_updatecache(struct kauth_identity_extlookup *el);
2554 struct kauth_identity_extlookup el; in kauth_cred_cache_lookup() local
2703 bzero(&el, sizeof(el)); in kauth_cred_cache_lookup()
2704 el.el_info_pid = proc_getpid(current_proc()); in kauth_cred_cache_lookup()
2707 el.el_flags = KAUTH_EXTLOOKUP_VALID_UID; in kauth_cred_cache_lookup()
2708 el.el_uid = *(uid_t *)src; in kauth_cred_cache_lookup()
2711 el.el_flags = KAUTH_EXTLOOKUP_VALID_GID; in kauth_cred_cache_lookup()
2712 el.el_gid = *(gid_t *)src; in kauth_cred_cache_lookup()
2715 el.el_flags = KAUTH_EXTLOOKUP_VALID_UGUID | KAUTH_EXTLOOKUP_VALID_GGUID; in kauth_cred_cache_lookup()
2716 el.el_uguid = *(guid_t *)src; in kauth_cred_cache_lookup()
2717 el.el_gguid = *(guid_t *)src; in kauth_cred_cache_lookup()
2720 el.el_flags = KAUTH_EXTLOOKUP_VALID_USID | KAUTH_EXTLOOKUP_VALID_GSID; in kauth_cred_cache_lookup()
2721 el.el_usid = *(ntsid_t *)src; in kauth_cred_cache_lookup()
2722 el.el_gsid = *(ntsid_t *)src; in kauth_cred_cache_lookup()
2726 el.el_flags = KAUTH_EXTLOOKUP_VALID_PWNAM; in kauth_cred_cache_lookup()
2731 el.el_flags = KAUTH_EXTLOOKUP_VALID_GRNAM; in kauth_cred_cache_lookup()
2746 el.el_flags |= KAUTH_EXTLOOKUP_WANT_UID | KAUTH_EXTLOOKUP_WANT_GID | in kauth_cred_cache_lookup()
2751 el.el_flags |= KAUTH_EXTLOOKUP_WANT_PWNAM; in kauth_cred_cache_lookup()
2756 el.el_flags |= KAUTH_EXTLOOKUP_WANT_GRNAM; in kauth_cred_cache_lookup()
2761 el.el_flags |= KAUTH_EXTLOOKUP_WANT_SUPGRPS; in kauth_cred_cache_lookup()
2776 el.el_sup_grp_cnt = (uint32_t)ki.ki_supgrpcnt; in kauth_cred_cache_lookup()
2778 memcpy(el.el_sup_groups, ki.ki_supgrps, sizeof(el.el_sup_groups[0]) * ki.ki_supgrpcnt); in kauth_cred_cache_lookup()
2780 el.el_flags |= KAUTH_EXTLOOKUP_VALID_SUPGRPS; in kauth_cred_cache_lookup()
2788 KAUTH_DEBUG("CACHE - calling resolver for %x", el.el_flags); in kauth_cred_cache_lookup()
2792 error = kauth_resolver_submit(&el, extend_data); in kauth_cred_cache_lookup()
2794 DTRACE_PROC2(kauth__id__resolver__returned, int, error, struct kauth_identity_extlookup *, &el) in kauth_cred_cache_lookup()
2808 el.el_flags |= KAUTH_EXTLOOKUP_VALID_PWNAM; in kauth_cred_cache_lookup()
2810 el.el_flags |= KAUTH_EXTLOOKUP_VALID_GRNAM; in kauth_cred_cache_lookup()
2813 kauth_identity_updatecache(&el, &ki, extend_data); in kauth_cred_cache_lookup()
2944 kauth_groups_updatecache(struct kauth_identity_extlookup *el) in kauth_groups_updatecache() argument
2950 if ((el->el_flags & in kauth_groups_updatecache()
2964 if ((el->el_uid == gm->gm_uid) && in kauth_groups_updatecache()
2965 (el->el_gid == gm->gm_gid)) { in kauth_groups_updatecache()
2966 if (el->el_flags & KAUTH_EXTLOOKUP_ISMEMBER) { in kauth_groups_updatecache()
2971 gm->gm_expiry = (el->el_member_valid) ? el->el_member_valid + tv.tv_sec : 0; in kauth_groups_updatecache()
2985 gm->gm_uid = el->el_uid; in kauth_groups_updatecache()
2986 gm->gm_gid = el->el_gid; in kauth_groups_updatecache()
2987 if (el->el_flags & KAUTH_EXTLOOKUP_ISMEMBER) { in kauth_groups_updatecache()
2992 gm->gm_expiry = (el->el_member_valid) ? el->el_member_valid + tv.tv_sec : 0; in kauth_groups_updatecache()
3101 struct kauth_identity_extlookup el; in kauth_cred_ismember_gid() local
3142 bzero(&el, sizeof(el)); in kauth_cred_ismember_gid()
3143 el.el_info_pid = proc_getpid(current_proc()); in kauth_cred_ismember_gid()
3144 …el.el_flags = KAUTH_EXTLOOKUP_VALID_UID | KAUTH_EXTLOOKUP_VALID_GID | KAUTH_EXTLOOKUP_WANT_MEMBERS… in kauth_cred_ismember_gid()
3145 el.el_uid = pcred->cr_gmuid; in kauth_cred_ismember_gid()
3146 el.el_gid = gid; in kauth_cred_ismember_gid()
3147 el.el_member_valid = 0; /* XXX set by resolver? */ in kauth_cred_ismember_gid()
3149 DTRACE_PROC2(kauth__group__resolver__submitted, int, el.el_uid, int, el.el_gid); in kauth_cred_ismember_gid()
3151 error = kauth_resolver_submit(&el, 0ULL); in kauth_cred_ismember_gid()
3153 DTRACE_PROC2(kauth__group__resolver__returned, int, error, int, el.el_flags); in kauth_cred_ismember_gid()
3159 kauth_groups_updatecache(&el); in kauth_cred_ismember_gid()
3162 if (el.el_flags & KAUTH_EXTLOOKUP_VALID_MEMBERSHIP) { in kauth_cred_ismember_gid()
3163 *resultp = (el.el_flags & KAUTH_EXTLOOKUP_ISMEMBER) ? 1 : 0; in kauth_cred_ismember_gid()