From c1e8f06d7a0eea232ce0767471e1b4756ccab70a Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Wed, 16 Nov 2016 16:14:33 -0500 Subject: audit: fix formatting of AUDIT_CONFIG_CHANGE events The AUDIT_CONFIG_CHANGE events sometimes use a op= field. The current code logs the value of the field with quotes. This field is documented to not be encoded, so it should not have quotes. Signed-off-by: Steve Grubb Reviewed-by: Richard Guy Briggs [PM: reformatted commit description to make checkpatch.pl happy] Signed-off-by: Paul Moore --- kernel/auditfilter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'kernel/auditfilter.c') diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 85d9cac497e4..632e90d1005f 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -1074,8 +1074,7 @@ static void audit_log_rule_change(char *action, struct audit_krule *rule, int re return; audit_log_format(ab, "auid=%u ses=%u" ,loginuid, sessionid); audit_log_task_context(ab); - audit_log_format(ab, " op="); - audit_log_string(ab, action); + audit_log_format(ab, " op=%s", action); audit_log_key(ab, rule->filterkey); audit_log_format(ab, " list=%d res=%d", rule->listnr, res); audit_log_end(ab); -- cgit v1.2.3