From: dump@tzib.net
To: linux-audit@redhat.com
Subject: auparse, stdin, and AUPARSE_CB_EVENT_READY
Date: Mon, 05 Mar 2012 16:23:32 -0800 [thread overview]
Message-ID: <4F555904.8000603@tzib.net> (raw)
Hi,
I made a audispd plugin, which reads from stdin and sends the strings to
auparse_feed() (auditd-2.1.3).
This works fine on the command line.
When called from audispd however, it gives AUPARSE_CB_EVENT_READY for
each single message, instead of after a complete event has been parsed.
So when you have 4 messages for one event:
- each of them appear as a single event when the plugin is started via
audispd.
- a single even for all 4 messages appear when the plugin is started on
the command line (and the log data fed via stdin, like cat test |
audispd-testplugin)
Looking at the write code it looks ok (audisp/audispd.c):
static int write_to_plugin(event_t *e, const char *string, size_t
string_len,
.. (note that i'm using string type so its the string code part)
if (conf->p->format == F_STRING) {
do {
rc = write(conf->p->plug_pipe[1], string, string_len);
} while (rc < 0 && errno == EINTR);
}
Do you know what causes this behavior, and/or how to "fix" it?
Thanks
next reply other threads:[~2012-03-06 0:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 0:23 dump [this message]
2012-03-07 16:50 ` auparse, stdin, and AUPARSE_CB_EVENT_READY Guillaume Destuynder
2012-03-07 17:19 ` Steve Grubb
2012-03-07 17:48 ` 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=4F555904.8000603@tzib.net \
--to=dump@tzib.net \
--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