aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-06-11 14:31:37 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-24 00:00:52 -0400
commit9d9609851003ebed15957f0f2ce18492739ee124 (patch)
tree2c116865d2f239b5596b22a3a79eecc82f5e1299 /kernel/audit.c
parent35fe4d0b1b12286a81938e9c5fdfaf639ac0ce5b (diff)
Audit: clean up all op= output to include string quoting
A number of places in the audit system we send an op= followed by a string that includes spaces. Somehow this works but it's just wrong. This patch moves all of those that I could find to be quoted. Example: Change From: type=CONFIG_CHANGE msg=audit(1244666690.117:31): auid=0 ses=1 subj=unconfined_u:unconfined_r:auditctl_t:s0-s0:c0.c1023 op=remove rule key="number2" list=4 res=0 Change To: type=CONFIG_CHANGE msg=audit(1244666690.117:31): auid=0 ses=1 subj=unconfined_u:unconfined_r:auditctl_t:s0-s0:c0.c1023 op="remove rule" key="number2" list=4 res=0 Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel/audit.c')
-rw-r--r--kernel/audit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index e07ad2340dbe..6194c50e2039 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1450,6 +1450,15 @@ void audit_log_d_path(struct audit_buffer *ab, const char *prefix,
1450 kfree(pathname); 1450 kfree(pathname);
1451} 1451}
1452 1452
1453void audit_log_key(struct audit_buffer *ab, char *key)
1454{
1455 audit_log_format(ab, " key=");
1456 if (key)
1457 audit_log_untrustedstring(ab, key);
1458 else
1459 audit_log_format(ab, "(null)");
1460}
1461
1453/** 1462/**
1454 * audit_log_end - end one audit record 1463 * audit_log_end - end one audit record
1455 * @ab: the audit_buffer 1464 * @ab: the audit_buffer