summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorMimi Zohar <zohar@linux.vnet.ibm.com>2009-05-05 13:13:00 -0400
committerJames Morris <jmorris@namei.org>2009-05-06 10:35:56 +1000
commite5e520a715dcea6b72f6b9417b203a4b1e813a8b (patch)
tree5edb34e4273ec733d5705b1ebca2b296088a88b1 /security
parent53fc0e2259f261602a2750dcc82b8d7bf04d3c35 (diff)
downloadlinux-e5e520a715dcea6b72f6b9417b203a4b1e813a8b.tar.gz
linux-e5e520a715dcea6b72f6b9417b203a4b1e813a8b.tar.bz2
linux-e5e520a715dcea6b72f6b9417b203a4b1e813a8b.zip
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: Mimi Zohar <zohar@us.ibm.com> Acked-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/ima/ima_audit.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/security/integrity/ima/ima_audit.c b/security/integrity/ima/ima_audit.c
index 1e082bb987be..c1461150691c 100644
--- a/security/integrity/ima/ima_audit.c
+++ b/security/integrity/ima/ima_audit.c
@@ -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) {