diff options
author | Matthew Bobrowski <mbobrowski@mbobrowski.org> | 2018-11-08 14:12:44 +1100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2018-11-13 18:41:05 +0100 |
commit | 66917a3130f218dcef9eeab4fd11a71cd00cd7c9 (patch) | |
tree | afe9aa84ea4a400f4e652e542caf1481c06873d5 /include/linux/fanotify.h | |
parent | a704bba5e3ec3eedddad3c2baa9b7cfa0e2b3388 (diff) | |
download | lwn-66917a3130f218dcef9eeab4fd11a71cd00cd7c9.tar.gz lwn-66917a3130f218dcef9eeab4fd11a71cd00cd7c9.zip |
fanotify: introduce new event mask FAN_OPEN_EXEC_PERM
A new event mask FAN_OPEN_EXEC_PERM has been defined. This allows users
to receive events and grant access to files that are intending to be
opened for execution. Events of FAN_OPEN_EXEC_PERM type will be
generated when a file has been opened by using either execve(),
execveat() or uselib() system calls.
This acts in the same manner as previous permission event mask, meaning
that an access response is required from the user application in order
to permit any further operations on the file.
Signed-off-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/linux/fanotify.h')
-rw-r--r-- | include/linux/fanotify.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h index c521e4264f2b..9e2142795335 100644 --- a/include/linux/fanotify.h +++ b/include/linux/fanotify.h @@ -40,7 +40,8 @@ FAN_CLOSE | FAN_OPEN | FAN_OPEN_EXEC) /* Events that require a permission response from user */ -#define FANOTIFY_PERM_EVENTS (FAN_OPEN_PERM | FAN_ACCESS_PERM) +#define FANOTIFY_PERM_EVENTS (FAN_OPEN_PERM | FAN_ACCESS_PERM | \ + FAN_OPEN_EXEC_PERM) /* Extra flags that may be reported with event or control handling of events */ #define FANOTIFY_EVENT_FLAGS (FAN_EVENT_ON_CHILD | FAN_ONDIR) |