diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-06-25 08:48:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:01:20 -0400 |
commit | 9c8ef5614da22666e339b125263d315cfaa89109 (patch) | |
tree | 860044f1b2c0c6189143b1c9daf263bd8ff5e5e0 /fs/fuse/fuse_i.h | |
parent | a4d27e75ffb7b8ecb7eed0c7db0df975525f3fd7 (diff) |
[PATCH] fuse: scramble lock owner ID
VFS uses current->files pointer as lock owner ID, and it wouldn't be
prudent to expose this value to userspace. So scramble it with XTEA using
a per connection random key, known only to the kernel. Only one direction
needs to be implemented, since the ID is never sent in the reverse
direction.
The XTEA algorithm is implemented inline since it's simple enough to do so,
and this adds less complexity than if the crypto API were used.
Thanks to Jesper Juhl for the idea.
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 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index c862df58da92..0dbf96621841 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h | |||
@@ -359,6 +359,9 @@ struct fuse_conn { | |||
359 | 359 | ||
360 | /** O_ASYNC requests */ | 360 | /** O_ASYNC requests */ |
361 | struct fasync_struct *fasync; | 361 | struct fasync_struct *fasync; |
362 | |||
363 | /** Key for lock owner ID scrambling */ | ||
364 | u32 scramble_key[4]; | ||
362 | }; | 365 | }; |
363 | 366 | ||
364 | static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb) | 367 | static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb) |