All of lore.kernel.org
 help / color / mirror / Atom feed
* Audit reporting Invalid argument
@ 2016-05-09 13:40 Bhagwat, Shriniketan Manjunath
  2016-05-09 13:50 ` Steve Grubb
  0 siblings, 1 reply; 11+ messages in thread
From: Bhagwat, Shriniketan Manjunath @ 2016-05-09 13:40 UTC (permalink / raw)
  To: linux-audit


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

Hello,

I am trying to monitor multiple files using Linux audit. In order to get better performance, I am trying to reduce number of rules.
If I specify more than one path field  as in below example I am getting "Invalid argument".

Examle1:
# auditctl -a always,exit -F arch=x86_64 -F path=/home/secpack/test.c -F path=/home/secpack/test -S open
Error sending add rule data request (Invalid argument)
# auditctl -a always,exit -F arch=x86_64 -F path=/home/secpack/test.c -F dir=/tmp/ -S open
Error sending add rule data request (Invalid argument)

However, I am able to create a single rule to monitor multiple PIDs or UIDs as below.

Examle2:
# auditctl -a always,exit -F arch=x86_64 -F pid=3526 -F pid=3537
# auditctl -a always,exit -F arch=x86_64 -F auid=0 -F auid=512 -F auid=1002

As per the auditctl man page, Build a rule field takes up to 64 fields on a single command line. Each one must start with -F. Each field  equation  is  anded  with  each other  to  trigger  an audit record.
My question is,
1. specify more than one path field as in example1 is valid?
2. If not valid than how do I create single audit rule to monitor multiple files/directory?
3. If valid, then why "Invalid argument" is reported?
4. To monitor 10 files, should 10 audit rules required?
5.  if 10 rules are required, how to I optimize the rule for performance?

My next question is does Linux audit support regular expressions? How do I create audit rule to monitor /var/log/*.log?

# auditctl -a always,exit -F arch=x86_64 -F path=^/var/log/*.log$  -S open
Error sending add rule data request (Invalid argument)

If my questions are already documented, please guide me to the documentation.

Regards,
Ketan

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

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



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

end of thread, other threads:[~2016-06-14 13:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-09 13:40 Audit reporting Invalid argument Bhagwat, Shriniketan Manjunath
2016-05-09 13:50 ` Steve Grubb
2016-05-11 11:19   ` Bhagwat, Shriniketan Manjunath
2016-05-11 19:52     ` Steve Grubb
2016-05-14  9:40       ` Bhagwat, Shriniketan Manjunath
2016-05-16 12:53         ` Steve Grubb
2016-05-16 17:21           ` Richard Guy Briggs
2016-05-19  3:37           ` Bhagwat, Shriniketan Manjunath
2016-06-13  8:15           ` Bhagwat, Shriniketan Manjunath
2016-06-13 15:01             ` Steve Grubb
2016-06-14 13:44               ` Bhagwat, Shriniketan Manjunath

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.