]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fsnotify: optionally pass access range in file permission hooks
authorAmir Goldstein <amir73il@gmail.com>
Tue, 12 Dec 2023 09:44:40 +0000 (11:44 +0200)
committerChristian Brauner <brauner@kernel.org>
Tue, 12 Dec 2023 15:20:02 +0000 (16:20 +0100)
commitd9e5d31084b024734e64307521414ef0ae1d5333
tree5cad647473aa9eba5963c8d8caa7cf7dac635200
parentcb383f06686734ef04daf63a4369566800717b7b
fsnotify: optionally pass access range in file permission hooks

In preparation for pre-content permission events with file access range,
move fsnotify_file_perm() hook out of security_file_permission() and into
the callers.

Callers that have the access range information call the new hook
fsnotify_file_area_perm() with the access range.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20231212094440.250945-6-amir73il@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/open.c
fs/read_write.c
fs/readdir.c
fs/remap_range.c
include/linux/fsnotify.h
security/security.c