Skip to content

Commit

Permalink
integrity: use audit_log_string
Browse files Browse the repository at this point in the history
Based on a request from Eric Paris to simplify parsing, replace
audit_log_format statements containing "%s" with audit_log_string().

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Mimi Zohar authored and James Morris committed May 6, 2009
1 parent 53fc0e2 commit e5e520a
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions security/integrity/ima/ima_audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,10 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode,
audit_get_loginuid(current),
audit_get_sessionid(current));
audit_log_task_context(ab);
switch (audit_msgno) {
case AUDIT_INTEGRITY_DATA:
case AUDIT_INTEGRITY_METADATA:
case AUDIT_INTEGRITY_PCR:
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, " op=");
audit_log_string(ab, op);
audit_log_format(ab, " cause=");
audit_log_string(ab, cause);
audit_log_format(ab, " comm=");
audit_log_untrustedstring(ab, current->comm);
if (fname) {
Expand Down

0 comments on commit e5e520a

Please sign in to comment.