All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Cc: Jan Lieskovsky <jlieskov@redhat.com>, Shawn Wells <shawn@redhat.com>
Subject: Re: Does the order / position of audit rule's arguments matter?
Date: Mon, 19 Jan 2015 12:59:47 -0500	[thread overview]
Message-ID: <2664220.tArxC4c8Gx@x2> (raw)
In-Reply-To: <2022844409.13837392.1421690231611.JavaMail.zimbra@redhat.com>

On Monday, January 19, 2015 12:57:11 PM Jan Lieskovsky wrote:
> Hello folks,
> 
>   wasn't able to find answer to the following question in the auditctl
> manual page, thus checking here - does the order / position in which the
> auditctl's | /etc/audit/audit.rules' audit rule arguments are listed in
> the rule matter or all permutations of the arguments are allowed?

Yes, its a first match wins system. I tell people to order from specific to 
general. IOW, put a watch on /etc/shadow before a watch on /etc.

-Steve

> IOW suppose the following rule:
>   -a always,exit -F path=/bin/ping -F perm=x -F auid>=500 -F
> auid!=4294967295 -k privileged
> 
> Is
>   -a always,exit -F path=/bin/ping -F perm=x -F auid>=500 -F
> auid!=4294967295 -k privileged
> 
> the only allowed form or are all the other possible argument permutations
> [*] also valid / supported (under assumption there isn't some option
> missing or some new option added of course when compared to the original
> rule)?
> 
> Thank you && Regards, Jan.
> --
> Jan iankko Lieskovsky / Red Hat Security Technologies Team
> 
> [*] For example suppose five different /etc/audit/audit.rules configurations
> would use the forms as follows below - do all of them represent equivalent
> requirement / setting? (regardless how much it's likely they would be
> expressed in that form of)
> 
> -a always,exit -F path=/bin/ping -F perm=x -F auid>=500 -F auid!=4294967295
> -k privileged -F path=/bin/ping -F perm=x -F auid>=500 -F auid!=4294967295
> -k privileged -a always,exit -F perm=x -F auid>=500 -F auid!=4294967295 -k
> privileged -a always, exit -F path/bin/ping -F auid>=500 -F
> auid!=4294967295 -k privileged -a always,exit -F path=/bin/ping -F perm=x
> -F auid!=4294967295 -k privileged -a always,exit -F path=/bin/ping -F
> perm=x -F auid>=500 ..
> 
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit

  reply	other threads:[~2015-01-19 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <638619010.13827110.1421689227230.JavaMail.zimbra@redhat.com>
2015-01-19 17:57 ` Does the order / position of audit rule's arguments matter? Jan Lieskovsky
2015-01-19 17:59   ` Steve Grubb [this message]
2015-01-19 18:06     ` Richard Guy Briggs
2015-01-19 18:11       ` Steve Grubb
2015-01-19 18:19         ` Jan Lieskovsky
2015-01-25 18:05           ` Steve Grubb

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=2664220.tArxC4c8Gx@x2 \
    --to=sgrubb@redhat.com \
    --cc=jlieskov@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=shawn@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 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.