diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-11-07 03:59:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:53:42 -0500 |
commit | befc649c2274a1c35f0cd1e888dd83652cbb0422 (patch) | |
tree | ccbbc9f286c50dd8c9f036408b71acda9f5dd427 /include | |
parent | fd72faac95d7e47610e981d7ed7b3c1529e55c88 (diff) |
[PATCH] FUSE: pass file handle in setattr
This patch passes the file handle supplied in iattr to userspace, in case the
->setattr() was invoked from sys_ftruncate(). This solves the permission
checking (or lack thereof) in ftruncate() for the class of filesystems served
by an unprivileged userspace process.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fuse.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 45c398f08247..b76b558b03d4 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -61,6 +61,7 @@ struct fuse_kstatfs { | |||
61 | #define FATTR_SIZE (1 << 3) | 61 | #define FATTR_SIZE (1 << 3) |
62 | #define FATTR_ATIME (1 << 4) | 62 | #define FATTR_ATIME (1 << 4) |
63 | #define FATTR_MTIME (1 << 5) | 63 | #define FATTR_MTIME (1 << 5) |
64 | #define FATTR_FH (1 << 6) | ||
64 | 65 | ||
65 | /** | 66 | /** |
66 | * Flags returned by the OPEN request | 67 | * Flags returned by the OPEN request |
@@ -154,7 +155,20 @@ struct fuse_link_in { | |||
154 | struct fuse_setattr_in { | 155 | struct fuse_setattr_in { |
155 | __u32 valid; | 156 | __u32 valid; |
156 | __u32 padding; | 157 | __u32 padding; |
157 | struct fuse_attr attr; | 158 | __u64 fh; |
159 | __u64 size; | ||
160 | __u64 unused1; | ||
161 | __u64 atime; | ||
162 | __u64 mtime; | ||
163 | __u64 unused2; | ||
164 | __u32 atimensec; | ||
165 | __u32 mtimensec; | ||
166 | __u32 unused3; | ||
167 | __u32 mode; | ||
168 | __u32 unused4; | ||
169 | __u32 uid; | ||
170 | __u32 gid; | ||
171 | __u32 unused5; | ||
158 | }; | 172 | }; |
159 | 173 | ||
160 | struct fuse_open_in { | 174 | struct fuse_open_in { |