Question about setting watches in auto-mounted directories in RHEL 5.2
Alexander Viro
aviro at redhat.com
Sun Nov 30 15:11:10 UTC 2008
On Sun, Nov 30, 2008 at 09:15:52AM -0500, Steve Grubb wrote:
> On Friday 21 November 2008 11:59:46 Taylor_Tad at emc.com wrote:
> > I'd like to set a file system watch so that any activity in an
> > auto-mounted directory is audited.
>
> You can't at this point in time. When the rule is loaded, it needs to resolve
> the path down to a device and inode. If the file system is not mounted, it
> cannot do this and the rule is rejected.
>
>
> > It looks like just setting a watchon a parent directory isn't sufficient. For
> > example, if I have directory path /dir1/dir2 and auto-mount something at
> > /dir1/dir2/mount-dir, setting a file system watch on /dir1/dir2 doesn't
> > detect activity in the auto-mounted subtree.
>
> True.
>
> > Looking at the auditctl man page, it looks like I'd have to issue a command
> > like "/sbin/auditctl -q /dir1/dir2/mount-dir,/dir1/dir2" to tell the kernel
> > to watch the newly mounted file system as well.
>
> Yes.
>
>
> > Unfortunately, auto-mounts are, well, automatic, so there's no one to issue
> > that command.
You do realize that they are, in the end, done from userland? Which is
the natural place to do that...
More information about the Linux-audit
mailing list