diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2020-11-11 12:02:02 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2020-11-11 12:03:03 +0100 |
commit | fba4c99f4f211f041f66c7e584ed3362aac2555f (patch) | |
tree | 0aea34285a6a94e6486e8c3b02455e29fea1e976 /pkgs/tools/filesystems/davfs2 | |
parent | fe1568fa24106e01b056845010f2ad6ce5fd108f (diff) |
davfs2: 1.5.6 -> 1.6.0
Diffstat (limited to 'pkgs/tools/filesystems/davfs2')
-rw-r--r-- | pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch | 42 | ||||
-rw-r--r-- | pkgs/tools/filesystems/davfs2/default.nix | 22 |
2 files changed, 48 insertions, 16 deletions
diff --git a/pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch b/pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch new file mode 100644 index 000000000000..0e31725936fa --- /dev/null +++ b/pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch @@ -0,0 +1,42 @@ +From 56873cf29974ff0dfc1ba1afb7022ce49e300835 Mon Sep 17 00:00:00 2001 +From: Maximilian Bosch <maximilian@mbosch.me> +Date: Wed, 11 Nov 2020 11:58:25 +0100 +Subject: [PATCH 2/2] Make sure that the setuid-wrapped `umount` is invoked + +--- + src/dav_fuse.c | 2 +- + src/umount_davfs.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/dav_fuse.c b/src/dav_fuse.c +index 734bc1f..4501433 100644 +--- a/src/dav_fuse.c ++++ b/src/dav_fuse.c +@@ -187,7 +187,7 @@ dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time, + unmounting = 1; + pid_t pid = fork(); + if (pid == 0) { +- execl("/bin/umount", "umount", "-il", mountpoint, NULL); ++ execl("@wrapperDir@/umount", "umount", "-il", mountpoint, NULL); + _exit(EXIT_FAILURE); + } + } +diff --git a/src/umount_davfs.c b/src/umount_davfs.c +index b7019c3..75e3b4b 100644 +--- a/src/umount_davfs.c ++++ b/src/umount_davfs.c +@@ -122,9 +122,9 @@ main(int argc, char *argv[]) + + char *umount_command = NULL; + if (mpoint) { +- umount_command = ne_concat("umount -i '", mpoint, "'", NULL); ++ umount_command = ne_concat("@wrapperDir@/umount -i '", mpoint, "'", NULL); + } else { +- umount_command = ne_concat("umount -i '", argv[optind], "'", NULL); ++ umount_command = ne_concat("@wrapperDir@/umount -i '", argv[optind], "'", NULL); + error(0, 0, + _("\n" + " can't evaluate PID file name;\n" +-- +2.28.0 + diff --git a/pkgs/tools/filesystems/davfs2/default.nix b/pkgs/tools/filesystems/davfs2/default.nix index 4f818ed213b7..02536a13d15b 100644 --- a/pkgs/tools/filesystems/davfs2/default.nix +++ b/pkgs/tools/filesystems/davfs2/default.nix @@ -1,42 +1,32 @@ { stdenv , fetchurl , fetchpatch -, autoreconfHook , neon , procps , substituteAll , zlib +, wrapperDir ? "/run/wrappers/bin" }: stdenv.mkDerivation rec { - name = "davfs2-1.5.6"; + name = "davfs2-1.6.0"; src = fetchurl { url = "mirror://savannah/davfs2/${name}.tar.gz"; - sha256 = "00fqadhmhi2bmdar5a48nicmjcagnmaj9wgsvjr6cffmrz6pcx21"; + sha256 = "sha256-LmtnVoW9kXdyvmDwmZrgmMgPef8g3BMej+xFR8u2O1A="; }; - nativeBuildInputs = [ - autoreconfHook # neon-0.31.patch requires reconfiguration - ]; - buildInputs = [ neon zlib ]; patches = [ - ./isdir.patch ./fix-sysconfdir.patch (substituteAll { src = ./0001-umount_davfs-substitute-ps-command.patch; ps = "${procps}/bin/ps"; }) - - # Fix build with neon 0.31 - # http://savannah.nongnu.org/bugs/?58101 - (fetchpatch { - name = "neon-0.31.patch"; - url = "http://savannah.nongnu.org/bugs/download.php?file_id=48737"; - sha256 = "117x9rql6wk230pl1nram3pp8svll9wzfs5nf407z4jnrdr1zm0j"; - extraPrefix = ""; # empty means add 'a/' and 'b/' + (substituteAll { + src = ./0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch; + inherit wrapperDir; }) ]; |