Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1227739
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Richard Guy Briggs <rgb@redhat.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] fixup! audit: try harder to send to auditd upon netlink failure |
| Date | Fri, 18 Sep 2015 12:10:02 +0200 |
| Message-ID | <qa0Ma-7VN-29@gated-at.bofh.it> (permalink) |
| References | <q9YKm-4Mg-9@gated-at.bofh.it> <q9ZZM-6Jw-13@gated-at.bofh.it> |
| X-Original-To | Steve Grubb <sgrubb@redhat.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| X-Scanned-By | MIMEDefang 2.68 on 10.5.11.26 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 57 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-audit@redhat.com, linux-kernel@vger.kernel.org, pmoore@redhat.com, eparis@redhat.com, v.rathor@gmail.com, ctcard@hotmail.com |
| X-Original-Date | Fri, 18 Sep 2015 06:02:17 -0400 |
| X-Original-Message-ID | <20150918100217.GD3866@madcap2.tricolour.ca> |
| X-Original-References | <89a693758cd8f511892fe54c2e4aaf2cfca89e89.1442562580.git.rgb@redhat.com> <20150918101341.205b02b4@ivy-bridge> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1227739 |
Show key headers only | View raw
On 15/09/18, Steve Grubb wrote:
> On Fri, 18 Sep 2015 03:52:43 -0400
> Richard Guy Briggs <rgb@redhat.com> 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(-)
> >
> > diff --git a/kernel/audit.c b/kernel/audit.c
> > index 18cdfe2..60913e6 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];
> > +
> > + sprintf(s, "audit_pid=%d reset",
> > audit_pid);
>
> We normally use name=value for everything important. Reset by itself
> will get dropped by auparse. action=reset (or something similar) would
> be better.
This is sent to the system log when we can't queue it to audit, so audit
never sees this message. None of the other audit_log_lost messages are
formatted in the audit style.
> -Steve
>
> > + audit_log_lost(s);
> > audit_pid = 0;
> > audit_sock = NULL;
> > } else {
>
- 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] fixup! audit: try harder to send to auditd upon netlink failure Richard Guy Briggs <rgb@redhat.com> - 2015-09-18 10:00 +0200
Re: [PATCH] fixup! audit: try harder to send to auditd upon netlink failure Steve Grubb <sgrubb@redhat.com> - 2015-09-18 11:20 +0200
Re: [PATCH] fixup! audit: try harder to send to auditd upon netlink failure Richard Guy Briggs <rgb@redhat.com> - 2015-09-18 12:10 +0200
Re: [PATCH] fixup! audit: try harder to send to auditd upon netlink failure Paul Moore <pmoore@redhat.com> - 2015-09-18 22:40 +0200
Re: [PATCH] fixup! audit: try harder to send to auditd upon netlink failure Richard Guy Briggs <rgb@redhat.com> - 2015-09-20 00:00 +0200
csiph-web