aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/inode.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2004-07-02 16:20:45 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2004-07-02 16:20:45 +0000
commitacb4d36c3c91ffc076e76bd11ef8064bd51b4716 (patch)
treed47823cd63624d9a73fb5f1e695c420d208a4b42 /kernel/inode.c
parentad051c3e27ca6dd57dad57eb188dbcdcfab775fe (diff)
downloadlibfuse-acb4d36c3c91ffc076e76bd11ef8064bd51b4716.tar.gz
minor features
Diffstat (limited to 'kernel/inode.c')
-rw-r--r--kernel/inode.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/kernel/inode.c b/kernel/inode.c
index d94b3b2..f0ad932 100644
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -22,6 +22,19 @@
#include "compat/parser.h"
#endif
+
+static int user_allow_other;
+
+#ifdef KERNEL_2_6
+#include <linux/moduleparam.h>
+module_param(user_allow_other, int, 0);
+#else
+MODULE_PARM(user_allow_other, "i");
+#endif
+
+MODULE_PARM_DESC(user_allow_other, "Allow non root user to specify the \"allow_other\" mount option");
+
+
#define FUSE_SUPER_MAGIC 0x65735546
#ifndef KERNEL_2_6
@@ -309,7 +322,8 @@ static int fuse_read_super(struct super_block *sb, void *data, int silent)
if (!parse_fuse_opt((char *) data, &d))
return -EINVAL;
- if ((d.flags & FUSE_ALLOW_OTHER) && !capable(CAP_SYS_ADMIN))
+ if (!user_allow_other && (d.flags & FUSE_ALLOW_OTHER) &&
+ current->uid != 0)
return -EPERM;
sb->s_blocksize = PAGE_CACHE_SIZE;