diff options
author | 2023-12-12 11:44:38 +0200 | |
---|---|---|
committer | 2023-12-12 16:20:02 +0100 | |
commit | 36e28c42187c95eb148873ffb059bfdcb8cdb75b (patch) | |
tree | 8d18f9bb5fa803c5d9e319f8c6e9abf09afd0c2a /security/security.c | |
parent | fs: use splice_copy_file_range() inline helper (diff) | |
download | linux-rng-36e28c42187c95eb148873ffb059bfdcb8cdb75b.tar.xz linux-rng-36e28c42187c95eb148873ffb059bfdcb8cdb75b.zip |
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>
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/security.c b/security/security.c index dcb3e7014f9b..d7f3703c5905 100644 --- a/security/security.c +++ b/security/security.c @@ -2586,7 +2586,7 @@ int security_file_permission(struct file *file, int mask) if (ret) return ret; - return fsnotify_perm(file, mask); + return fsnotify_file_perm(file, mask); } /** @@ -2837,7 +2837,7 @@ int security_file_open(struct file *file) if (ret) return ret; - return fsnotify_perm(file, MAY_OPEN); + return fsnotify_open_perm(file); } /** |