fix
authorMiklos Szeredi <miklos@szeredi.hu>
Fri, 29 Apr 2005 08:03:24 +0000 (08:03 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Fri, 29 Apr 2005 08:03:24 +0000 (08:03 +0000)
ChangeLog
util/fusermount.c

index d2ce216bb23d035ace95f6cb567d5da69f18f4ef..fb75232c627a81bdadd0c81a142956b2197c3a0e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-04-29  Miklos Szeredi <miklos@szeredi.hu>
+
+       * 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 <miklos@szeredi.hu>
 
        * Check for hard-linked directories in lookup.  This could cause
index f55d92bbff665585a93c36c491e9292dde31a97b..93a44e2b4f895da9ed6712813f6b9751c49971d8 100644 (file)
@@ -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);