public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Miloslav Trmac <mitr@redhat.com>
To: linux-audit@redhat.com
Subject: [PATCH] Fix error handing when searching for an interpreted value
Date: Thu, 31 Jan 2008 10:02:06 +0100	[thread overview]
Message-ID: <47A18E8E.8040008@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

Hello,
auparse would crash if there was an interpreted filter item defined and 
the field could not be interpreted (e.g. it had an invalid format).

The attached patch modifies auparse to use the raw value in such cases.
	Mirek

[-- Attachment #2: audit-1.6.6-auparse-crash.patch --]
[-- Type: text/x-patch, Size: 518 bytes --]

diff -ur audit/auparse/auparse.c audit-1.6.6/auparse/auparse.c
--- audit/auparse/auparse.c	2007-11-19 19:44:04.000000000 +0100
+++ audit-1.6.6/auparse/auparse.c	2008-01-31 09:41:02.000000000 +0100
@@ -899,9 +899,10 @@
 		if (search_op == AUSEARCH_EXISTS)
 			return 1;
 
+		val = NULL;
 		if ((rule->search_op & AUSEARCH_INTERPRETED) != 0)
 			val = nvlist_interp_cur_val(r);
-		else
+		if (val == NULL)
 			val = nvlist_get_cur_val(&r->nv);
 		rc = strcmp(rule->v.field.val, val);
 		if (search_op == AUSEARCH_EQUAL)

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



             reply	other threads:[~2008-01-31  9:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31  9:02 Miloslav Trmac [this message]
2008-01-31 15:03 ` [PATCH] Fix error handing when searching for an interpreted value Steve Grubb

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=47A18E8E.8040008@redhat.com \
    --to=mitr@redhat.com \
    --cc=linux-audit@redhat.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