Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1283527 authored by Josh Boyer's avatar Josh Boyer Committed by Eric Paris
Browse files

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: default avatarJonathan Kamens <jik@kamens.brookline.ma.us>
Signed-off-by: default avatarJosh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: default avatarRichard Guy Briggs <rgb@redhat.com>
parent ddfad8af
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -396,7 +396,7 @@ static void audit_printk_skb(struct sk_buff *skb)
		if (printk_ratelimit())
		if (printk_ratelimit())
			pr_notice("type=%d %s\n", nlh->nlmsg_type, data);
			pr_notice("type=%d %s\n", nlh->nlmsg_type, data);
		else
		else
			audit_log_lost("printk limit exceeded\n");
			audit_log_lost("printk limit exceeded");
	}
	}


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