diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-11-07 09:59:52 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 16:53:42 +0100 |
commit | befc649c2274a1c35f0cd1e888dd83652cbb0422 (patch) | |
tree | ccbbc9f286c50dd8c9f036408b71acda9f5dd427 /include | |
parent | [PATCH] FUSE: atomic create+open (diff) | |
download | linux-befc649c2274a1c35f0cd1e888dd83652cbb0422.tar.xz linux-befc649c2274a1c35f0cd1e888dd83652cbb0422.zip |
[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 { #define FATTR_SIZE (1 << 3) #define FATTR_ATIME (1 << 4) #define FATTR_MTIME (1 << 5) +#define FATTR_FH (1 << 6) /** * Flags returned by the OPEN request @@ -154,7 +155,20 @@ struct fuse_link_in { struct fuse_setattr_in { __u32 valid; __u32 padding; - struct fuse_attr attr; + __u64 fh; + __u64 size; + __u64 unused1; + __u64 atime; + __u64 mtime; + __u64 unused2; + __u32 atimensec; + __u32 mtimensec; + __u32 unused3; + __u32 mode; + __u32 unused4; + __u32 uid; + __u32 gid; + __u32 unused5; }; struct fuse_open_in { |