davfs2: 1.6.1 -> 1.7.0

+41 -77
+15 -31
pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch
··· 1 - From 56873cf29974ff0dfc1ba1afb7022ce49e300835 Mon Sep 17 00:00:00 2001 2 - From: Maximilian Bosch <maximilian@mbosch.me> 3 - Date: Wed, 11 Nov 2020 11:58:25 +0100 4 - Subject: [PATCH 2/2] Make sure that the setuid-wrapped `umount` is invoked 5 - 6 - --- 7 - src/dav_fuse.c | 2 +- 8 - src/umount_davfs.c | 4 ++-- 9 - 2 files changed, 3 insertions(+), 3 deletions(-) 10 - 11 1 diff --git a/src/dav_fuse.c b/src/dav_fuse.c 12 - index 734bc1f..4501433 100644 2 + index 6311428..1b1698d 100644 13 3 --- a/src/dav_fuse.c 14 4 +++ b/src/dav_fuse.c 15 - @@ -187,7 +187,7 @@ dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time, 16 - unmounting = 1; 5 + @@ -189,7 +189,7 @@ dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time, 17 6 pid_t pid = fork(); 18 7 if (pid == 0) { 8 + #if defined(__linux__) 19 9 - execl("/bin/umount", "umount", "-il", mountpoint, NULL); 20 10 + execl("@wrapperDir@/umount", "umount", "-il", mountpoint, NULL); 21 - _exit(EXIT_FAILURE); 22 - } 23 - } 11 + #elif defined(__FreeBSD__) 12 + execl("/sbin/umount", "umount", "-v", mountpoint, NULL); 13 + #endif 24 14 diff --git a/src/umount_davfs.c b/src/umount_davfs.c 25 - index b7019c3..75e3b4b 100644 15 + index 6a82fd2..93958be 100644 26 16 --- a/src/umount_davfs.c 27 17 +++ b/src/umount_davfs.c 28 - @@ -122,9 +122,9 @@ main(int argc, char *argv[]) 18 + @@ -50,7 +50,7 @@ 19 + #endif 29 20 30 - char *umount_command = NULL; 31 - if (mpoint) { 32 - - umount_command = ne_concat("umount -i '", mpoint, "'", NULL); 33 - + umount_command = ne_concat("@wrapperDir@/umount -i '", mpoint, "'", NULL); 34 - } else { 35 - - umount_command = ne_concat("umount -i '", argv[optind], "'", NULL); 36 - + umount_command = ne_concat("@wrapperDir@/umount -i '", argv[optind], "'", NULL); 37 - error(0, 0, 38 - _("\n" 39 - " can't evaluate PID file name;\n" 40 - -- 41 - 2.28.0 42 - 21 + #if defined(__linux__) 22 + -#define UMOUNT_CMD "umount -i" 23 + +#define UMOUNT_CMD "@wrapperDir@/umount -i" 24 + #elif defined(__FreeBSD__) 25 + #define UMOUNT_CMD "umount" 26 + #endif
+8 -7
pkgs/tools/filesystems/davfs2/default.nix
··· 1 1 { lib, stdenv 2 2 , fetchurl 3 3 , fetchpatch 4 + , autoreconfHook 4 5 , neon 5 6 , procps 6 7 , substituteAll ··· 10 11 11 12 stdenv.mkDerivation rec { 12 13 pname = "davfs2"; 13 - version = "1.6.1"; 14 + version = "1.7.0"; 14 15 15 16 src = fetchurl { 16 17 url = "mirror://savannah/davfs2/davfs2-${version}.tar.gz"; 17 - sha256 = "sha256-zj65SOzlgqUck0zLDMcOZZg5FycXyv8XP2ml4q+QxcA="; 18 + sha256 = "sha256-JR23Wic4DMoTMLG5cXAMXl3MDJDlpHYiKF8BQO3+Oi8="; 18 19 }; 19 20 21 + nativeBuildInputs = [ 22 + autoreconfHook 23 + ]; 24 + 20 25 buildInputs = [ neon zlib ]; 21 26 22 27 patches = [ 23 28 ./fix-sysconfdir.patch 29 + ./disable-suid.patch 24 30 (substituteAll { 25 31 src = ./0001-umount_davfs-substitute-ps-command.patch; 26 32 ps = "${procps}/bin/ps"; ··· 32 38 ]; 33 39 34 40 configureFlags = [ "--sysconfdir=/etc" ]; 35 - 36 - makeFlags = [ 37 - "sbindir=$(out)/sbin" 38 - "ssbindir=$(out)/sbin" 39 - ]; 40 41 41 42 meta = { 42 43 homepage = "https://savannah.nongnu.org/projects/davfs2";
+9
pkgs/tools/filesystems/davfs2/disable-suid.patch
··· 1 + diff --git a/src/Makefile.am b/src/Makefile.am 2 + index bbde353..bcbed04 100644 3 + --- a/src/Makefile.am 4 + +++ b/src/Makefile.am 5 + @@ -54,4 +54,3 @@ LIBS += @LIBICONV@ 6 + endif 7 + 8 + install-exec-hook: 9 + - chmod u+s $(DESTDIR)$(sbindir)/mount.davfs;
+9 -39
pkgs/tools/filesystems/davfs2/fix-sysconfdir.patch
··· 1 - diff -ubr davfs2-1.4.7-orig/etc/Makefile.am davfs2-1.4.7/etc/Makefile.am 2 - --- davfs2-1.4.7-orig/etc/Makefile.am 2013-02-21 11:45:00.185763558 +0100 3 - +++ davfs2-1.4.7/etc/Makefile.am 2013-02-21 11:53:05.423197775 +0100 4 - @@ -24,17 +24,17 @@ 5 - 6 - install-data-local: $(dist_pkgdata_DATA) 7 - @$(NORMAL_INSTALL) 8 - - $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir) 9 - - $(INSTALL_DATA) -b davfs2.conf $(DESTDIR)$(pkgsysconfdir)/davfs2.conf 10 - - $(INSTALL_DATA) -b -m 600 secrets $(DESTDIR)$(pkgsysconfdir)/secrets 11 - - $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)/certs 12 - - $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)/certs/private 13 - - chmod 700 $(DESTDIR)$(pkgsysconfdir)/certs/private 14 - + $(mkinstalldirs) $(out)$(pkgsysconfdir) 15 - + $(INSTALL_DATA) -b davfs2.conf $(out)$(pkgsysconfdir)/davfs2.conf 16 - + $(INSTALL_DATA) -b -m 600 secrets $(out)$(pkgsysconfdir)/secrets 17 - + $(mkinstalldirs) $(out)$(pkgsysconfdir)/certs 18 - + $(mkinstalldirs) $(out)$(pkgsysconfdir)/certs/private 19 - + chmod 700 $(out)$(pkgsysconfdir)/certs/private 20 - 21 - uninstall-local: 22 - @$(NORMAL_UNINSTALL) 23 - @list='$(dist_pkgdata_DATA)'; for p in $$list; do \ 24 - f="`echo $$p | sed -e 's|^.*/||'`"; \ 25 - - echo " rm -f $(DESTDIR)$(pkgsysconfdir)/$$f"; \ 26 - - rm -f $(DESTDIR)$(pkgsysconfdir)/$$f; \ 27 - + echo " rm -f $(out)$(pkgsysconfdir)/$$f"; \ 28 - + rm -f $(out)$(pkgsysconfdir)/$$f; \ 29 - done 30 - diff -ubr davfs2-1.4.7-orig/etc/Makefile.in davfs2-1.4.7/etc/Makefile.in 31 - --- davfs2-1.4.7-orig/etc/Makefile.in 2013-02-21 11:45:00.185763558 +0100 32 - +++ davfs2-1.4.7/etc/Makefile.in 2013-02-21 11:53:27.241207128 +0100 33 - @@ -408,19 +408,19 @@ 1 + diff --git a/etc/Makefile.am b/etc/Makefile.am 2 + index 5a01282..6a40921 100644 3 + --- a/etc/Makefile.am 4 + +++ b/etc/Makefile.am 5 + @@ -24,17 +24,17 @@ pkgsysconfdir = $(sysconfdir)/@PACKAGE@ 34 6 35 7 install-data-local: $(dist_pkgdata_DATA) 36 8 @$(NORMAL_INSTALL) 37 9 - $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir) 38 - - $(INSTALL_DATA) -b davfs2.conf $(DESTDIR)$(pkgsysconfdir)/davfs2.conf 39 - - $(INSTALL_DATA) -b -m 600 secrets $(DESTDIR)$(pkgsysconfdir)/secrets 10 + - $(INSTALL_DATA) -b $(srcdir)/davfs2.conf $(DESTDIR)$(pkgsysconfdir)/davfs2.conf 11 + - $(INSTALL_DATA) -b -m 600 $(srcdir)/secrets $(DESTDIR)$(pkgsysconfdir)/secrets 40 12 - $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)/certs 41 13 - $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)/certs/private 42 14 - chmod 700 $(DESTDIR)$(pkgsysconfdir)/certs/private 43 15 + $(mkinstalldirs) $(out)$(pkgsysconfdir) 44 - + $(INSTALL_DATA) -b davfs2.conf $(out)$(pkgsysconfdir)/davfs2.conf 45 - + $(INSTALL_DATA) -b -m 600 secrets $(out)$(pkgsysconfdir)/secrets 16 + + $(INSTALL_DATA) -b $(srcdir)/davfs2.conf $(out)$(pkgsysconfdir)/davfs2.conf 17 + + $(INSTALL_DATA) -b -m 600 $(srcdir)/secrets $(out)$(pkgsysconfdir)/secrets 46 18 + $(mkinstalldirs) $(out)$(pkgsysconfdir)/certs 47 19 + $(mkinstalldirs) $(out)$(pkgsysconfdir)/certs/private 48 20 + chmod 700 $(out)$(pkgsysconfdir)/certs/private ··· 56 28 + echo " rm -f $(out)$(pkgsysconfdir)/$$f"; \ 57 29 + rm -f $(out)$(pkgsysconfdir)/$$f; \ 58 30 done 59 - 60 - # Tell versions [3.59,3.63) of GNU make to not export all variables.