* [PATCH] audit: remove stray newlines from audit_log_lost messages
@ 2014-03-05 21:29 Josh Boyer
2014-03-05 22:27 ` Richard Guy Briggs
0 siblings, 1 reply; 4+ messages in thread
From: Josh Boyer @ 2014-03-05 21:29 UTC (permalink / raw)
To: Eric Paris; +Cc: linux-kernel
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>
---
kernel/audit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index 34c5a23..f6bce4d 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -396,7 +396,7 @@ static void audit_printk_skb(struct sk_buff *skb)
if (printk_ratelimit())
pr_notice("type=%d %s\n", nlh->nlmsg_type, data);
else
- audit_log_lost("printk limit exceeded\n");
+ audit_log_lost("printk limit exceeded");
}
audit_hold_skb(skb);
@@ -412,7 +412,7 @@ static void kauditd_send_skb(struct sk_buff *skb)
BUG_ON(err != -ECONNREFUSED); /* Shouldn't happen */
if (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_sock = NULL;
}
--
1.8.5.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] audit: remove stray newlines from audit_log_lost messages
2014-03-05 21:29 [PATCH] audit: remove stray newlines from audit_log_lost messages Josh Boyer
@ 2014-03-05 22:27 ` Richard Guy Briggs
2014-03-05 22:34 ` Joe Perches
0 siblings, 1 reply; 4+ messages in thread
From: Richard Guy Briggs @ 2014-03-05 22:27 UTC (permalink / raw)
To: Josh Boyer; +Cc: Eric Paris, linux-kernel
On 14/03/05, Josh Boyer wrote:
> 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>
Ack. queued.
> ---
> kernel/audit.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 34c5a23..f6bce4d 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -396,7 +396,7 @@ static void audit_printk_skb(struct sk_buff *skb)
> if (printk_ratelimit())
> pr_notice("type=%d %s\n", nlh->nlmsg_type, data);
> else
> - audit_log_lost("printk limit exceeded\n");
> + audit_log_lost("printk limit exceeded");
> }
>
> audit_hold_skb(skb);
> @@ -412,7 +412,7 @@ static void kauditd_send_skb(struct sk_buff *skb)
> BUG_ON(err != -ECONNREFUSED); /* Shouldn't happen */
> if (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_sock = NULL;
> }
> --
> 1.8.5.3
- RGB
--
Richard Guy Briggs <rbriggs@redhat.com>
Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat
Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] audit: remove stray newlines from audit_log_lost messages
2014-03-05 22:27 ` Richard Guy Briggs
@ 2014-03-05 22:34 ` Joe Perches
2014-03-05 23:11 ` Richard Guy Briggs
0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2014-03-05 22:34 UTC (permalink / raw)
To: Richard Guy Briggs; +Cc: Josh Boyer, Eric Paris, linux-kernel
On Wed, 2014-03-05 at 17:27 -0500, Richard Guy Briggs wrote:
> On 14/03/05, Josh Boyer wrote:
> > 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>
>
> Ack. queued.
There's an unnecessary use of a \n in audit_panic too
---
kernel/auditsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 7aef2f4..da93d2e 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1157,7 +1157,7 @@ static void audit_log_execve_info(struct audit_context *context,
*/
buf = kmalloc(MAX_EXECVE_AUDIT_LEN + 1, GFP_KERNEL);
if (!buf) {
- audit_panic("out of memory for argv string\n");
+ audit_panic("out of memory for argv string");
return;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] audit: remove stray newlines from audit_log_lost messages
2014-03-05 22:34 ` Joe Perches
@ 2014-03-05 23:11 ` Richard Guy Briggs
0 siblings, 0 replies; 4+ messages in thread
From: Richard Guy Briggs @ 2014-03-05 23:11 UTC (permalink / raw)
To: Joe Perches; +Cc: Josh Boyer, Eric Paris, linux-kernel
On 14/03/05, Joe Perches wrote:
> On Wed, 2014-03-05 at 17:27 -0500, Richard Guy Briggs wrote:
> > On 14/03/05, Josh Boyer wrote:
> > > 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>
> >
> > Ack. queued.
>
> There's an unnecessary use of a \n in audit_panic too
Thanks, also queued.
> ---
> kernel/auditsc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> index 7aef2f4..da93d2e 100644
> --- a/kernel/auditsc.c
> +++ b/kernel/auditsc.c
> @@ -1157,7 +1157,7 @@ static void audit_log_execve_info(struct audit_context *context,
> */
> buf = kmalloc(MAX_EXECVE_AUDIT_LEN + 1, GFP_KERNEL);
> if (!buf) {
> - audit_panic("out of memory for argv string\n");
> + audit_panic("out of memory for argv string");
> return;
> }
>
>
>
- RGB
--
Richard Guy Briggs <rbriggs@redhat.com>
Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat
Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-05 23:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05 21:29 [PATCH] audit: remove stray newlines from audit_log_lost messages Josh Boyer
2014-03-05 22:27 ` Richard Guy Briggs
2014-03-05 22:34 ` Joe Perches
2014-03-05 23:11 ` Richard Guy Briggs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®