audit: purge audit_log_string from the intra-kernel audit API
audit_log_string() was inteded to be an internal audit function and since there are only two internal uses, remove them. Purge all external uses of it by restructuring code to use an existing audit_log_format() or using audit_log_format(). Please see the upstream issue https://github.com/linux-audit/audit-kernel/issues/84 Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:

committed by
Paul Moore

parent
d7481b24b8
commit
f1d9b23cab
@@ -57,18 +57,16 @@ static void audit_pre(struct audit_buffer *ab, void *ca)
|
||||
struct common_audit_data *sa = ca;
|
||||
|
||||
if (aa_g_audit_header) {
|
||||
audit_log_format(ab, "apparmor=");
|
||||
audit_log_string(ab, aa_audit_type[aad(sa)->type]);
|
||||
audit_log_format(ab, "apparmor=\"%s\"",
|
||||
aa_audit_type[aad(sa)->type]);
|
||||
}
|
||||
|
||||
if (aad(sa)->op) {
|
||||
audit_log_format(ab, " operation=");
|
||||
audit_log_string(ab, aad(sa)->op);
|
||||
audit_log_format(ab, " operation=\"%s\"", aad(sa)->op);
|
||||
}
|
||||
|
||||
if (aad(sa)->info) {
|
||||
audit_log_format(ab, " info=");
|
||||
audit_log_string(ab, aad(sa)->info);
|
||||
audit_log_format(ab, " info=\"%s\"", aad(sa)->info);
|
||||
if (aad(sa)->error)
|
||||
audit_log_format(ab, " error=%d", aad(sa)->error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user