Lines Matching refs:ad

47 	struct apparmor_audit_data *ad = aad(sa);  in file_audit_cb()  local
48 kuid_t fsuid = ad->subj_cred ? ad->subj_cred->fsuid : current_fsuid(); in file_audit_cb()
51 if (ad->request & AA_AUDIT_FILE_MASK) { in file_audit_cb()
53 map_mask_to_chr_mask(ad->request)); in file_audit_cb()
56 if (ad->denied & AA_AUDIT_FILE_MASK) { in file_audit_cb()
58 map_mask_to_chr_mask(ad->denied)); in file_audit_cb()
61 if (ad->request & AA_AUDIT_FILE_MASK) { in file_audit_cb()
65 from_kuid(&init_user_ns, ad->fs.ouid)); in file_audit_cb()
68 if (ad->peer) { in file_audit_cb()
70 aa_label_xaudit(ab, labels_ns(ad->subj_label), ad->peer, in file_audit_cb()
72 } else if (ad->fs.target) { in file_audit_cb()
74 audit_log_untrustedstring(ab, ad->fs.target); in file_audit_cb()
101 DEFINE_AUDIT_DATA(ad, LSM_AUDIT_DATA_TASK, AA_CLASS_FILE, op); in aa_audit_file()
103 ad.subj_cred = subj_cred; in aa_audit_file()
104 ad.request = request; in aa_audit_file()
105 ad.name = name; in aa_audit_file()
106 ad.fs.target = target; in aa_audit_file()
107 ad.peer = tlabel; in aa_audit_file()
108 ad.fs.ouid = ouid; in aa_audit_file()
109 ad.info = info; in aa_audit_file()
110 ad.error = error; in aa_audit_file()
111 ad.common.u.tsk = NULL; in aa_audit_file()
113 if (likely(!ad.error)) { in aa_audit_file()
120 ad.request &= mask; in aa_audit_file()
122 if (likely(!ad.request)) in aa_audit_file()
127 ad.request = ad.request & ~perms->allow; in aa_audit_file()
128 AA_BUG(!ad.request); in aa_audit_file()
130 if (ad.request & perms->kill) in aa_audit_file()
134 if ((ad.request & perms->quiet) && in aa_audit_file()
137 ad.request &= ~perms->quiet; in aa_audit_file()
139 if (!ad.request) in aa_audit_file()
140 return ad.error; in aa_audit_file()
143 ad.denied = ad.request & ~perms->allow; in aa_audit_file()
144 return aa_audit(type, profile, &ad, file_audit_cb); in aa_audit_file()