* help needed: how to exclude a single file from being audited.
@ 2011-09-07 4:47 Vipin Rathor
2011-09-07 12:05 ` Steve Grubb
0 siblings, 1 reply; 3+ messages in thread
From: Vipin Rathor @ 2011-09-07 4:47 UTC (permalink / raw)
To: linux-audit
Hi Guys,
I've a situation here. I've put a watch on a directory (e.g. -w /etc).
Due to this, every action on files under this directory are being
audited.
Now I want to exclude a single file in that directory (e.g.
/etc/sysconfig/bash-prompt-xterm), how should I do that?
I tried something like this in my exclude list:
-a exclude,never -F path=/etc/sysconfig/bash-prompt-xterm
But got this error:
Only msgtype field can be used with exclude filter
Any idea, how to exclude a single file from a 'watched' directory?
Many thanks.
--
-Rathor
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: help needed: how to exclude a single file from being audited.
2011-09-07 4:47 help needed: how to exclude a single file from being audited Vipin Rathor
@ 2011-09-07 12:05 ` Steve Grubb
2011-09-08 5:38 ` Vipin Rathor
0 siblings, 1 reply; 3+ messages in thread
From: Steve Grubb @ 2011-09-07 12:05 UTC (permalink / raw)
To: linux-audit
On Wednesday, September 07, 2011 12:47:53 AM Vipin Rathor wrote:
> I've a situation here. I've put a watch on a directory (e.g. -w /etc).
> Due to this, every action on files under this directory are being
> audited.
> Now I want to exclude a single file in that directory (e.g.
> /etc/sysconfig/bash-prompt-xterm), how should I do that?
> I tried something like this in my exclude list:
> -a exclude,never -F path=/etc/sysconfig/bash-prompt-xterm
>
> But got this error:
> Only msgtype field can be used with exclude filter
>
> Any idea, how to exclude a single file from a 'watched' directory?
Path fields must be on the exit filter. Try:
-a exit,never -F path=/etc/sysconfig/bash-prompt-xterm
And this must be before the rule on the directory. Note that this is kernel version
dependent. There was a bug sometime ago where the kernel was not preserving the
ordering of file system watches and the never rules didn't work.
-Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: help needed: how to exclude a single file from being audited.
2011-09-07 12:05 ` Steve Grubb
@ 2011-09-08 5:38 ` Vipin Rathor
0 siblings, 0 replies; 3+ messages in thread
From: Vipin Rathor @ 2011-09-08 5:38 UTC (permalink / raw)
To: Steve Grubb; +Cc: linux-audit
Hi Steve,
Thank you for reply.
That worked !
On Wed, Sep 7, 2011 at 5:35 PM, Steve Grubb <sgrubb@redhat.com> wrote:
> On Wednesday, September 07, 2011 12:47:53 AM Vipin Rathor wrote:
>> I've a situation here. I've put a watch on a directory (e.g. -w /etc).
>> Due to this, every action on files under this directory are being
>> audited.
>> Now I want to exclude a single file in that directory (e.g.
>> /etc/sysconfig/bash-prompt-xterm), how should I do that?
>> I tried something like this in my exclude list:
>> -a exclude,never -F path=/etc/sysconfig/bash-prompt-xterm
>>
>> But got this error:
>> Only msgtype field can be used with exclude filter
>>
>> Any idea, how to exclude a single file from a 'watched' directory?
>
> Path fields must be on the exit filter. Try:
>
> -a exit,never -F path=/etc/sysconfig/bash-prompt-xterm
>
> And this must be before the rule on the directory. Note that this is kernel version
> dependent. There was a bug sometime ago where the kernel was not preserving the
> ordering of file system watches and the never rules didn't work.
>
> -Steve
>
--
-Rathor
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-08 5:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-07 4:47 help needed: how to exclude a single file from being audited Vipin Rathor
2011-09-07 12:05 ` Steve Grubb
2011-09-08 5:38 ` Vipin Rathor
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.