From: Kevin Boyce <kevin.boyce@ngc.com>
To: zhangxiliang <zhangxiliang@cn.fujitsu.com>
Cc: dwmw2@infradead.org, linux-audit@redhat.com
Subject: Re: A question about the directory watch in audit_tree.c in kernel
Date: Tue, 20 May 2008 08:06:12 -0400 [thread overview]
Message-ID: <1211285172.20187.20.camel@pc070168.northgrum.com> (raw)
In-Reply-To: <001701c8ba16$77c11ad0$2e8da70a@fnste3fa5f55c4>
[-- Attachment #1.1: Type: text/plain, Size: 2226 bytes --]
Correct me if I am wrong, but in doing the auditctl -w /home, the only
thing that is being audited is the inode entry for the directory itself.
You need to construct an explicit list of each file you want to watch.
You can do this rather easily with a combination of find and awk.
Regards.
Kevin
On Tue, 2008-05-20 at 09:11 +0800, zhangxiliang wrote:
> HI,
> When I use "auditctl -w /home" to watch a directory, nothing about the
> directory changed can be output.
>
> I found the "audit tree handle_event" in audit_tree.c in kernel. It
> implements as follows:
>
> static void handle_event(struct inotify_watch *watch, u32 wd, u32 mask,
> u32 cookie, const char *dname, struct inode *inode)
> {
> struct audit_chunk *chunk = container_of(watch, struct audit_chunk, watch);
>
> if (mask & IN_IGNORED) {
> evict_chunk(chunk);
> put_inotify_watch(watch);
> }
> }
>
> In "handle_event", the mask can be "IN_MOVED_FROM", "IN_MOVED_TO",
> "IN_DELETE_SELF", "IN_IGNORED" and so on.
> Why it only deals with the mask " IN_IGNORED" and ignores the other
> mask?
>
> --
> Regards
> Zhang Xiliang
> --------------------------------------------------
> Zhang Xiliang
> Development Dept.I
> Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) 8/F., Civil Defense
> Building, No.189 Guangzhou Road, Nanjing, 210029, China
> TEL: +86+25-86630566-838
> COINS: 79955-838
> FAX: +86+25-83317685
> MAIL: zhangxiliang@cn.fujitsu.com
> --------------------------------------------------
> This communication is for use by the intended recipient(s) only and may
> contain information that is privileged, confidential and exempt from
> disclosure under applicable law. If you are not an intended recipient of this
> communication, you are hereby notified that any dissemination, distribution or
> copying hereof is strictly prohibited. If you have received this
> communication in error, please notify me by reply e-mail, permanently delete
> this communication from your system, and destroy any hard copies you may have
> printed.
>
>
>
>
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit
[-- Attachment #1.2: Type: text/html, Size: 3922 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2008-05-20 12:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 1:11 A question about the directory watch in audit_tree.c in kernel zhangxiliang
2008-05-20 12:06 ` Kevin Boyce [this message]
2008-05-20 12:41 ` Steve Grubb
2008-05-21 1:47 ` zhangxiliang
2008-05-21 15:03 ` Steve Grubb
2008-05-22 12:28 ` LC Bruzenak
2008-05-22 13:09 ` 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=1211285172.20187.20.camel@pc070168.northgrum.com \
--to=kevin.boyce@ngc.com \
--cc=dwmw2@infradead.org \
--cc=linux-audit@redhat.com \
--cc=zhangxiliang@cn.fujitsu.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