aboutsummaryrefslogtreecommitdiffstats
path: root/util
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 /util
parent3efcb5658dced829d07253b973e2395d2affbccf (diff)
downloadlibfuse-9c1b68d4f206274dc8a0d19d7964abd97c2e10fe.tar.gz
fix
Diffstat (limited to 'util')
-rw-r--r--util/fusermount.c8
1 files changed, 5 insertions, 3 deletions
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) {