nixpkgs-suyu/pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch
2023-01-25 14:19:48 +01:00

26 lines
890 B
Diff

diff --git a/src/dav_fuse.c b/src/dav_fuse.c
index 6311428..1b1698d 100644
--- a/src/dav_fuse.c
+++ b/src/dav_fuse.c
@@ -189,7 +189,7 @@ dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time,
pid_t pid = fork();
if (pid == 0) {
#if defined(__linux__)
- execl("/bin/umount", "umount", "-il", mountpoint, NULL);
+ execl("@wrapperDir@/umount", "umount", "-il", mountpoint, NULL);
#elif defined(__FreeBSD__)
execl("/sbin/umount", "umount", "-v", mountpoint, NULL);
#endif
diff --git a/src/umount_davfs.c b/src/umount_davfs.c
index 6a82fd2..93958be 100644
--- a/src/umount_davfs.c
+++ b/src/umount_davfs.c
@@ -50,7 +50,7 @@
#endif
#if defined(__linux__)
-#define UMOUNT_CMD "umount -i"
+#define UMOUNT_CMD "@wrapperDir@/umount -i"
#elif defined(__FreeBSD__)
#define UMOUNT_CMD "umount"
#endif