From: Steve Grubb <sgrubb@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>, linux-audit@redhat.com
Cc: Vincent Abraham <vincent.ahm@gmail.com>
Subject: Re: Comprehensive Documentation on the Linux Audit Framework
Date: Tue, 06 Jun 2023 15:08:47 -0400 [thread overview]
Message-ID: <10292049.nUPlyArG6x@x2> (raw)
In-Reply-To: <CAMKmEH_hfOO_9a=QmUC9dQezA_hn0Kj-78hsK5GpXFbNXx2G_w@mail.gmail.com>
On Tuesday, June 6, 2023 6:31:55 PM EDT Vincent Abraham wrote:
> Thanks. Could you also point to portions in the codebase where these
> functions are called for monitoring file access?
I'll let Richard or Paul point to the place in the kernel if that's
necessary. I think there's a fundamental mismatch and it might not matter.
> The reason I'm asking for this is that I'm trying to provide auditing for
> files of a specific type and I'm trying to understand how would that work.
The way the audit system works is there is a rule engine in the kernel. User
space loads the rules and and listens for events. The kernel does all the
work. This rule matching can be done by a limited set of attributes which for
a file would be path, kind of access, who is accessing it, program accessing
it, portions of se linux labeling, and a few other things.
You cannot match by type or anything that looks like a glob. You can arrange
them in a directory and watch the whole directory. You can create a script
that looks for files of a certain type and load rules specifically for them
into the kernel (with a specific key so you can find them later). Or you can
plug into auditd as a plugin and filter the events and write them to your own
log.
There might be some other approaches such as using fanotify and filtering
those events yourself.
-Steve
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
next prev parent reply other threads:[~2023-06-06 19:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMKmEH-s9kZn5kqkjb_QHA2X02TWX+utqu365-7cRKMM7E5eVQ@mail.gmail.com>
2023-06-05 18:46 ` Comprehensive Documentation on the Linux Audit Framework Richard Guy Briggs
2023-06-05 21:28 ` Steve Grubb
[not found] ` <ZH5VgjpTytqaj5i5@madcap2.tricolour.ca>
[not found] ` <CAMKmEH_hfOO_9a=QmUC9dQezA_hn0Kj-78hsK5GpXFbNXx2G_w@mail.gmail.com>
2023-06-06 19:08 ` Steve Grubb [this message]
2023-06-06 22:01 ` Paul Moore
2023-06-07 2:31 ` Richard Guy Briggs
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=10292049.nUPlyArG6x@x2 \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.com \
--cc=rgb@redhat.com \
--cc=vincent.ahm@gmail.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