Lines Matching refs:ad
94 struct apparmor_audit_data *ad = aad_of_va(va); in audit_pre() local
98 aa_audit_type[ad->type]); in audit_pre()
101 if (ad->op) in audit_pre()
102 audit_log_format(ab, " operation=\"%s\"", ad->op); in audit_pre()
104 if (ad->class) in audit_pre()
106 ad->class <= AA_CLASS_LAST ? in audit_pre()
107 aa_class_names[ad->class] : in audit_pre()
110 if (ad->info) { in audit_pre()
111 audit_log_format(ab, " info=\"%s\"", ad->info); in audit_pre()
112 if (ad->error) in audit_pre()
113 audit_log_format(ab, " error=%d", ad->error); in audit_pre()
116 if (ad->subj_label) { in audit_pre()
117 struct aa_label *label = ad->subj_label; in audit_pre()
136 if (ad->name) { in audit_pre()
138 audit_log_untrustedstring(ab, ad->name); in audit_pre()
148 void aa_audit_msg(int type, struct apparmor_audit_data *ad, in aa_audit_msg() argument
151 ad->type = type; in aa_audit_msg()
152 common_lsm_audit(&ad->common, audit_pre, cb); in aa_audit_msg()
167 struct apparmor_audit_data *ad, in aa_audit() argument
173 if (likely(!ad->error)) { in aa_audit()
185 return ad->error; in aa_audit()
190 ad->subj_label = &profile->label; in aa_audit()
192 aa_audit_msg(type, ad, cb); in aa_audit()
194 if (ad->type == AUDIT_APPARMOR_KILL) in aa_audit()
196 ad->common.type == LSM_AUDIT_DATA_TASK && in aa_audit()
197 ad->common.u.tsk ? ad->common.u.tsk : current); in aa_audit()
199 if (ad->type == AUDIT_APPARMOR_ALLOWED) in aa_audit()
200 return complain_error(ad->error); in aa_audit()
202 return ad->error; in aa_audit()