mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
vsftpd-alt: update to 3.0.5 (#7720)
This commit is contained in:
parent
527a117abd
commit
db28e1ee30
@ -8,12 +8,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=vsftpd-alt
|
PKG_NAME:=vsftpd-alt
|
||||||
PKG_VERSION:=3.0.3
|
PKG_VERSION:=3.0.5
|
||||||
PKG_RELEASE:=7
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=vsftpd-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=vsftpd-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://security.appspot.com/downloads/
|
PKG_SOURCE_URL:=https://security.appspot.com/downloads/
|
||||||
PKG_MD5SUM:=da119d084bd3f98664636ea05b5bb398
|
PKG_HASH:=26b602ae454b0ba6d99ef44a09b6b9e0dfa7f67228106736df1f278c70bc91d3
|
||||||
PKG_LICENSE:=GPLv2
|
PKG_LICENSE:=GPLv2
|
||||||
|
|
||||||
BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
@ -32,21 +32,18 @@ define Package/vsftpd-alt/Default
|
|||||||
#+PACKAGE_libpam:libpam
|
#+PACKAGE_libpam:libpam
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
|
||||||
|
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed,--no-undefined,--no-allow-shlib-undefined
|
||||||
|
|
||||||
define Package/vsftpd-alt/conffiles
|
define Package/vsftpd-alt/conffiles
|
||||||
/etc/vsftpd.conf
|
/etc/vsftpd.conf
|
||||||
endef
|
endef
|
||||||
|
|
||||||
#EXTRA_LDFLAGS:= -lcrypt -lcrypto -lssl
|
|
||||||
|
|
||||||
define Package/vsftpd-alt/config
|
define Package/vsftpd-alt/config
|
||||||
config VSFTPD_USE_UCI_SCRIPTS
|
config VSFTPD_USE_UCI_SCRIPTS
|
||||||
bool "Uses UCI scripts"
|
bool "Uses UCI scripts"
|
||||||
depends on PACKAGE_vsftpd-alt
|
depends on PACKAGE_vsftpd-alt
|
||||||
default y
|
default y
|
||||||
#config VSFTPD_ENABLE_AIO
|
|
||||||
# bool "Enable async I/O (Currently Buggy)"
|
|
||||||
# depends on PACKAGE_vsftpd-alt
|
|
||||||
# default n
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifneq ($(CONFIG_USE_MUSL),)
|
ifneq ($(CONFIG_USE_MUSL),)
|
||||||
@ -57,23 +54,9 @@ endif
|
|||||||
|
|
||||||
TARGET_CFLAGS += -D_GNU_SOURCE -include fcntl.h
|
TARGET_CFLAGS += -D_GNU_SOURCE -include fcntl.h
|
||||||
|
|
||||||
#ifdef CONFIG_PACKAGE_libpam
|
|
||||||
# EXTRA_LDFLAGS += -lpam
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifeq ($(CONFIG_VSFTPD_ENABLE_AIO),y)
|
|
||||||
#define Package/vsftpd-alt
|
|
||||||
#$(call Package/vsftpd-alt/Default)
|
|
||||||
# DEPENDS=+PACKAGE_libpam:libpam +libopenssl +libuci +libaio
|
|
||||||
#endef
|
|
||||||
# EXTRA_LDFLAGS += -laio
|
|
||||||
# EXTRA_CFLAGS += -DVSFTPD_ASYNC_IO
|
|
||||||
#else
|
|
||||||
define Package/vsftpd-alt
|
define Package/vsftpd-alt
|
||||||
$(call Package/vsftpd-alt/Default)
|
$(call Package/vsftpd-alt/Default)
|
||||||
endef
|
endef
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile
|
$(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -22,6 +22,8 @@ OBJS = main.o utility.o prelogin.o ftpcm
|
@@ -22,6 +22,8 @@ OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
|
||||||
seccompsandbox.o
|
seccompsandbox.o
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -8,8 +8,8 @@ CFLAGS = -O2 -fPIE -fstack-protector --p
|
@@ -8,8 +8,8 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
|
||||||
-D_FORTIFY_SOURCE=2 \
|
-D_FORTIFY_SOURCE=2 \
|
||||||
#-pedantic -Wconversion
|
#-pedantic -Wconversion
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/tunables.c
|
--- a/tunables.c
|
||||||
+++ b/tunables.c
|
+++ b/tunables.c
|
||||||
@@ -254,7 +254,7 @@ tunables_load_defaults()
|
@@ -261,7 +261,7 @@ tunables_load_defaults()
|
||||||
/* -rw------- */
|
/* -rw------- */
|
||||||
tunable_chown_upload_mode = 0600;
|
tunable_chown_upload_mode = 0600;
|
||||||
|
|
||||||
|
@ -1,10 +1,3 @@
|
|||||||
Description: CVE-2015-1419: config option deny_file is not handled correctly
|
|
||||||
Author: Marcus Meissner <meissner@suse.com>
|
|
||||||
Origin: https://bugzilla.novell.com/show_bug.cgi?id=CVE-2015-1419
|
|
||||||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776922
|
|
||||||
Last-Update: 2015-02-24
|
|
||||||
---
|
|
||||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|
||||||
--- a/ls.c
|
--- a/ls.c
|
||||||
+++ b/ls.c
|
+++ b/ls.c
|
||||||
@@ -7,6 +7,7 @@
|
@@ -7,6 +7,7 @@
|
||||||
@ -15,7 +8,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|||||||
#include "ls.h"
|
#include "ls.h"
|
||||||
#include "access.h"
|
#include "access.h"
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
@@ -243,11 +244,42 @@ vsf_filename_passes_filter(const struct
|
@@ -243,11 +244,42 @@ vsf_filename_passes_filter(const struct mystr* p_filename_str,
|
||||||
struct mystr temp_str = INIT_MYSTR;
|
struct mystr temp_str = INIT_MYSTR;
|
||||||
struct mystr brace_list_str = INIT_MYSTR;
|
struct mystr brace_list_str = INIT_MYSTR;
|
||||||
struct mystr new_filter_str = INIT_MYSTR;
|
struct mystr new_filter_str = INIT_MYSTR;
|
||||||
@ -59,7 +52,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|||||||
|
|
||||||
while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX)
|
while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX)
|
||||||
{
|
{
|
||||||
@@ -360,6 +392,9 @@ vsf_filename_passes_filter(const struct
|
@@ -360,6 +392,9 @@ vsf_filename_passes_filter(const struct mystr* p_filename_str,
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
@ -71,7 +64,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|||||||
str_free(&temp_str);
|
str_free(&temp_str);
|
||||||
--- a/str.c
|
--- a/str.c
|
||||||
+++ b/str.c
|
+++ b/str.c
|
||||||
@@ -711,3 +711,14 @@ str_replace_unprintable(struct mystr* p_
|
@@ -711,3 +711,14 @@ str_replace_unprintable(struct mystr* p_str, char new_char)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +81,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|||||||
+}
|
+}
|
||||||
--- a/str.h
|
--- a/str.h
|
||||||
+++ b/str.h
|
+++ b/str.h
|
||||||
@@ -100,6 +100,7 @@ void str_replace_unprintable(struct myst
|
@@ -100,6 +100,7 @@ void str_replace_unprintable(struct mystr* p_str, char new_char);
|
||||||
int str_atoi(const struct mystr* p_str);
|
int str_atoi(const struct mystr* p_str);
|
||||||
filesize_t str_a_to_filesize_t(const struct mystr* p_str);
|
filesize_t str_a_to_filesize_t(const struct mystr* p_str);
|
||||||
unsigned int str_octal_to_uint(const struct mystr* p_str);
|
unsigned int str_octal_to_uint(const struct mystr* p_str);
|
||||||
|
51
package/lean/vsftpd-alt/patches/010-openssl-deprecated.patch
Normal file
51
package/lean/vsftpd-alt/patches/010-openssl-deprecated.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
--- a/ssl.c
|
||||||
|
+++ b/ssl.c
|
||||||
|
@@ -28,6 +28,9 @@
|
||||||
|
#include <openssl/err.h>
|
||||||
|
#include <openssl/rand.h>
|
||||||
|
#include <openssl/bio.h>
|
||||||
|
+#ifndef OPENSSL_NO_EC
|
||||||
|
+#include <openssl/ec.h>
|
||||||
|
+#endif
|
||||||
|
#include <errno.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
|
@@ -66,8 +69,12 @@ ssl_init(struct vsf_session* p_sess)
|
||||||
|
SSL_CTX* p_ctx;
|
||||||
|
long options;
|
||||||
|
int verify_option = 0;
|
||||||
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
|
SSL_library_init();
|
||||||
|
p_ctx = SSL_CTX_new(SSLv23_server_method());
|
||||||
|
+#else
|
||||||
|
+ p_ctx = SSL_CTX_new(TLS_server_method());
|
||||||
|
+#endif
|
||||||
|
if (p_ctx == NULL)
|
||||||
|
{
|
||||||
|
die("SSL: could not allocate SSL context");
|
||||||
|
@@ -139,6 +146,7 @@ ssl_init(struct vsf_session* p_sess)
|
||||||
|
{
|
||||||
|
die("SSL: RNG is not seeded");
|
||||||
|
}
|
||||||
|
+#ifndef OPENSSL_NO_EC
|
||||||
|
{
|
||||||
|
EC_KEY* key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
|
||||||
|
if (key == NULL)
|
||||||
|
@@ -148,6 +156,7 @@ ssl_init(struct vsf_session* p_sess)
|
||||||
|
SSL_CTX_set_tmp_ecdh(p_ctx, key);
|
||||||
|
EC_KEY_free(key);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
if (tunable_ssl_request_cert)
|
||||||
|
{
|
||||||
|
verify_option |= SSL_VERIFY_PEER;
|
||||||
|
@@ -685,7 +694,9 @@ ssl_cert_digest(SSL* p_ssl, struct vsf_session* p_sess, struct mystr* p_str)
|
||||||
|
static char*
|
||||||
|
get_ssl_error()
|
||||||
|
{
|
||||||
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
|
SSL_load_error_strings();
|
||||||
|
+#endif
|
||||||
|
return ERR_error_string(ERR_get_error(), NULL);
|
||||||
|
}
|
||||||
|
|
@ -1,27 +1,27 @@
|
|||||||
--- a/parseconf.c
|
--- a/parseconf.c
|
||||||
+++ b/parseconf.c
|
+++ b/parseconf.c
|
||||||
@@ -178,6 +178,7 @@
|
@@ -182,6 +182,7 @@ parseconf_str_array[] =
|
||||||
{ "rsa_private_key_file", &tunable_rsa_private_key_file },
|
|
||||||
{ "dsa_private_key_file", &tunable_dsa_private_key_file },
|
{ "dsa_private_key_file", &tunable_dsa_private_key_file },
|
||||||
{ "ca_certs_file", &tunable_ca_certs_file },
|
{ "ca_certs_file", &tunable_ca_certs_file },
|
||||||
|
{ "ssl_sni_hostname", &tunable_ssl_sni_hostname },
|
||||||
+ { "uci_config_name", &tunable_uci_config_name },
|
+ { "uci_config_name", &tunable_uci_config_name },
|
||||||
{ "cmds_denied", &tunable_cmds_denied },
|
{ "cmds_denied", &tunable_cmds_denied },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
--- a/sysdeputil.c
|
--- a/sysdeputil.c
|
||||||
+++ b/sysdeputil.c
|
+++ b/sysdeputil.c
|
||||||
@@ -175,6 +175,8 @@
|
@@ -180,6 +180,8 @@
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <crypt.h>
|
#include <crypt.h>
|
||||||
+/* Include uci headers */
|
+/* Include uci headers */
|
||||||
+#include <uci.h>
|
+#include <uci.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Prefer libcap based capabilities over raw syscall capabilities */
|
/* Prefer libcap based capabilities over raw syscall capabilities */
|
||||||
@@ -237,14 +239,24 @@
|
@@ -242,14 +244,24 @@ void vsf_insert_uwtmp(const struct mystr* p_user_str,
|
||||||
void vsf_remove_uwtmp(void);
|
void vsf_remove_uwtmp(void);
|
||||||
|
|
||||||
#ifndef VSF_SYSDEP_HAVE_PAM
|
#ifndef VSF_SYSDEP_HAVE_PAM
|
||||||
+static int
|
+static int
|
||||||
+vsf_sysdep_check_auth_uci(struct mystr* p_user_str,
|
+vsf_sysdep_check_auth_uci(struct mystr* p_user_str,
|
||||||
@ -45,10 +45,10 @@
|
|||||||
if (p_pwd == NULL)
|
if (p_pwd == NULL)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@@ -300,6 +312,51 @@
|
@@ -305,6 +317,51 @@ vsf_sysdep_check_auth(struct mystr* p_user_str,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
+static int
|
+static int
|
||||||
+vsf_sysdep_check_auth_uci(struct mystr* p_user_str,
|
+vsf_sysdep_check_auth_uci(struct mystr* p_user_str,
|
||||||
+ const struct mystr* p_pass_str)
|
+ const struct mystr* p_pass_str)
|
||||||
@ -95,33 +95,33 @@
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
#else /* VSF_SYSDEP_HAVE_PAM */
|
#else /* VSF_SYSDEP_HAVE_PAM */
|
||||||
|
|
||||||
#if (defined(__sun) || defined(__hpux)) && \
|
#if (defined(__sun) || defined(__hpux)) && \
|
||||||
--- a/tunables.c
|
--- a/tunables.c
|
||||||
+++ b/tunables.c
|
+++ b/tunables.c
|
||||||
@@ -142,6 +142,7 @@
|
@@ -146,6 +146,7 @@ const char* tunable_rsa_private_key_file;
|
||||||
const char* tunable_rsa_private_key_file;
|
|
||||||
const char* tunable_dsa_private_key_file;
|
const char* tunable_dsa_private_key_file;
|
||||||
const char* tunable_ca_certs_file;
|
const char* tunable_ca_certs_file;
|
||||||
|
const char* tunable_ssl_sni_hostname;
|
||||||
+const char* tunable_uci_config_name;
|
+const char* tunable_uci_config_name;
|
||||||
|
|
||||||
static void install_str_setting(const char* p_value, const char** p_storage);
|
static void install_str_setting(const char* p_value, const char** p_storage);
|
||||||
|
|
||||||
@@ -288,6 +289,7 @@
|
@@ -296,6 +297,7 @@ tunables_load_defaults()
|
||||||
install_str_setting(0, &tunable_rsa_private_key_file);
|
|
||||||
install_str_setting(0, &tunable_dsa_private_key_file);
|
install_str_setting(0, &tunable_dsa_private_key_file);
|
||||||
install_str_setting(0, &tunable_ca_certs_file);
|
install_str_setting(0, &tunable_ca_certs_file);
|
||||||
|
install_str_setting(0, &tunable_ssl_sni_hostname);
|
||||||
+ install_str_setting(0, &tunable_uci_config_name);
|
+ install_str_setting(0, &tunable_uci_config_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
--- a/tunables.h
|
--- a/tunables.h
|
||||||
+++ b/tunables.h
|
+++ b/tunables.h
|
||||||
@@ -144,6 +144,7 @@
|
@@ -148,6 +148,7 @@ extern const char* tunable_rsa_private_key_file;
|
||||||
extern const char* tunable_rsa_private_key_file;
|
|
||||||
extern const char* tunable_dsa_private_key_file;
|
extern const char* tunable_dsa_private_key_file;
|
||||||
extern const char* tunable_ca_certs_file;
|
extern const char* tunable_ca_certs_file;
|
||||||
|
extern const char* tunable_ssl_sni_hostname;
|
||||||
+extern const char* tunable_uci_config_name;
|
+extern const char* tunable_uci_config_name;
|
||||||
extern const char* tunable_cmds_denied;
|
extern const char* tunable_cmds_denied;
|
||||||
|
|
||||||
#endif /* VSF_TUNABLES_H */
|
#endif /* VSF_TUNABLES_H */
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
--- a/secutil.c
|
--- a/secutil.c
|
||||||
+++ b/secutil.c
|
+++ b/secutil.c
|
||||||
@@ -135,10 +135,12 @@
|
@@ -129,16 +129,5 @@ vsf_secutil_change_credentials(const struct mystr* p_user_str,
|
||||||
if ((options & VSF_SECUTIL_OPTION_CHROOT) &&
|
|
||||||
!(options & VSF_SECUTIL_OPTION_ALLOW_WRITEABLE_ROOT))
|
|
||||||
{
|
{
|
||||||
+ /*
|
vsf_sysutil_set_no_procs();
|
||||||
if (vsf_sysutil_write_access("/"))
|
|
||||||
{
|
|
||||||
die("vsftpd: refusing to run with writable root inside chroot()");
|
|
||||||
}
|
|
||||||
+ */
|
|
||||||
}
|
}
|
||||||
|
- /* Misconfiguration check: don't ever chroot() to a directory writable by
|
||||||
|
- * the current user.
|
||||||
|
- */
|
||||||
|
- if ((options & VSF_SECUTIL_OPTION_CHROOT) &&
|
||||||
|
- !(options & VSF_SECUTIL_OPTION_ALLOW_WRITEABLE_ROOT))
|
||||||
|
- {
|
||||||
|
- if (vsf_sysutil_write_access("/"))
|
||||||
|
- {
|
||||||
|
- die("vsftpd: refusing to run with writable root inside chroot()");
|
||||||
|
- }
|
||||||
|
- }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/twoprocess.c
|
--- a/twoprocess.c
|
||||||
+++ b/twoprocess.c
|
+++ b/twoprocess.c
|
||||||
@@ -426,7 +426,7 @@
|
@@ -426,7 +426,7 @@ common_do_login(struct vsf_session* p_sess, const struct mystr* p_user_str,
|
||||||
*/
|
*/
|
||||||
vsf_set_die_if_parent_dies();
|
vsf_set_die_if_parent_dies();
|
||||||
priv_sock_set_child_context(p_sess);
|
priv_sock_set_child_context(p_sess);
|
||||||
|
Loading…
Reference in New Issue
Block a user