All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Antill <james.antill@redhat.com>
To: John Dennis <jdennis@redhat.com>
Cc: linux-audit@redhat.com, Abhishek Gupta <abhikiki@gmail.com>
Subject: Re: difficulty with TYPE
Date: Tue, 15 Jan 2008 09:20:31 -0500	[thread overview]
Message-ID: <1200406831.30787.8.camel@code.and.org> (raw)
In-Reply-To: <478CBBFC.8090303@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 870 bytes --]


On Tue, 2008-01-15 at 08:58 -0500, John Dennis wrote:
> James Antill wrote:
> >  The second iovec above can't just be MAX_AUDIT_MESSAGE_LENGTH, or if
> > there are two messages you'll read some/all of the next one(s). You
> > either need to read the header first and then use hdr.size, or separate
> > the IO from the parsing.
> >  Also you can't just check for readv() as above, you need to check that
> > you've read the amount of data you want, and if you didn't get it all
> > yet then loop. 
> 
> This is why we provide libraries to do things like this, it can be 
> tricky to get right. The feed() interface to auparse consumes arbitrary 

 auparse_feed() works off log files and the audispd "string" format. The
above code was using the auditd -> audispd format, so that API doesn't
work.

-- 
James Antill <james.antill@redhat.com>
Red Hat

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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



  reply	other threads:[~2008-01-15 14:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-15  7:14 difficulty with TYPE Abhishek Gupta
2008-01-15 13:33 ` James Antill
2008-01-15 13:58   ` John Dennis
2008-01-15 14:20     ` James Antill [this message]
2008-01-15 14:41       ` John Dennis
2008-01-15 14:59         ` Steve Grubb
2008-01-15 14:29   ` 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=1200406831.30787.8.camel@code.and.org \
    --to=james.antill@redhat.com \
    --cc=abhikiki@gmail.com \
    --cc=jdennis@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.