public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* Watch in audit 1.6
@ 2009-01-20 16:11 Ameel Kamboh
  2009-01-20 16:54 ` Steve Grubb
  0 siblings, 1 reply; 2+ messages in thread
From: Ameel Kamboh @ 2009-01-20 16:11 UTC (permalink / raw)
  To: linux-audit


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

We are using audit 1.6 in our system.
When I add a watch rule for write and append to a directory, the log
will report any changes to the directory and all the sub directories as
well.
Is there a way to exclude watching sub directories as well.

Example:

Watch directory /var/mydir

The tree for mydir is as follows:

 /var/mydir
     |
     ---- runtime
     |
     ---- dir1
     |
     ---- dir2

I would like to watch /var/mydir + /var/mydir/dir1 + /var/mydir/dir2,
but exclude /var/mydir/runtime

Rule:
  -w /var/mydir -p aw

Is there a way to do what I am asking?

Ameel Kamboh
SIP Core Network and Security 
Phone: 972.685.4922 (esn 445-4922)
Mobile: 978-590-2280
SIP: akamboh@techtrial.com
email: akamboh@nortel.com




[-- Attachment #1.2: Type: text/html, Size: 2778 bytes --]

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Watch in audit 1.6
  2009-01-20 16:11 Watch in audit 1.6 Ameel Kamboh
@ 2009-01-20 16:54 ` Steve Grubb
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Grubb @ 2009-01-20 16:54 UTC (permalink / raw)
  To: linux-audit

On Tuesday 20 January 2009 11:11:52 am Ameel Kamboh wrote:
> Is there a way to exclude watching sub directories as well.

Today, not that I know of. A patch was submitted into the latest development 
kernel (2.6.29) to preserve watch ordering. But you will have to make some 
changes to the rules. A typical watch looks like this:

-w /var/mydir -p wa -k mywatch

its the same as:

-a always,exit -F dir=/var/mydir -F perms=wa -F key=mywatch

In the future, you will be able to do:

-a never,exit -F dir=/var/mydir/runtime
-a always,exit -F dir=/var/mydir -F perms=wa -F key=mywatch

in that specific order since first match wins.

-Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-20 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 16:11 Watch in audit 1.6 Ameel Kamboh
2009-01-20 16:54 ` Steve Grubb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox