diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2007-10-18 06:06:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 17:37:29 -0400 |
commit | e57ac68378a287d6336d187b26971f35f7ee7251 (patch) | |
tree | 12b9ae8cc79af2d0100582e6f933aba0f4619663 /fs/fuse/inode.c | |
parent | 42a2b6ad71b011144d21d88a124140bb2bf1023f (diff) |
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.c | 5 |
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) | |||
287 | struct fuse_statfs_out outarg; | 287 | struct fuse_statfs_out outarg; |
288 | int err; | 288 | int err; |
289 | 289 | ||
290 | if (!fuse_allow_task(fc, current)) { | ||
291 | buf->f_type = FUSE_SUPER_MAGIC; | ||
292 | return 0; | ||
293 | } | ||
294 | |||
290 | req = fuse_get_req(fc); | 295 | req = fuse_get_req(fc); |
291 | if (IS_ERR(req)) | 296 | if (IS_ERR(req)) |
292 | return PTR_ERR(req); | 297 | return PTR_ERR(req); |