nixpkgs/pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
890 B
Diff
Raw Normal View History

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