Lines Matching refs:ad
67 static int audit_caps(struct apparmor_audit_data *ad, struct aa_profile *profile, in audit_caps() argument
76 ad->error = error; in audit_caps()
97 if (ad->subj_cred == ent->ad_subj_cred && ktime_get_ns() <= ent->ktime_ns_expiration[cap]) { in audit_caps()
104 ent->ad_subj_cred = get_cred(ad->subj_cred); in audit_caps()
109 return aa_audit(type, profile, ad, audit_cb); in audit_caps()
122 unsigned int opts, struct apparmor_audit_data *ad) in profile_capable() argument
128 state = RULE_MEDIATES(rules, ad->class); in profile_capable()
141 ad->info = "optional: no audit"; in profile_capable()
143 ad = NULL; in profile_capable()
145 return aa_check_perms(profile, &perms, request, ad, in profile_capable()
162 ad->info = "optional: no audit"; in profile_capable()
165 return audit_caps(ad, profile, cap, error); in profile_capable()
184 DEFINE_AUDIT_DATA(ad, LSM_AUDIT_DATA_CAP, AA_CLASS_CAP, OP_CAPABLE); in aa_capable()
186 ad.subj_cred = subj_cred; in aa_capable()
187 ad.common.u.cap = cap; in aa_capable()
189 profile_capable(profile, cap, opts, &ad)); in aa_capable()