public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Paul Moore <pmoore@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org,
	sgrubb@redhat.com, eparis@redhat.com, v.rathor@gmail.com,
	ctcard@hotmail.com
Subject: Re: [PATCH] fixup! audit: try harder to send to auditd upon netlink failure
Date: Tue, 22 Sep 2015 18:32:22 -0400	[thread overview]
Message-ID: <18505598.zxrNxOJe63@sifl> (raw)
In-Reply-To: <b3c5c9441c3d461465a9686388e8baba2ae2449f.1442699085.git.rgb@redhat.com>

On Saturday, September 19, 2015 05:52:50 PM Richard Guy Briggs wrote:
> A bug was introduced by "audit: try harder to send to auditd upon
> netlink failure", caused by incomplete code and a function that expects
> a string and does not accept a format plus arguments.  Create a
> temporary string variable to assemble the output text.  It could be
> merged as a fixup if it is not yet upstream.
> 
> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> ---
>  kernel/audit.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)

Applied and both patches squashed into one.

> diff --git a/kernel/audit.c b/kernel/audit.c
> index 18cdfe2..9d32218 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -420,7 +420,10 @@ restart:
>  		if (audit_pid) {
>  			if (err == -ECONNREFUSED || err == -EPERM
> 
>  			    || ++attempts >= AUDITD_RETRIES) {
> 
> -				audit_log_lost("audit_pid=%d reset");
> +				char s[32];
> +
> +				snprintf(s, sizeof(s), "audit_pid=%d reset", audit_pid);
> +				audit_log_lost(s);
>  				audit_pid = 0;
>  				audit_sock = NULL;
>  			} else {

-- 
paul moore
security @ redhat

  reply	other threads:[~2015-09-22 22:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-19 21:52 [PATCH] fixup! audit: try harder to send to auditd upon netlink failure Richard Guy Briggs
2015-09-22 22:32 ` Paul Moore [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-09-18  7:52 Richard Guy Briggs
2015-09-18  9:13 ` Steve Grubb
2015-09-18 10:02   ` Richard Guy Briggs
2015-09-18 20:33 ` Paul Moore
2015-09-19 21:52   ` Richard Guy Briggs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18505598.zxrNxOJe63@sifl \
    --to=pmoore@redhat.com \
    --cc=ctcard@hotmail.com \
    --cc=eparis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgb@redhat.com \
    --cc=sgrubb@redhat.com \
    --cc=v.rathor@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox