openwrt-packages/net/vsftpd/Makefile

99 lines
2.4 KiB
Makefile
Raw Normal View History

#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=vsftpd
vsftpd: update to 3.0.3 Update vsftpd to 3.0.3 released in July 2015. Changelog: https://security.appspot.com/vsftpd/Changelog.txt Release blog: http://scarybeastsecurity.blogspot.fi/2015/07/vsftpd-303-released-and-horrors-of-ftp.html - Increase VSFTP_AS_LIMIT to 200MB; various reports. - Make the PWD response more RFC compliant; report from Barry Kelly <barry@modeltwozero.com>. - Remove the trailing period from EPSV response to work around BT Internet issues; report from Tim Bishop <tdb@mirrorservice.org>. - Fix syslog_enable issues vs. seccomp filtering. Report from Michal Vyskocil <mvyskocil@suse.cz>. At least, syslogging seems to work on my Fedora now. - Allow gettimeofday() in the seccomp sandbox. I can't repro failures, but I probably have a different distro / libc / etc. and there are multiple reports. - Some kernels support PR_SET_NO_NEW_PRIVS but not PR_SET_SECCOMP, so handle this case gracefully. Report from Vasily Averin <vvs@odin.com>. - List the TLS1.2 cipher AES128-GCM-SHA256 as first preference by default. - Make some compile-time SSL defaults (such as correct client shutdown handling) stricter. - Disable Nagle algorithm during SSL data connection shutdown, to avoid 200ms delays. From Tim Kosse <tim.kosse@filezilla-project.org>. - Kill the FTP session if we see HTTP protocol commands, to avoid cross-protocol attacks. A report from Jann Horn <jann@thejh.net>. - Kill the FTP session if we see session re-use failure. A report from Tim Kosse <tim.kosse@filezilla-project.org>. (vsftpd-3.0.3pre1) - Enable ECDHE, Tim Kosse <tim.kosse@filezilla-project.org>. - Default cipher list is now just ECDHE-RSA-AES256-GCM-SHA384. - Minor SSL logging improvements. - Un-default tunable_strict_ssl_write_shutdown again. We still have tunable_strict_ssl_read_eof defaulted now, which is the important one to prove upload integrity. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-17 21:21:23 +02:00
PKG_VERSION:=3.0.3
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://security.appspot.com/downloads/
PKG_HASH:=9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7
PKG_MAINTAINER:=Cezary Jackiewicz <cezary@eko.one.pl>
PKG_LICENSE:=GPLv2
PKG_CPE_ID:=cpe:/a:beasts:vsftpd
include $(INCLUDE_DIR)/package.mk
define Package/vsftpd/Default
SUBMENU:=File Transfer
SECTION:=net
CATEGORY:=Network
TITLE:=Fast and secure FTP server
URL:=https://security.appspot.com/vsftpd.html
endef
define Package/vsftpd
$(call Package/vsftpd/Default)
VARIANT:=notls
TITLE+= (no TLS)
endef
define Package/vsftpd-tls
$(call Package/vsftpd/Default)
VARIANT:=tls
TITLE+= (TLS)
DEPENDS+=+libopenssl
endef
define Package/vsftpd/conffiles
/etc/vsftpd.conf
/etc/vsftpd
endef
Package/vsftpd-tls/conffiles=$(Package/vsftpd/conffiles)
ifneq ($(CONFIG_USE_MUSL),)
NLSSTRING:=-lcrypt
else
NLSSTRING:=-lcrypt -lnsl
endif
TARGET_CFLAGS += -D_GNU_SOURCE -include fcntl.h
ifeq ($(BUILD_VARIANT),notls)
define Build/Compile
$(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
vsftpd
endef
endif
ifeq ($(BUILD_VARIANT),tls)
define Build/Compile
$(SED) 's/#undef VSF_BUILD_SSL/#define VSF_BUILD_SSL/' $(PKG_BUILD_DIR)/builddefs.h
$(SED) 's/-lcrypt -lnsl/-lcrypt -lnsl -lssl -lcrypto/' $(PKG_BUILD_DIR)/Makefile
$(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
vsftpd
endef
endif
define Package/vsftpd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
$(INSTALL_DIR) $(1)/etc/vsftpd
endef
Package/vsftpd-tls/install=$(Package/vsftpd/install)
$(eval $(call BuildPackage,vsftpd))
$(eval $(call BuildPackage,vsftpd-tls))