* How to make audit match only one rule?
@ 2013-07-29 18:38 zhu xiuming
2013-07-29 19:45 ` Steve Grubb
0 siblings, 1 reply; 3+ messages in thread
From: zhu xiuming @ 2013-07-29 18:38 UTC (permalink / raw)
To: Linux-audit@redhat.com
[-- Attachment #1.1: Type: text/plain, Size: 308 bytes --]
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.
Thanks a lot.
[-- Attachment #1.2: Type: text/html, Size: 487 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to make audit match only one rule?
2013-07-29 18:38 How to make audit match only one rule? zhu xiuming
@ 2013-07-29 19:45 ` Steve Grubb
2013-07-29 21:47 ` zhu xiuming
0 siblings, 1 reply; 3+ messages in thread
From: Steve Grubb @ 2013-07-29 19:45 UTC (permalink / raw)
To: linux-audit
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to make audit match only one rule?
2013-07-29 19:45 ` Steve Grubb
@ 2013-07-29 21:47 ` zhu xiuming
0 siblings, 0 replies; 3+ messages in thread
From: zhu xiuming @ 2013-07-29 21:47 UTC (permalink / raw)
To: Steve Grubb; +Cc: Linux-audit@redhat.com
[-- Attachment #1.1: Type: text/plain, Size: 1011 bytes --]
That makes sense.
Thanks a lot
On Mon, Jul 29, 2013 at 12:45 PM, Steve Grubb <sgrubb@redhat.com> wrote:
> 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
>
[-- Attachment #1.2: Type: text/html, Size: 1530 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-29 21:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-29 18:38 How to make audit match only one rule? zhu xiuming
2013-07-29 19:45 ` Steve Grubb
2013-07-29 21:47 ` zhu xiuming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox