Lines Matching refs:sa
53 * Record common AppArmor audit data from @sa
57 struct common_audit_data *sa = ca;
61 aa_audit_type[aad(sa)->type]);
64 if (aad(sa)->op) {
65 audit_log_format(ab, " operation=\"%s\"", aad(sa)->op);
68 if (aad(sa)->info) {
69 audit_log_format(ab, " info=\"%s\"", aad(sa)->info);
70 if (aad(sa)->error)
71 audit_log_format(ab, " error=%d", aad(sa)->error);
74 if (aad(sa)->label) {
75 struct aa_label *label = aad(sa)->label;
94 if (aad(sa)->name) {
96 audit_log_untrustedstring(ab, aad(sa)->name);
102 * @sa: audit event structure (NOT NULL)
105 void aa_audit_msg(int type, struct common_audit_data *sa,
108 aad(sa)->type = type;
109 common_lsm_audit(sa, audit_pre, cb);
116 * @sa: audit event (NOT NULL)
123 int aa_audit(int type, struct aa_profile *profile, struct common_audit_data *sa,
129 if (likely(!aad(sa)->error)) {
141 return aad(sa)->error;
146 aad(sa)->label = &profile->label;
148 aa_audit_msg(type, sa, cb);
150 if (aad(sa)->type == AUDIT_APPARMOR_KILL)
152 sa->type == LSM_AUDIT_DATA_TASK && sa->u.tsk ?
153 sa->u.tsk : current);
155 if (aad(sa)->type == AUDIT_APPARMOR_ALLOWED)
156 return complain_error(aad(sa)->error);
158 return aad(sa)->error;