rsync: add patch for CVE-2020-14387

(cherry picked from commit a08ee2292caa8a676332c695d7d46bd38c235931)
This commit is contained in:
Robert Scott
2021-08-19 19:24:10 +01:00
parent 74f8b36dee
commit 41a38db165
3 changed files with 16 additions and 6 deletions
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, perl, libiconv, zlib, popt
{ lib, stdenv, fetchurl, fetchpatch, perl, libiconv, zlib, popt
, enableACLs ? !(stdenv.isDarwin || stdenv.isSunOS || stdenv.isFreeBSD), acl ? null
, enableLZ4 ? true, lz4 ? null
, enableOpenSSL ? true, openssl ? null
@@ -15,7 +15,7 @@ assert enableXXHash -> xxHash != null;
assert enableZstd -> zstd != null;
let
base = import ./base.nix { inherit lib fetchurl; };
base = import ./base.nix { inherit lib fetchurl fetchpatch; };
in
stdenv.mkDerivation rec {
name = "rsync-${base.version}";
@@ -25,7 +25,8 @@ stdenv.mkDerivation rec {
patchesSrc = base.upstreamPatchTarball;
srcs = [mainSrc] ++ lib.optional enableCopyDevicesPatch patchesSrc;
patches = lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
patches = lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff"
++ base.extraPatches;
buildInputs = [libiconv zlib popt]
++ lib.optional enableACLs acl