mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
apparmor: leverage audit_log_n_untrustedstring() when possible
Make use of the audit_log_n_untrustedstring() function to simplify the code in aa_label_xaudit(). Signed-off-by: Paul Moore <paul@paul-moore.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
c431011ab6
commit
3693ff45ec
|
|
@ -1743,10 +1743,7 @@ void aa_label_xaudit(struct audit_buffer *ab, struct aa_ns *ns,
|
|||
str = (char *) label->hname;
|
||||
len = strlen(str);
|
||||
}
|
||||
if (audit_string_contains_control(str, len))
|
||||
audit_log_n_hex(ab, str, len);
|
||||
else
|
||||
audit_log_n_string(ab, str, len);
|
||||
audit_log_n_untrustedstring(ab, str, len);
|
||||
|
||||
kfree(name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user