]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit - include/linux/fsnotify.h
fanotify: introduce new event mask FAN_OPEN_EXEC
authorMatthew Bobrowski <mbobrowski@mbobrowski.org>
Thu, 8 Nov 2018 03:07:14 +0000 (14:07 +1100)
committerJan Kara <jack@suse.cz>
Tue, 13 Nov 2018 17:41:04 +0000 (18:41 +0100)
commit9b076f1c0f4869b838a1b7aa0edb5664d47ec8aa
treeba17374f906f64d4f8e4c017ba9bc8b5820a02f2
parent2d10b23082a7eb8be508b3789f2e7250a88a5ddb
fanotify: introduce new event mask FAN_OPEN_EXEC

A new event mask FAN_OPEN_EXEC has been defined so that users have the
ability to receive events specifically when a file has been opened with
the intent to be executed. Events of FAN_OPEN_EXEC type will be
generated when a file has been opened using either execve(), execveat()
or uselib() system calls.

The feature is implemented within fsnotify_open() by generating the
FAN_OPEN_EXEC event type if __FMODE_EXEC is set within file->f_flags.

Signed-off-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c
fs/notify/fsnotify.c
include/linux/fanotify.h
include/linux/fsnotify.h
include/linux/fsnotify_backend.h
include/uapi/linux/fanotify.h