diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-27 09:53:58 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-27 09:53:58 -0800 |
commit | d40b2f4c94f221bd5aab205f945e6f88d3df0929 (patch) | |
tree | cbfaadf0a8842e6d408642d29eb7afe58acf63d1 /fs/fuse/ioctl.c | |
parent | da15efe1a8513e0a949f429338155a56667dc9c6 (diff) | |
parent | 1cc4606d19e3710bfab3f6704b87ff9580493c69 (diff) |
Merge tag 'fuse-update-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
Pull fuse updates from Miklos Szeredi:
- Fix regression in fileattr permission checking
- Fix possible hang during PID namespace destruction
- Add generic support for request extensions
- Add supplementary group list extension
- Add limited support for supplying supplementary groups in create
requests
- Documentation fixes
* tag 'fuse-update-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: add inode/permission checks to fileattr_get/fileattr_set
fuse: fix all W=1 kernel-doc warnings
fuse: in fuse_flush only wait if someone wants the return code
fuse: optional supplementary group in create requests
fuse: add request extension
Diffstat (limited to 'fs/fuse/ioctl.c')
-rw-r--r-- | fs/fuse/ioctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/fuse/ioctl.c b/fs/fuse/ioctl.c index e50a18ee6cc6..8e01bfdfc430 100644 --- a/fs/fuse/ioctl.c +++ b/fs/fuse/ioctl.c @@ -419,6 +419,12 @@ static struct fuse_file *fuse_priv_ioctl_prepare(struct inode *inode) struct fuse_mount *fm = get_fuse_mount(inode); bool isdir = S_ISDIR(inode->i_mode); + if (!fuse_allow_current_process(fm->fc)) + return ERR_PTR(-EACCES); + + if (fuse_is_bad(inode)) + return ERR_PTR(-EIO); + if (!S_ISREG(inode->i_mode) && !isdir) return ERR_PTR(-ENOTTY); |