From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: audit rules watching paths
Date: Sun, 12 Mar 2017 19:21:43 -0400 [thread overview]
Message-ID: <1542935.vRkC1dSNkE@x2> (raw)
In-Reply-To: <52efd6db-ce51-0cb2-124c-b88241ffa09e@gmail.com>
On Saturday, March 11, 2017 11:48:53 PM EDT Warron French wrote:
> I know that I can add to the audit.rules file a rule like
>
> -w /etc/ -p rawx -k watch_Etc
>
> But how far down will this sort of audit rule monitor /etc/? How many
> levels deep?
The "-w /etc" is the same thing as "-F dir=/etc". They both go down all the
way until you hit a new mount point. So, for the sake of discussion, suppose
/dev/sdb3 was mounted at /etc/sysconfig/, then anything under /etc/sysconfig/
will not be audited. To fix this, you need to add a rule with the -q option to
tell the kernel that the mounted file system should be considered equivalent to
the directory being watched.
I also think that if you have any symlinks that point out of the subtree, that
they may not get watched because they actually resolve to another path. I'd
have to test that to be 100% sure, though.
Also note that during path resolution if there is a permission problem at a
directory level and the object was below it, you may not get an event or only
an event at the directory where the permission was blocked.
-Steve
prev parent reply other threads:[~2017-03-12 23:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-12 4:48 audit rules watching paths Warron French
2017-03-12 23:21 ` Steve Grubb [this message]
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=1542935.vRkC1dSNkE@x2 \
--to=sgrubb@redhat.com \
--cc=linux-audit@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox