aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/fuse_i.h
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2007-10-17 02:31:03 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:43:04 -0400
commitebc14c4dbeb56195950058db9aa32de06c22de0d (patch)
tree479813b230af145fd8c08e24b11c405ef6d4a25c /fs/fuse/fuse_i.h
parent244f6385c2891e366a7de5f6746ccc257efd8952 (diff)
fuse: fix permission checking on sticky directories
The VFS checks sticky bits on the parent directory even if the filesystem defines it's own ->permission(). In some situations (sshfs, mountlo, etc) the user does have permission to delete a file even if the attribute based checking would not allow it. So work around this by storing the permission bits separately and returning them in stat(), but cutting the permission bits off from inode->i_mode. This is slightly hackish, but it's probably not worth it to add new infrastructure in VFS and a slight performance penalty for all filesystems, just for the sake of fuse. [Jan Engelhardt] cosmetic fixes Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r--fs/fuse/fuse_i.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index e0555d68b4a7..1764506fdd11 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -63,6 +63,10 @@ struct fuse_inode {
63 63
64 /** Time in jiffies until the file attributes are valid */ 64 /** Time in jiffies until the file attributes are valid */
65 u64 i_time; 65 u64 i_time;
66
67 /** The sticky bit in inode->i_mode may have been removed, so
68 preserve the original mode */
69 mode_t orig_i_mode;
66}; 70};
67 71
68/** FUSE specific file data */ 72/** FUSE specific file data */