summaryrefslogtreecommitdiffstats
path: root/include/linux/fuse.h
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-11-07 00:59:52 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:53:42 -0800
commitbefc649c2274a1c35f0cd1e888dd83652cbb0422 (patch)
treeccbbc9f286c50dd8c9f036408b71acda9f5dd427 /include/linux/fuse.h
parentfd72faac95d7e47610e981d7ed7b3c1529e55c88 (diff)
downloadop-kernel-dev-befc649c2274a1c35f0cd1e888dd83652cbb0422.zip
op-kernel-dev-befc649c2274a1c35f0cd1e888dd83652cbb0422.tar.gz
[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/linux/fuse.h')
-rw-r--r--include/linux/fuse.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index 45c398f..b76b558 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 {
OpenPOWER on IntegriCloud