aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/inode.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-04-28 09:55:09 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2005-04-28 09:55:09 +0000
commit9c1b68d4f206274dc8a0d19d7964abd97c2e10fe (patch)
tree56a9a8f93dd51d5c8997db37ac724da296b715c9 /kernel/inode.c
parent3efcb5658dced829d07253b973e2395d2affbccf (diff)
downloadlibfuse-9c1b68d4f206274dc8a0d19d7964abd97c2e10fe.tar.gz
fix
Diffstat (limited to 'kernel/inode.c')
-rw-r--r--kernel/inode.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/inode.c b/kernel/inode.c
index 9b894f5..6ef9491 100644
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -43,6 +43,7 @@ struct fuse_mount_data {
int fd;
unsigned rootmode;
unsigned user_id;
+ unsigned group_id;
unsigned flags;
unsigned max_read;
};
@@ -262,6 +263,7 @@ static void fuse_put_super(struct super_block *sb)
spin_lock(&fuse_lock);
fc->mounted = 0;
fc->user_id = 0;
+ fc->group_id = 0;
fc->flags = 0;
/* Flush all readers on this fs */
wake_up_all(&fc->waitq);
@@ -311,6 +313,7 @@ enum {
OPT_FD,
OPT_ROOTMODE,
OPT_USER_ID,
+ OPT_GROUP_ID,
OPT_DEFAULT_PERMISSIONS,
OPT_ALLOW_OTHER,
OPT_KERNEL_CACHE,
@@ -326,6 +329,7 @@ static match_table_t tokens = {
{OPT_FD, "fd=%u"},
{OPT_ROOTMODE, "rootmode=%o"},
{OPT_USER_ID, "user_id=%u"},
+ {OPT_GROUP_ID, "group_id=%u"},
{OPT_DEFAULT_PERMISSIONS, "default_permissions"},
{OPT_ALLOW_OTHER, "allow_other"},
{OPT_KERNEL_CACHE, "kernel_cache"},
@@ -371,6 +375,12 @@ static int parse_fuse_opt(char *opt, struct fuse_mount_data *d)
d->user_id = value;
break;
+ case OPT_GROUP_ID:
+ if (match_int(&args[0], &value))
+ return 0;
+ d->group_id = value;
+ break;
+
case OPT_DEFAULT_PERMISSIONS:
d->flags |= FUSE_DEFAULT_PERMISSIONS;
break;
@@ -413,6 +423,7 @@ static int fuse_show_options(struct seq_file *m, struct vfsmount *mnt)
struct fuse_conn *fc = get_fuse_conn_super(mnt->mnt_sb);
seq_printf(m, ",user_id=%u", fc->user_id);
+ seq_printf(m, ",group_id=%u", fc->group_id);
if (fc->flags & FUSE_DEFAULT_PERMISSIONS)
seq_puts(m, ",default_permissions");
if (fc->flags & FUSE_ALLOW_OTHER)
@@ -619,6 +630,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
fc->flags = d.flags;
fc->user_id = d.user_id;
+ fc->group_id = d.group_id;
fc->max_read = d.max_read;
#ifdef KERNEL_2_6
if (fc->max_read / PAGE_CACHE_SIZE < fc->bdi.ra_pages)