Lines Matching refs:el
237 static void kauth_groups_updatecache(struct kauth_identity_extlookup *el);
2476 struct kauth_identity_extlookup el; in kauth_cred_cache_lookup() local
2625 bzero(&el, sizeof(el)); in kauth_cred_cache_lookup()
2626 el.el_info_pid = proc_getpid(current_proc()); in kauth_cred_cache_lookup()
2629 el.el_flags = KAUTH_EXTLOOKUP_VALID_UID; in kauth_cred_cache_lookup()
2630 el.el_uid = *(uid_t *)src; in kauth_cred_cache_lookup()
2633 el.el_flags = KAUTH_EXTLOOKUP_VALID_GID; in kauth_cred_cache_lookup()
2634 el.el_gid = *(gid_t *)src; in kauth_cred_cache_lookup()
2637 el.el_flags = KAUTH_EXTLOOKUP_VALID_UGUID | KAUTH_EXTLOOKUP_VALID_GGUID; in kauth_cred_cache_lookup()
2638 el.el_uguid = *(guid_t *)src; in kauth_cred_cache_lookup()
2639 el.el_gguid = *(guid_t *)src; in kauth_cred_cache_lookup()
2642 el.el_flags = KAUTH_EXTLOOKUP_VALID_USID | KAUTH_EXTLOOKUP_VALID_GSID; in kauth_cred_cache_lookup()
2643 el.el_usid = *(ntsid_t *)src; in kauth_cred_cache_lookup()
2644 el.el_gsid = *(ntsid_t *)src; in kauth_cred_cache_lookup()
2648 el.el_flags = KAUTH_EXTLOOKUP_VALID_PWNAM; in kauth_cred_cache_lookup()
2653 el.el_flags = KAUTH_EXTLOOKUP_VALID_GRNAM; in kauth_cred_cache_lookup()
2668 el.el_flags |= KAUTH_EXTLOOKUP_WANT_UID | KAUTH_EXTLOOKUP_WANT_GID | in kauth_cred_cache_lookup()
2673 el.el_flags |= KAUTH_EXTLOOKUP_WANT_PWNAM; in kauth_cred_cache_lookup()
2678 el.el_flags |= KAUTH_EXTLOOKUP_WANT_GRNAM; in kauth_cred_cache_lookup()
2683 el.el_flags |= KAUTH_EXTLOOKUP_WANT_SUPGRPS; in kauth_cred_cache_lookup()
2698 el.el_sup_grp_cnt = (uint32_t)ki.ki_supgrpcnt; in kauth_cred_cache_lookup()
2700 memcpy(el.el_sup_groups, ki.ki_supgrps, sizeof(el.el_sup_groups[0]) * ki.ki_supgrpcnt); in kauth_cred_cache_lookup()
2702 el.el_flags |= KAUTH_EXTLOOKUP_VALID_SUPGRPS; in kauth_cred_cache_lookup()
2710 KAUTH_DEBUG("CACHE - calling resolver for %x", el.el_flags); in kauth_cred_cache_lookup()
2714 error = kauth_resolver_submit(&el, extend_data); in kauth_cred_cache_lookup()
2716 DTRACE_PROC2(kauth__id__resolver__returned, int, error, struct kauth_identity_extlookup *, &el) in kauth_cred_cache_lookup()
2730 el.el_flags |= KAUTH_EXTLOOKUP_VALID_PWNAM; in kauth_cred_cache_lookup()
2732 el.el_flags |= KAUTH_EXTLOOKUP_VALID_GRNAM; in kauth_cred_cache_lookup()
2735 kauth_identity_updatecache(&el, &ki, extend_data); in kauth_cred_cache_lookup()
2866 kauth_groups_updatecache(struct kauth_identity_extlookup *el) in kauth_groups_updatecache() argument
2872 if ((el->el_flags & in kauth_groups_updatecache()
2886 if ((el->el_uid == gm->gm_uid) && in kauth_groups_updatecache()
2887 (el->el_gid == gm->gm_gid)) { in kauth_groups_updatecache()
2888 if (el->el_flags & KAUTH_EXTLOOKUP_ISMEMBER) { in kauth_groups_updatecache()
2893 gm->gm_expiry = (el->el_member_valid) ? el->el_member_valid + tv.tv_sec : 0; in kauth_groups_updatecache()
2907 gm->gm_uid = el->el_uid; in kauth_groups_updatecache()
2908 gm->gm_gid = el->el_gid; in kauth_groups_updatecache()
2909 if (el->el_flags & KAUTH_EXTLOOKUP_ISMEMBER) { in kauth_groups_updatecache()
2914 gm->gm_expiry = (el->el_member_valid) ? el->el_member_valid + tv.tv_sec : 0; in kauth_groups_updatecache()
3023 struct kauth_identity_extlookup el; in kauth_cred_ismember_gid() local
3064 bzero(&el, sizeof(el)); in kauth_cred_ismember_gid()
3065 el.el_info_pid = proc_getpid(current_proc()); in kauth_cred_ismember_gid()
3066 …el.el_flags = KAUTH_EXTLOOKUP_VALID_UID | KAUTH_EXTLOOKUP_VALID_GID | KAUTH_EXTLOOKUP_WANT_MEMBERS… in kauth_cred_ismember_gid()
3067 el.el_uid = pcred->cr_gmuid; in kauth_cred_ismember_gid()
3068 el.el_gid = gid; in kauth_cred_ismember_gid()
3069 el.el_member_valid = 0; /* XXX set by resolver? */ in kauth_cred_ismember_gid()
3071 DTRACE_PROC2(kauth__group__resolver__submitted, int, el.el_uid, int, el.el_gid); in kauth_cred_ismember_gid()
3073 error = kauth_resolver_submit(&el, 0ULL); in kauth_cred_ismember_gid()
3075 DTRACE_PROC2(kauth__group__resolver__returned, int, error, int, el.el_flags); in kauth_cred_ismember_gid()
3081 kauth_groups_updatecache(&el); in kauth_cred_ismember_gid()
3084 if (el.el_flags & KAUTH_EXTLOOKUP_VALID_MEMBERSHIP) { in kauth_cred_ismember_gid()
3085 *resultp = (el.el_flags & KAUTH_EXTLOOKUP_ISMEMBER) ? 1 : 0; in kauth_cred_ismember_gid()