public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Linda Knippers <linda.knippers@hp.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: audit_pid with multiple userspace auditd processes
Date: Wed, 07 Jan 2009 18:33:28 -0500	[thread overview]
Message-ID: <49653BC8.4060306@hp.com> (raw)
In-Reply-To: <200901071824.19764.sgrubb@redhat.com>

Steve Grubb wrote:
> On Wednesday 07 January 2009 06:11:37 pm Linda Knippers wrote:
>> The first makes more sense to me.  If an auditd is happily running,
>> starting a second one is an error.
> 
> Yes, but how can you detect that on an async protocol? The kernel would have 
> to look and verify the original pid is alive, then look to see if there is a 
> matching netlink socket for that pid. 

Eric said that if you start the auditd using the init script, the right
thing happened (the auditd didn't start?).  Couldn't auditd do the same
check itself, whatever that check is?
> 
> At some point in the past, the kernel only knew that an auditd was dead on 
> attempting to use the socket. I don't know if its still the same way, but if 
> it were, then you don't really know if the audit daemon is alive so you may 
> as well trust the second one under the assumption that its a restarted daemon 
> to replace the crashed one the kernel didn't know about yet.
> 
> 
>> Disconnecting a running auditd seems problematic.  What happens to audit
>> messages in flight?
> 
> It just won't get anything and will error out next time it tries to read 
> events.
> 
>> Is there a race where both auditds will be writing to 
>> the log? 
> 
> Yes, that is why the first needs to go away.

I think the second shouldn't start.

I was actually talking about the case where:
	auditd 1 reads record A
	auditd 2 starts and takes over
	auditd 2 reads record B
	auditd 2 writes record B
	auditd 1 writes record A

If auditd 2 can start while auditd 1 is still alive, that seems
bad.  You either get records out of order or, if you kill auditd 1,
you lose record A.

-- ljk

      reply	other threads:[~2009-01-07 23:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 21:36 audit_pid with multiple userspace auditd processes Eric Paris
2009-01-07 22:04 ` Linda Knippers
2009-01-07 22:10   ` Eric Paris
2009-01-07 22:12     ` Linda Knippers
2009-01-07 22:41 ` Steve Grubb
2009-01-07 22:54   ` Eric Paris
2009-01-07 23:07     ` Steve Grubb
2009-01-07 23:11       ` Linda Knippers
2009-01-07 23:24         ` Steve Grubb
2009-01-07 23:33           ` Linda Knippers [this message]

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=49653BC8.4060306@hp.com \
    --to=linda.knippers@hp.com \
    --cc=linux-audit@redhat.com \
    --cc=sgrubb@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