mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
fanotify: enable FAN_REPORT_FID init flag
When setting up an fanotify listener, user may request to get fid information in event instead of an open file descriptor. The fid obtained with event on a watched object contains the file handle returned by name_to_handle_at(2) and fsid returned by statfs(2). Restrict FAN_REPORT_FID to class FAN_CLASS_NOTIF, because we have have no good reason to support reporting fid on permission events. When setting a mark, we need to make sure that the filesystem supports encoding file handles with name_to_handle_at(2) and that statfs(2) encodes a non-zero fsid. Cc: <linux-api@vger.kernel.org> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
FAN_CLASS_PRE_CONTENT)
|
||||
|
||||
#define FANOTIFY_INIT_FLAGS (FANOTIFY_CLASS_BITS | \
|
||||
FAN_REPORT_TID | \
|
||||
FAN_REPORT_TID | FAN_REPORT_FID | \
|
||||
FAN_CLOEXEC | FAN_NONBLOCK | \
|
||||
FAN_UNLIMITED_QUEUE | FAN_UNLIMITED_MARKS)
|
||||
|
||||
|
Reference in New Issue
Block a user