Lines Matching refs:sa

94 	struct common_audit_data *sa = ca;  in audit_pre()  local
98 aa_audit_type[aad(sa)->type]); in audit_pre()
101 if (aad(sa)->op) { in audit_pre()
102 audit_log_format(ab, " operation=\"%s\"", aad(sa)->op); in audit_pre()
105 if (aad(sa)->class) in audit_pre()
107 aad(sa)->class <= AA_CLASS_LAST ? in audit_pre()
108 aa_class_names[aad(sa)->class] : in audit_pre()
111 if (aad(sa)->info) { in audit_pre()
112 audit_log_format(ab, " info=\"%s\"", aad(sa)->info); in audit_pre()
113 if (aad(sa)->error) in audit_pre()
114 audit_log_format(ab, " error=%d", aad(sa)->error); in audit_pre()
117 if (aad(sa)->label) { in audit_pre()
118 struct aa_label *label = aad(sa)->label; in audit_pre()
137 if (aad(sa)->name) { in audit_pre()
139 audit_log_untrustedstring(ab, aad(sa)->name); in audit_pre()
148 void aa_audit_msg(int type, struct common_audit_data *sa, in aa_audit_msg() argument
151 aad(sa)->type = type; in aa_audit_msg()
152 common_lsm_audit(sa, audit_pre, cb); in aa_audit_msg()
166 int aa_audit(int type, struct aa_profile *profile, struct common_audit_data *sa, in aa_audit() argument
172 if (likely(!aad(sa)->error)) { in aa_audit()
184 return aad(sa)->error; in aa_audit()
189 aad(sa)->label = &profile->label; in aa_audit()
191 aa_audit_msg(type, sa, cb); in aa_audit()
193 if (aad(sa)->type == AUDIT_APPARMOR_KILL) in aa_audit()
195 sa->type == LSM_AUDIT_DATA_TASK && sa->u.tsk ? in aa_audit()
196 sa->u.tsk : current); in aa_audit()
198 if (aad(sa)->type == AUDIT_APPARMOR_ALLOWED) in aa_audit()
199 return complain_error(aad(sa)->error); in aa_audit()
201 return aad(sa)->error; in aa_audit()