Commit e5e520a7 authored by Mimi Zohar's avatar Mimi Zohar Committed by James Morris

integrity: use audit_log_string

Based on a request from Eric Paris to simplify parsing, replace
audit_log_format statements containing "%s" with audit_log_string().
Signed-off-by: default avatarMimi Zohar <zohar@us.ibm.com>
Acked-by: default avatarEric Paris <eparis@redhat.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 53fc0e22
...@@ -54,19 +54,10 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode, ...@@ -54,19 +54,10 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode,
audit_get_loginuid(current), audit_get_loginuid(current),
audit_get_sessionid(current)); audit_get_sessionid(current));
audit_log_task_context(ab); audit_log_task_context(ab);
switch (audit_msgno) { audit_log_format(ab, " op=");
case AUDIT_INTEGRITY_DATA: audit_log_string(ab, op);
case AUDIT_INTEGRITY_METADATA: audit_log_format(ab, " cause=");
case AUDIT_INTEGRITY_PCR: audit_log_string(ab, cause);
case AUDIT_INTEGRITY_STATUS:
audit_log_format(ab, " op=%s cause=%s", op, cause);
break;
case AUDIT_INTEGRITY_HASH:
audit_log_format(ab, " op=%s hash=%s", op, cause);
break;
default:
audit_log_format(ab, " op=%s", op);
}
audit_log_format(ab, " comm="); audit_log_format(ab, " comm=");
audit_log_untrustedstring(ab, current->comm); audit_log_untrustedstring(ab, current->comm);
if (fname) { if (fname) {
......
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