2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, libcap, openssl, pam }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "vsftpd";
|
|
|
|
version = "3.0.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-05 21:33:18 +00:00
|
|
|
url = "https://security.appspot.com/downloads/vsftpd-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1xsyjn68k3fgm2incpb3lz2nikffl9by2safp994i272wvv2nkcx";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libcap openssl pam ];
|
|
|
|
|
|
|
|
patches = [ ./CVE-2015-1419.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "/VSF_BUILD_SSL/s/^#undef/#define/" builddefs.h
|
|
|
|
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace -dirafter "" \
|
|
|
|
--replace /usr $out \
|
2021-06-28 23:13:55 +00:00
|
|
|
--replace /etc $out/etc \
|
|
|
|
--replace "-Werror" ""
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
mkdir -p $out/sbin $out/man/man{5,8}
|
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
makeFlags = [
|
|
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
NIX_LDFLAGS = "-lcrypt -lssl -lcrypto -lpam -lcap";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A very secure FTP daemon";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|