diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2007-10-18 03:06:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 14:37:29 -0700 |
commit | e57ac68378a287d6336d187b26971f35f7ee7251 (patch) | |
tree | 12b9ae8cc79af2d0100582e6f933aba0f4619663 /fs/fuse/inode.c | |
parent | 42a2b6ad71b011144d21d88a124140bb2bf1023f (diff) | |
download | op-kernel-dev-e57ac68378a287d6336d187b26971f35f7ee7251.zip op-kernel-dev-e57ac68378a287d6336d187b26971f35f7ee7251.tar.gz |
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 fd07357..00bb5a2 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); |