2018-12-06 09:53:53 +00:00
|
|
|
{ stdenv, fetchurl, libcap, openssl, pam }:
|
2005-09-12 15:20:57 +00:00
|
|
|
|
2013-11-07 15:14:59 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-07-28 11:11:25 +00:00
|
|
|
name = "vsftpd-3.0.3";
|
2013-11-07 15:14:59 +00:00
|
|
|
|
2005-09-12 15:20:57 +00:00
|
|
|
src = fetchurl {
|
2012-12-29 11:22:20 +00:00
|
|
|
url = "https://security.appspot.com/downloads/${name}.tar.gz";
|
2015-07-28 11:11:25 +00:00
|
|
|
sha256 = "1xsyjn68k3fgm2incpb3lz2nikffl9by2safp994i272wvv2nkcx";
|
2005-09-12 15:20:57 +00:00
|
|
|
};
|
2011-04-29 18:18:56 +00:00
|
|
|
|
2018-12-06 09:53:53 +00:00
|
|
|
buildInputs = [ libcap openssl pam ];
|
|
|
|
|
2015-07-15 20:12:29 +00:00
|
|
|
patches = [ ./CVE-2015-1419.patch ];
|
|
|
|
|
2018-12-06 09:53:53 +00:00
|
|
|
postPatch = ''
|
2013-11-07 15:14:59 +00:00
|
|
|
sed -i "/VSF_BUILD_SSL/s/^#undef/#define/" builddefs.h
|
|
|
|
|
2018-12-06 09:53:53 +00:00
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace -dirafter "" \
|
|
|
|
--replace /usr $out \
|
|
|
|
--replace /etc $out/etc
|
2013-01-03 18:52:14 +00:00
|
|
|
|
2018-12-06 09:53:53 +00:00
|
|
|
mkdir -p $out/sbin $out/man/man{5,8}
|
|
|
|
'';
|
2011-04-23 06:58:57 +00:00
|
|
|
|
2018-12-06 09:53:53 +00:00
|
|
|
NIX_LDFLAGS = "-lcrypt -lssl -lcrypto -lpam -lcap";
|
2020-07-07 13:45:42 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=enum-conversion";
|
2011-04-23 06:58:57 +00:00
|
|
|
|
2018-12-06 09:53:53 +00:00
|
|
|
enableParallelBuilding = true;
|
2016-08-02 16:06:29 +00:00
|
|
|
|
2018-12-06 09:53:53 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A very secure FTP daemon";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
platforms = platforms.linux;
|
2016-08-02 16:06:29 +00:00
|
|
|
};
|
2013-11-07 15:14:59 +00:00
|
|
|
}
|