audit: no leading space in audit_log_d_path prefix
audit_log_d_path() injects an additional space before the prefix, which serves no purpose and doesn't mix well with other audit_log*() functions that do not sneak extra characters into the log. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
@@ -1423,7 +1423,7 @@ void audit_log_d_path(struct audit_buffer *ab, const char *prefix,
|
||||
char *p, *pathname;
|
||||
|
||||
if (prefix)
|
||||
audit_log_format(ab, " %s", prefix);
|
||||
audit_log_format(ab, "%s", prefix);
|
||||
|
||||
/* We will allow 11 spaces for ' (deleted)' to be appended */
|
||||
pathname = kmalloc(PATH_MAX+11, ab->gfp_mask);
|
||||
|
Reference in New Issue
Block a user