Skip to content

Commit

Permalink
Merge pull request #82775 from Mic92/opensmtpd-backport
Browse files Browse the repository at this point in the history
opensmtpd: 6.4.2p1 -> 6.6.4p1 [backport 19.09]
  • Loading branch information
obadz authored Mar 17, 2020
2 parents 4f69f2c + 29431a0 commit bf7c0f0
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions pkgs/servers/mail/opensmtpd/default.nix
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
{ stdenv, fetchurl, autoconf, automake, libtool, bison
, libasr, libevent, zlib, libressl, db, pam, nixosTests
, libasr, libevent, zlib, openssl, db, pam, nixosTests
}:

stdenv.mkDerivation rec {
pname = "opensmtpd";
version = "6.4.2p1";
version = "6.6.4p1";

nativeBuildInputs = [ autoconf automake libtool bison ];
buildInputs = [ libasr libevent zlib libressl db pam ];
buildInputs = [ libasr libevent zlib openssl db pam ];

src = fetchurl {
url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
sha256 = "0pgv080ai7d98l9340jadp9wjiaqj2qvgpqhilcz0kps2mdiawbd";
sha256 = "1kyph9ycq0j21dl9n1sq5fns9p4gckdi0fmnf8awrcwrdcm9dyg2";
};

patches = [
./proc_path.diff # TODO: upstream to OpenSMTPD, see https://github.com/NixOS/nixpkgs/issues/54045
(fetchurl {
name = "CVE-2020-7247.patch";
url = "https://github.com/OpenSMTPD/OpenSMTPD/commit/d2688c097e0ff53037c7403e09426771876a3907.patch";
sha256 = "1mr5zb7mgpapf80xrcjvvzinzyiqcd3i0z4jwj11wl3zrfq5kwwn";
})
];

# See https://github.com/OpenSMTPD/OpenSMTPD/issues/885 for the `sh bootstrap`
# requirement
postPatch = ''
substituteInPlace smtpd/parse.y \
--replace "/usr/libexec/" "$out/libexec/opensmtpd/"
substituteInPlace mk/smtpctl/Makefile.am --replace "chgrp" "true"
substituteInPlace mk/smtpctl/Makefile.am --replace "chmod 2555" "chmod 0555"
sh bootstrap
Expand Down Expand Up @@ -65,7 +58,6 @@ stdenv.mkDerivation rec {
license = licenses.isc;
platforms = platforms.linux;
maintainers = with maintainers; [ rickynils obadz ekleog ];
knownVulnerabilities = [ "CVE-2020-8794" ];
};
passthru.tests = {
basic-functionality-and-dovecot-interaction = nixosTests.opensmtpd;
Expand Down

0 comments on commit bf7c0f0

Please sign in to comment.