diff options
| author | Matthew Bobrowski <mbobrowski@mbobrowski.org> | 2019-06-06 19:48:02 +1000 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2019-06-08 08:37:54 +0200 |
| commit | 0a4db6dc742d9150d73048e889de9e6accc53d46 (patch) | |
| tree | 05a54fd6c923cd03018e1bc41d857dccce56318d /man2/fanotify_init.2 | |
| parent | 59a4d9b398776ddd84fb8195b273c7716d0d5db0 (diff) | |
| download | man-pages-0a4db6dc742d.tar.gz | |
fanotify.7, fanotify_init.2, fanotify_mark.2: Document FAN_REPORT_FID and directory modification events
Details relating to the new initialization flag FAN_REPORT_FID has been
added. As part of the FAN_REPORT_FID feature, a new set of event masks are
available and have been documented accordingly.
A simple example program has been added to also support the understanding
and use of FAN_REPORT_FID and directory modification events.
Signed-off-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2/fanotify_init.2')
| -rw-r--r-- | man2/fanotify_init.2 | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/man2/fanotify_init.2 b/man2/fanotify_init.2 index 9be15be51e..ece4ae6a6a 100644 --- a/man2/fanotify_init.2 +++ b/man2/fanotify_init.2 @@ -40,8 +40,8 @@ queue associated with the group. .PP The file descriptor is used in calls to .BR fanotify_mark (2) -to specify the files, directories, and mounts for which fanotify events -shall be created. +to specify the files, directories, mounts or filesystems for which fanotify +events shall be created. These events are received by reading from the file descriptor. Some events are only informative, indicating that a file has been accessed. Other events can be used to determine whether @@ -94,6 +94,36 @@ already contain their final content. This notification class might be used by malware detection programs, for example. .TP +.BR FAN_REPORT_FID " (since Linux 5.1)" +.\" commit a8b13aa20afb69161b5123b4f1acc7ea0a03d360 +This value allows the receipt of events which contain additional information +about the underlying object correlated to an event. +An additional structure encapsulates the information about the object and is +included alongside the generic event metadata structure. +The file descriptor that is used to represent the object correlated to an +event is instead substituted with a file handle. +It is intended for applications that may find the use of a file handle to +identify an object more suitable than a file descriptor. +Additionally, it may be used for applications that are interested in +directory entry events, such as +.BR FAN_CREATE , +.BR FAN_ATTRIB , +.BR FAN_MOVE +and +.BR FAN_DELETE +for example. +Note that the use of directory modification events are not supported when +monitoring a mount point. +The use of +.BR FAN_CLASS_CONTENT +or +.BR FAN_CLASS_PRE_CONTENT +is not permitted with this flag and will result in the error +.BR EINVAL . +See +.BR fanotify (7) +for additional information. +.TP .B FAN_CLASS_NOTIF This is the default value. It does not need to be specified. @@ -224,6 +254,8 @@ An invalid value was passed in or .IR event_f_flags . .B FAN_ALL_INIT_FLAGS +(deprecated since Linux kernel version 4.20) +.\" commit 23c9deeb3285d34fd243abb3d6b9f07db60c3cf4 defines all allowable bits for .IR flags . .TP |
