Commit 3d2859d5 authored by Stefan Berger's avatar Stefan Berger Committed by Mimi Zohar

ima: Use audit_log_format() rather than audit_log_string()

Remove the usage of audit_log_string() and replace it with
audit_log_format().
Signed-off-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
Suggested-by: default avatarSteve Grubb <sgrubb@redhat.com>
Acked-by: default avatarPaul Moore <paul@paul-moore.com>
Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
parent 8a3bcaf6
...@@ -663,8 +663,7 @@ static void ima_log_string_op(struct audit_buffer *ab, char *key, char *value, ...@@ -663,8 +663,7 @@ static void ima_log_string_op(struct audit_buffer *ab, char *key, char *value,
audit_log_format(ab, "%s<", key); audit_log_format(ab, "%s<", key);
else else
audit_log_format(ab, "%s=", key); audit_log_format(ab, "%s=", key);
audit_log_string(ab, value); audit_log_format(ab, "%s ", value);
audit_log_format(ab, " ");
} }
static void ima_log_string(struct audit_buffer *ab, char *key, char *value) static void ima_log_string(struct audit_buffer *ab, char *key, char *value)
{ {
......
...@@ -45,11 +45,7 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode, ...@@ -45,11 +45,7 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode,
from_kuid(&init_user_ns, audit_get_loginuid(current)), from_kuid(&init_user_ns, audit_get_loginuid(current)),
audit_get_sessionid(current)); audit_get_sessionid(current));
audit_log_task_context(ab); audit_log_task_context(ab);
audit_log_format(ab, " op="); audit_log_format(ab, " op=%s cause=%s comm=", op, cause);
audit_log_string(ab, op);
audit_log_format(ab, " cause=");
audit_log_string(ab, cause);
audit_log_format(ab, " comm=");
audit_log_untrustedstring(ab, get_task_comm(name, current)); audit_log_untrustedstring(ab, get_task_comm(name, current));
if (fname) { if (fname) {
audit_log_format(ab, " name="); audit_log_format(ab, " name=");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment