From: Miklos Szeredi Date: Fri, 29 Apr 2005 08:03:24 +0000 (+0000) Subject: fix X-Git-Tag: fuse_2_3_pre6~1 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9372ffdb976f3d6ede013909209ba636ae63c50b;p=qemu-gpiodev%2Flibfuse.git fix --- diff --git a/ChangeLog b/ChangeLog index d2ce216..fb75232 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-04-29 Miklos Szeredi + + * Make fusermount work with fuse kernel modules not yet supporting + the "group_id" option (added for the purpose of stricter + permission checking). + 2005-04-28 Miklos Szeredi * Check for hard-linked directories in lookup. This could cause diff --git a/util/fusermount.c b/util/fusermount.c index f55d92b..93a44e2 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -574,6 +574,11 @@ static int do_mount(const char *mnt, const char *type, mode_t rootmode, } res = mount(fsname, mnt, type, flags, optbuf); + if (res == -1 && errno == EINVAL) { + /* It could be an old version not supporting group_id */ + sprintf(d, "fd=%i,rootmode=%o,user_id=%i", fd, rootmode, getuid()); + res = mount(fsname, mnt, type, flags, optbuf); + } if (res == -1) { fprintf(stderr, "%s: mount failed: %s\n", progname, strerror(errno)); free(fsname);