Merge "[BUGFIX][T108][bug-view-1766] Fix the bug that ftp cannot log in" into GSW_V1453
diff --git a/config/defconfig_asr1806p301 b/config/defconfig_asr1806p301
index 7d97dde..1b33184 100755
--- a/config/defconfig_asr1806p301
+++ b/config/defconfig_asr1806p301
@@ -5799,7 +5799,7 @@
# CONFIG_PACKAGE_libtheora is not set
# CONFIG_PACKAGE_libtiff is not set
# CONFIG_PACKAGE_libtins is not set
-# CONFIG_PACKAGE_libtirpc is not set
+CONFIG_PACKAGE_libtirpc=y
# CONFIG_PACKAGE_libtorrent-rasterbar is not set
# CONFIG_PACKAGE_libtraceevent is not set
# CONFIG_PACKAGE_libtraceevent-extra is not set
@@ -5842,7 +5842,7 @@
# CONFIG_PACKAGE_libwebsockets-full is not set
# CONFIG_PACKAGE_libwebsockets-mbedtls is not set
# CONFIG_PACKAGE_libwebsockets-openssl is not set
-# CONFIG_PACKAGE_libwrap is not set
+CONFIG_PACKAGE_libwrap=y
# CONFIG_PACKAGE_libx264 is not set
# CONFIG_PACKAGE_libxerces-c is not set
# CONFIG_PACKAGE_libxerces-c-samples is not set
@@ -6991,7 +6991,9 @@
# CONFIG_PACKAGE_remserial is not set
# CONFIG_PACKAGE_restic-rest-server is not set
# CONFIG_PACKAGE_rpcapd is not set
-# CONFIG_PACKAGE_rpcbind is not set
+CONFIG_PACKAGE_rpcbind=y
+CONFIG_RPCBIND_LIBWRAP=y
+CONFIG_RPCBIND_RMTCALLS=y
# CONFIG_PACKAGE_rssileds is not set
# CONFIG_PACKAGE_rsyslog is not set
# CONFIG_PACKAGE_safe-search is not set
diff --git a/external/subpack/net/vsftpd/Makefile b/external/subpack/net/vsftpd/Makefile
old mode 100644
new mode 100755
index 4e75f75..571fb7a
--- a/external/subpack/net/vsftpd/Makefile
+++ b/external/subpack/net/vsftpd/Makefile
@@ -34,6 +34,7 @@
$(call Package/vsftpd/Default)
VARIANT:=notls
TITLE+= (no TLS)
+ DEPENDS+=+libwrap
endef
define Package/vsftpd-tls
@@ -59,10 +60,12 @@
endif
TARGET_CFLAGS += -D_GNU_SOURCE -include fcntl.h
+TARGET_LDFLAGS += -lwrap
ifeq ($(BUILD_VARIANT),notls)
define Build/Compile
$(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile
+ $(SED) 's/#undef VSF_BUILD_TCPWRAPPERS/#define VSF_BUILD_TCPWRAPPERS/' $(PKG_BUILD_DIR)/builddefs.h
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
diff --git a/external/subpack/net/vsftpd/files/vsftpd.init b/external/subpack/net/vsftpd/files/vsftpd.init
index 0f37da4..b3dee9e 100644
--- a/external/subpack/net/vsftpd/files/vsftpd.init
+++ b/external/subpack/net/vsftpd/files/vsftpd.init
@@ -8,6 +8,8 @@
start_service() {
mkdir -m 0755 -p /var/run/vsftpd
+ mkdir -m 0755 -p /media/ftp
+
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn
diff --git a/target/linux/mmp/base-files/etc/group b/target/linux/mmp/base-files/etc/group
index 02a94c6..1d9adcc 100755
--- a/target/linux/mmp/base-files/etc/group
+++ b/target/linux/mmp/base-files/etc/group
@@ -1,2 +1,4 @@
root:x:0:
mbtk:x:1000:
+ftp:x:1001:
+nobody:x:65534:
diff --git a/target/linux/mmp/base-files/etc/passwd b/target/linux/mmp/base-files/etc/passwd
index dcfb4a9..c1819eb 100755
--- a/target/linux/mmp/base-files/etc/passwd
+++ b/target/linux/mmp/base-files/etc/passwd
@@ -1,2 +1,4 @@
root:x:0:0:root:/root:/bin/ash
mbtk:x:1000:1000:mbtk:/home/mbtk:/bin/ash
+ftp:x:1001:1001:FTP User:/media/ftp:/bin/false
+nobody:x:65534:65534:nobody:/dev/null:/bin/false