]> git.ipfire.org Git - thirdparty/linux.git/commit
fsnotify: split fsnotify_perm() into two hooks
authorAmir Goldstein <amir73il@gmail.com>
Tue, 12 Dec 2023 09:44:38 +0000 (11:44 +0200)
committerChristian Brauner <brauner@kernel.org>
Tue, 12 Dec 2023 15:20:02 +0000 (16:20 +0100)
commit36e28c42187c95eb148873ffb059bfdcb8cdb75b
tree8d18f9bb5fa803c5d9e319f8c6e9abf09afd0c2a
parent705bcfcbde38b9dd4db00cd3deb0b98bddb0dd4a
fsnotify: split fsnotify_perm() into two hooks

We would like to make changes to the fsnotify access permission hook -
add file range arguments and add the pre modify event.

In preparation for these changes, split the fsnotify_perm() hook into
fsnotify_open_perm() and fsnotify_file_perm().

This is needed for fanotify "pre content" events.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20231212094440.250945-4-amir73il@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
include/linux/fsnotify.h
security/security.c