fanotify: Allow users to request FAN_FS_ERROR events
[ Upstream commit 9709bd548f11a092d124698118013f66e1740f9b ] Wire up the FAN_FS_ERROR event in the fanotify_mark syscall, allowing user space to request the monitoring of FAN_FS_ERROR events. These events are limited to filesystem marks, so check it is the case in the syscall handler. Link: https://lore.kernel.org/r/20211025192746.66445-29-krisman@collabora.com Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
b0f01b7c08
commit
2eda014477
@@ -91,9 +91,13 @@ extern struct ctl_table fanotify_table[]; /* for sysctl */
|
||||
#define FANOTIFY_INODE_EVENTS (FANOTIFY_DIRENT_EVENTS | \
|
||||
FAN_ATTRIB | FAN_MOVE_SELF | FAN_DELETE_SELF)
|
||||
|
||||
/* Events that can only be reported with data type FSNOTIFY_EVENT_ERROR */
|
||||
#define FANOTIFY_ERROR_EVENTS (FAN_FS_ERROR)
|
||||
|
||||
/* Events that user can request to be notified on */
|
||||
#define FANOTIFY_EVENTS (FANOTIFY_PATH_EVENTS | \
|
||||
FANOTIFY_INODE_EVENTS)
|
||||
FANOTIFY_INODE_EVENTS | \
|
||||
FANOTIFY_ERROR_EVENTS)
|
||||
|
||||
/* Events that require a permission response from user */
|
||||
#define FANOTIFY_PERM_EVENTS (FAN_OPEN_PERM | FAN_ACCESS_PERM | \
|
||||
|
Reference in New Issue
Block a user