depot/third_party/nixpkgs/pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00: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