From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: How to make audit match only one rule?
Date: Mon, 29 Jul 2013 15:45:19 -0400 [thread overview]
Message-ID: <15281236.l4rs5po0AS@x2> (raw)
In-Reply-To: <CAP6dAmeNjBut7kz91zT_JcQBgj8njTbj7sUHYdFVA5DgHOesMw@mail.gmail.com>
On Monday, July 29, 2013 11:38:15 AM zhu xiuming wrote:
> HI
> I have two rules in my audit rules
> -a always,exit -F arch=b32 -S execve -k EXEC_LOG
> -w /etc/passwd -p wra -k identity
>
>
> When I enter
> cat /etc/passwd on the console
>
> Both rules are matched and there is redundant information in the log. How
> to make sure there is only one rule matched.
The problem is that two different events are actually occurring. The
granularity of the Linux audit system is at the syscall level rather than a
higher level such as commands. The first event you get is probably the execve
for /bin/cat. Then once that program starts running, it does an open syscall
of /etc/passwd. So the audit system matches twice.
On any single system call, the audit system only matches the first rule it
finds. It will not match twice on a single syscall.
-Steve
next prev parent reply other threads:[~2013-07-29 19:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 18:38 How to make audit match only one rule? zhu xiuming
2013-07-29 19:45 ` Steve Grubb [this message]
2013-07-29 21:47 ` zhu xiuming
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=15281236.l4rs5po0AS@x2 \
--to=sgrubb@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