Skip to content

Commit f128352

Browse files
Josh Boyereparis
authored andcommitted
audit: remove stray newlines from audit_log_lost messages
Calling audit_log_lost with a \n in the format string leads to extra newlines in dmesg. That function will eventually call audit_panic which uses pr_err with an explicit \n included. Just make these calls match the others that lack \n. Reported-by: Jonathan Kamens <jik@kamens.brookline.ma.us> Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
1 parent ddfad8a commit f128352

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/audit.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static void audit_printk_skb(struct sk_buff *skb)
396396
if (printk_ratelimit())
397397
pr_notice("type=%d %s\n", nlh->nlmsg_type, data);
398398
else
399-
audit_log_lost("printk limit exceeded\n");
399+
audit_log_lost("printk limit exceeded");
400400
}
401401

402402
audit_hold_skb(skb);
@@ -412,7 +412,7 @@ static void kauditd_send_skb(struct sk_buff *skb)
412412
BUG_ON(err != -ECONNREFUSED); /* Shouldn't happen */
413413
if (audit_pid) {
414414
pr_err("*NO* daemon at audit_pid=%d\n", audit_pid);
415-
audit_log_lost("auditd disappeared\n");
415+
audit_log_lost("auditd disappeared");
416416
audit_pid = 0;
417417
audit_sock = NULL;
418418
}

0 commit comments

Comments
 (0)