summaryrefslogtreecommitdiffstats
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2007-10-18 12:06:58 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-18 23:37:29 +0200
commite57ac68378a287d6336d187b26971f35f7ee7251 (patch)
tree12b9ae8cc79af2d0100582e6f933aba0f4619663 /fs/fuse/inode.c
parentext3: fix setup_new_group_blocks locking (diff)
downloadlinux-e57ac68378a287d6336d187b26971f35f7ee7251.tar.xz
linux-e57ac68378a287d6336d187b26971f35f7ee7251.zip
fuse: fix allowing operations
The following operation didn't check if sending the request was allowed: setattr listxattr statfs Some other operations don't explicitly do the check, but VFS calls ->permission() which checks this. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r--fs/fuse/inode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index fd0735715c14..00bb5a255ded 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -287,6 +287,11 @@ static int fuse_statfs(struct dentry *dentry, struct kstatfs *buf)
struct fuse_statfs_out outarg;
int err;
+ if (!fuse_allow_task(fc, current)) {
+ buf->f_type = FUSE_SUPER_MAGIC;
+ return 0;
+ }
+
req = fuse_get_req(fc);
if (IS_ERR(req))
return PTR_ERR(req);