aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-09-09 16:10:26 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 17:03:44 -0400
commitd8a5ba45457e4a22aa39c939121efd7bb6c76672 (patch)
tree686aa90d8c953326b8d2eeef9352e456cdb0ad52 /include
parent04578f174f43d29b569500f01ba772afa4016330 (diff)
[PATCH] FUSE - core
This patch adds FUSE core. This contains the following files: o inode.c - superblock operations (alloc_inode, destroy_inode, read_inode, clear_inode, put_super, show_options) - registers FUSE filesystem o fuse_i.h - private header file Requirements ============ The most important difference between orinary filesystems and FUSE is the fact, that the filesystem data/metadata is provided by a userspace process run with the privileges of the mount "owner" instead of the kernel, or some remote entity usually running with elevated privileges. The security implication of this is that a non-privileged user must not be able to use this capability to compromise the system. Obvious requirements arising from this are: - mount owner should not be able to get elevated privileges with the help of the mounted filesystem - mount owner should not be able to induce undesired behavior in other users' or the super user's processes - mount owner should not get illegitimate access to information from other users' and the super user's processes These are currently ensured with the following constraints: 1) mount is only allowed to directory or file which the mount owner can modify without limitation (write access + no sticky bit for directories) 2) nosuid,nodev mount options are forced 3) any process running with fsuid different from the owner is denied all access to the filesystem 1) and 2) are ensured by the "fusermount" mount utility which is a setuid root application doing the actual mount operation. 3) is ensured by a check in the permission() method in kernel I started thinking about doing 3) in a different way because Christoph H. made a big deal out of it, saying that FUSE is unacceptable into mainline in this form. The suggested use of private namespaces would be OK, but in their current form have many limitations that make their use impractical (as discussed in this thread). Suggested improvements that would address these limitations: - implement shared subtrees - allow a process to join an existing namespace (make namespaces first-class objects) - implement the namespace creation/joining in a PAM module With all that in place the check of owner against current->fsuid may be removed from the FUSE kernel module, without compromising the security requirements. Suid programs still interesting questions, since they get access even to the private namespace causing some information leak (exact order/timing of filesystem operations performed), giving some ptrace-like capabilities to unprivileged users. BTW this problem is not strictly limited to the namespace approach, since suid programs setting fsuid and accessing users' files will succeed with the current approach too. 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.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
new file mode 100644
index 000000000000..2b1f4ae01e9d
--- /dev/null
+++ b/include/linux/fuse.h
@@ -0,0 +1,38 @@
1/*
2 FUSE: Filesystem in Userspace
3 Copyright (C) 2001-2005 Miklos Szeredi <miklos@szeredi.hu>
4
5 This program can be distributed under the terms of the GNU GPL.
6 See the file COPYING.
7*/
8
9/* This file defines the kernel interface of FUSE */
10
11#include <asm/types.h>
12
13/** Version number of this interface */
14#define FUSE_KERNEL_VERSION 5
15
16/** Minor version number of this interface */
17#define FUSE_KERNEL_MINOR_VERSION 1
18
19/** The node ID of the root inode */
20#define FUSE_ROOT_ID 1
21
22struct fuse_attr {
23 __u64 ino;
24 __u64 size;
25 __u64 blocks;
26 __u64 atime;
27 __u64 mtime;
28 __u64 ctime;
29 __u32 atimensec;
30 __u32 mtimensec;
31 __u32 ctimensec;
32 __u32 mode;
33 __u32 nlink;
34 __u32 uid;
35 __u32 gid;
36 __u32 rdev;
37};
38