Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix #35 #36

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions patches/libfuse/mount.c.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
diff --git a/lib/mount.c b/lib/mount.c
index d71e6fc55..acc1711ff 100644
--- a/lib/mount.c
+++ b/lib/mount.c
@@ -41,7 +41,6 @@
Expand All @@ -10,7 +8,7 @@ index d71e6fc55..acc1711ff 100644
#define FUSE_COMMFD_ENV "_FUSE_COMMFD"

#ifndef HAVE_FORK
@@ -117,17 +116,79 @@ static const struct fuse_opt fuse_mount_opts[] = {
@@ -117,17 +116,81 @@
FUSE_OPT_END
};

Expand Down Expand Up @@ -65,8 +63,10 @@ index d71e6fc55..acc1711ff 100644
+ // For i = 4...99, check if there is a binary called "fusermount" + i
+ // It is not yet known whether this will work for our purposes, but it is better than not even attempting
+ for (int i = 4; i < 100; i++) {
+ prog = findBinaryInFusermountDir("fusermount" + i);
+ if (access(prog, X_OK) == 0)
+ char binaryName[13]; // "fusermount" + two digits + null terminator
+ snprintf(binaryName, sizeof(binaryName), "fusermount%d", i);
+ prog = findBinaryInFusermountDir(binaryName);
+ if (prog != NULL && access(prog, X_OK) == 0)
+ return prog;
+ }
+
Expand All @@ -93,7 +93,7 @@ index d71e6fc55..acc1711ff 100644
exec_fusermount(argv);
_exit(1);
} else if (pid != -1)
@@ -300,7 +361,7 @@ void fuse_kern_unmount(const char *mountpoint, int fd)
@@ -300,7 +363,7 @@
return;

if(pid == 0) {
Expand All @@ -102,7 +102,7 @@ index d71e6fc55..acc1711ff 100644
"--", mountpoint, NULL };

exec_fusermount(argv);
@@ -346,7 +407,7 @@ static int setup_auto_unmount(const char *mountpoint, int quiet)
@@ -346,7 +409,7 @@
}
}

Expand All @@ -111,7 +111,7 @@ index d71e6fc55..acc1711ff 100644
argv[a++] = "--auto-unmount";
argv[a++] = "--";
argv[a++] = mountpoint;
@@ -407,7 +468,7 @@ static int fuse_mount_fusermount(const char *mountpoint, struct mount_opts *mo,
@@ -407,7 +470,7 @@
}
}

Expand All @@ -120,11 +120,12 @@ index d71e6fc55..acc1711ff 100644
if (opts) {
argv[a++] = "-o";
argv[a++] = opts;
@@ -421,7 +482,7 @@ static int fuse_mount_fusermount(const char *mountpoint, struct mount_opts *mo,
@@ -421,7 +484,7 @@
snprintf(env, sizeof(env), "%i", fds[0]);
setenv(FUSE_COMMFD_ENV, env, 1);
exec_fusermount(argv);
- perror("fuse: failed to exec fusermount3");
+ perror("fuse: failed to exec fusermount");
_exit(1);
}

Loading