text
stringlengths 0
234
|
---|
.i flags |
argument contains a multi-bit field defining the notification class of the |
listening application and further single bit fields specifying the behavior |
of the file descriptor. |
.pp |
if multiple listeners for permission events exist, |
the notification class is used to establish the sequence |
in which the listeners receive the events. |
.pp |
only one of the following notification classes may be specified in |
.ir flags : |
.tp |
.b fan_class_pre_content |
this value allows the receipt of events notifying that a file has been |
accessed and events for permission decisions if a file may be accessed. |
it is intended for event listeners that need to access files before they |
contain their final data. |
this notification class might be used by hierarchical storage managers, |
for example. |
.tp |
.b fan_class_content |
this value allows the receipt of events notifying that a file has been |
accessed and events for permission decisions if a file may be accessed. |
it is intended for event listeners that need to access files when they |
already contain their final content. |
this notification class might be used by malware detection programs, for |
example. |
.tp |
.b fan_class_notif |
this is the default value. |
it does not need to be specified. |
this value only allows the receipt of events notifying that a file has been |
accessed. |
permission decisions before the file is accessed are not possible. |
.pp |
listeners with different notification classes will receive events in the |
order |
.br fan_class_pre_content , |
.br fan_class_content , |
.br fan_class_notif . |
the order of notification for listeners in the same notification class |
is undefined. |
.pp |
the following bits can additionally be set in |
.ir flags : |
.tp |
.b fan_cloexec |
set the close-on-exec flag |
.rb ( fd_cloexec ) |
on the new file descriptor. |
see the description of the |
.b o_cloexec |
flag in |
.br open (2). |
.tp |
.b fan_nonblock |
enable the nonblocking flag |
.rb ( o_nonblock ) |
for the file descriptor. |
reading from the file descriptor will not block. |
instead, if no data is available, |
.br read (2) |
fails with the error |
.br eagain . |
.tp |
.b fan_unlimited_queue |
remove the limit of 16384 events for the event queue. |
use of this flag requires the |
.b cap_sys_admin |
capability. |
.tp |
.b fan_unlimited_marks |
remove the limit of 8192 marks. |
use of this flag requires the |
.b cap_sys_admin |
capability. |
.tp |
.br fan_report_tid " (since linux 4.20)" |
.\" commit d0a6a87e40da49cfc7954c491d3065a25a641b29 |
report thread id (tid) instead of process id (pid) |
in the |
.i pid |
field of the |
.i "struct fanotify_event_metadata" |
supplied to |
.br read (2) |
(see |
.br fanotify (7)). |
.tp |
.br fan_enable_audit " (since linux 4.15)" |
.\" commit de8cd83e91bc3ee212b3e6ec6e4283af9e4ab269 |
enable generation of audit log records about access mediation performed by |
permission events. |
the permission event response has to be marked with the |
.b fan_audit |
flag for an audit log record to be generated. |
.tp |
.br fan_report_fid " (since linux 5.1)" |
.\" commit a8b13aa20afb69161b5123b4f1acc7ea0a03d360 |
this value allows the receipt of events which contain additional information |
Subsets and Splits