From 9c1b68d4f206274dc8a0d19d7964abd97c2e10fe Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 28 Apr 2005 09:55:09 +0000 Subject: fix --- util/fusermount.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'util/fusermount.c') diff --git a/util/fusermount.c b/util/fusermount.c index 1b79446..f55d92b 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -491,7 +491,7 @@ static int do_mount(const char *mnt, const char *type, mode_t rootmode, char *d; char *fsname = NULL; - optbuf = malloc(strlen(opts) + 64); + optbuf = malloc(strlen(opts) + 128); if (!optbuf) { fprintf(stderr, "%s: failed to allocate memory\n", progname); return -1; @@ -515,7 +515,8 @@ static int do_mount(const char *mnt, const char *type, mode_t rootmode, fsname[len - fsname_str_len] = '\0'; } else if (!begins_with(s, "fd=") && !begins_with(s, "rootmode=") && - !begins_with(s, "user_id=")) { + !begins_with(s, "user_id=") && + !begins_with(s, "group_id=")) { int on; int flag; int skip_option = 0; @@ -561,7 +562,8 @@ static int do_mount(const char *mnt, const char *type, mode_t rootmode, free(optbuf); return -1; } - sprintf(d, "fd=%i,rootmode=%o,user_id=%i", fd, rootmode, getuid()); + sprintf(d, "fd=%i,rootmode=%o,user_id=%i,group_id=%i", + fd, rootmode, getuid(), getgid()); if (fsname == NULL) { fsname = strdup(dev); if (!fsname) { -- cgit v1.2.3