]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
Revert "Drop vsftpd which isn't actively maintained any more"
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 7 Jul 2024 17:28:19 +0000 (17:28 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 7 Jul 2024 17:28:19 +0000 (17:28 +0000)
This reverts commit 56720befc7e6beafc5e200c0a777422bdbdccc1a.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
12 files changed:
config/backup/includes/vsftpd [new file with mode: 0644]
config/etc/group
config/etc/passwd
config/rootfiles/packages/vsftpd [new file with mode: 0644]
config/vsftpd/vsftpd.conf [new file with mode: 0644]
config/vsftpd/vsftpd.user_list [new file with mode: 0644]
lfs/vsftpd [new file with mode: 0644]
make.sh
src/initscripts/packages/vsftpd [new file with mode: 0644]
src/paks/vsftpd/install.sh [new file with mode: 0644]
src/paks/vsftpd/uninstall.sh [new file with mode: 0644]
src/paks/vsftpd/update.sh [new file with mode: 0644]

diff --git a/config/backup/includes/vsftpd b/config/backup/includes/vsftpd
new file mode 100644 (file)
index 0000000..876ea30
--- /dev/null
@@ -0,0 +1,2 @@
+/etc/vsftpd.conf
+/etc/vsftpd.user_list
index f1767b30cd99e69bacfc2cc6a52015040e170b3c..5ae90d85130e405a73ca425f44d6c6cfa9b88ad9 100644 (file)
@@ -18,6 +18,7 @@ squid:x:23:nobody
 ntp:x:38:
 dip:x:40:
 ftp:x:45:
+vsftpd:x:47:
 rsyncd:x:48:
 stunnel:x:51:
 dhcpcd:x:52:
index cb0428085192af305a5f79ce8912cd264c3fdcfd..e6326992ca3c55c2fd4babcace4eb59c9ddd673c 100644 (file)
@@ -5,6 +5,7 @@ mail:x:8:12:mail:/var/spool/mail:/bin/false
 squid:x:23:23:ftp:/var/spool/squid:/bin/false
 ntp:x:38:38::/etc/ntp:/bin/false
 ftp:x:45:45:anonymous_user:/home/ftp:/bin/false
+vsftpd:x:47:47:vsftpd User:/home/ftp:/bin/false
 rsyncd:x:48:48:rsyncd Daemon:/home/rsync:/bin/false
 stunnel:x:51:51:stunnel Daemon:/var/lib/stunnel:/bin/false
 dhcpcd:x:52:52:dhcpcd privsep user:/run/dhcpcd/chroot:/bin/false
diff --git a/config/rootfiles/packages/vsftpd b/config/rootfiles/packages/vsftpd
new file mode 100644 (file)
index 0000000..e0f59c3
--- /dev/null
@@ -0,0 +1,13 @@
+var/ipfire/backup/addons/includes/vsftpd
+etc/rc.d/init.d/vsftpd
+etc/rc.d/rc0.d/K35vsftpd
+etc/rc.d/rc6.d/K35vsftpd
+etc/rc.d/rc3.d/S65vsftpd
+etc/vsftpd.conf
+etc/vsftpd.user_list
+home/ftp
+usr/sbin/vsftpd
+#usr/share/man/man5/vsftpd.conf.5
+#usr/share/man/man8/vsftpd.8
+var/ftp
+var/ftp/empty
diff --git a/config/vsftpd/vsftpd.conf b/config/vsftpd/vsftpd.conf
new file mode 100644 (file)
index 0000000..e7206ee
--- /dev/null
@@ -0,0 +1,51 @@
+# Default config for vsftpd on ipfire
+background=YES
+listen=YES
+#
+nopriv_user=vsftpd
+#
+local_enable=YES
+write_enable=YES
+#
+local_umask=022
+#
+#anonymous_enable=YES
+#anon_upload_enable=YES
+#anon_mkdir_write_enable=YES
+#
+dirmessage_enable=YES
+#
+xferlog_enable=YES
+xferlog_file=/var/log/vsftpd.log
+xferlog_std_format=YES
+#
+connect_from_port_20=YES
+#
+#chown_uploads=YES
+#chown_username=whoever
+#
+idle_session_timeout=600
+data_connection_timeout=120
+#
+#async_abor_enable=YES
+#ascii_upload_enable=YES
+#ascii_download_enable=YES
+#
+ftpd_banner=Welcome to IPFire FTP service.
+#
+chroot_local_user=YES
+#chroot_list_enable=YES
+secure_chroot_dir=/var/ftp/empty
+#
+ls_recurse_enable=YES
+require_ssl_reuse=NO
+#
+#ssl_enable=YES
+#force_local_data_ssl=NO
+#force_local_logins_ssl=NO
+#rsa_cert_file=/etc/vsftpd.pem
+#
+userlist_deny=NO
+userlist_enable=YES
+userlist_file=/etc/vsftpd.user_list
+#
diff --git a/config/vsftpd/vsftpd.user_list b/config/vsftpd/vsftpd.user_list
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lfs/vsftpd b/lfs/vsftpd
new file mode 100644 (file)
index 0000000..07dda30
--- /dev/null
@@ -0,0 +1,100 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2009  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 2.3.4
+
+THISAPP    = vsftpd-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = vsftpd
+PAK_VER    = 8
+
+DEPS       = ""
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 2ea5d19978710527bb7444d93b67767a
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+dist: 
+       $(PAK)
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+       @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+       @$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+       @$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && echo "#define VSF_BUILD_SSL" >>builddefs.h
+       cd $(DIR_APP) && install -v -d -m 0755 /var/ftp/empty
+       cd $(DIR_APP) && install -v -d -m 0755 /home/ftp
+       chown vsftpd.vsftpd /home/ftp
+       cd $(DIR_APP) && make
+       cd $(DIR_APP) && install -v -m 755 vsftpd /usr/sbin/vsftpd
+       cd $(DIR_APP) && install -v -m 644 vsftpd.8 /usr/share/man/man8
+       cd $(DIR_APP) && install -v -m 644 vsftpd.conf.5 /usr/share/man/man5
+       cd $(DIR_APP) && install -v -m 644 $(DIR_SRC)/config/vsftpd/vsftpd.conf /etc
+       cd $(DIR_APP) && install -v -m 644 $(DIR_SRC)/config/vsftpd/vsftpd.user_list /etc
+
+       #install initscripts
+       $(call INSTALL_INITSCRIPT,vsftpd)
+
+       ln -sf ../init.d/vsftpd /etc/rc.d/rc3.d/S65vsftpd
+       ln -sf ../init.d/vsftpd /etc/rc.d/rc0.d/K35vsftpd
+       ln -sf ../init.d/vsftpd /etc/rc.d/rc6.d/K35vsftpd
+       install -v -m 644 $(DIR_SRC)/config/backup/includes/vsftpd \
+                       /var/ipfire/backup/addons/includes/vsftpd
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 9bbbeb0f1d2d40b45e656db2881f9ef01cffa758..c80868bf534203e0363323d116f98a5e1ebc8cd0 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1473,6 +1473,7 @@ buildipfire() {
   lfsmake2 etherwake
   lfsmake2 bwm-ng
   lfsmake2 sysstat
+  lfsmake2 vsftpd
   lfsmake2 strongswan
   lfsmake2 rng-tools
   lfsmake2 lsof
diff --git a/src/initscripts/packages/vsftpd b/src/initscripts/packages/vsftpd
new file mode 100644 (file)
index 0000000..62d838a
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Begin $rc_base/init.d/vsftpd
+
+# Based on sysklogd script from LFS-3.1 and earlier.
+# Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
+
+#$LastChangedBy: bdubbs $
+#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
+
+. /etc/sysconfig/rc
+. $rc_functions
+
+case "$1" in
+       start)
+               boot_mesg "Starting vsFTPD Server..."
+               loadproc /usr/sbin/vsftpd
+               ;;
+
+       stop)
+               boot_mesg "Stopping vsFTPD Server..."
+               killproc /usr/sbin/vsftpd
+               ;;
+
+       reload)
+               boot_mesg "Reloading vsFTPD Server..."
+               reloadproc /usr/sbin/vsftpd
+               ;;
+
+       restart)
+               $0 stop
+               sleep 1
+               $0 start
+               ;;
+
+       status)
+               statusproc /usr/sbin/vsftpd
+               ;;
+
+       *)
+               echo "Usage: $0 {start|stop|reload|restart|status}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/vsftpd
diff --git a/src/paks/vsftpd/install.sh b/src/paks/vsftpd/install.sh
new file mode 100644 (file)
index 0000000..fb865dd
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+extract_files
+restore_backup ${NAME}
+# Disable vsftpd by default due to lack of configuration file
+mkdir -p /etc/rc.d/rc3.d/off
+mv -f /etc/rc.d/rc3.d/S??${NAME} /etc/rc.d/rc3.d/off
diff --git a/src/paks/vsftpd/uninstall.sh b/src/paks/vsftpd/uninstall.sh
new file mode 100644 (file)
index 0000000..63205f8
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+stop_service ${NAME}
+
+#Create a backupinclude if it not exist
+if [ ! -e "/var/ipfire/backup/addons/includes/vsftpd" ]; then
+    echo /etc/vsftpd.conf > /var/ipfire/backup/addons/includes/vsftpd
+    echo /etc/vsftpd.user_list >> /var/ipfire/backup/addons/includes/vsftpd
+fi
+#Fix wrong backupinclude
+sed -i 's|^etc|/etc|g' /var/ipfire/backup/addons/includes/vsftpd
+make_backup ${NAME}
+#Remove userdate from rootfile
+cat /opt/pakfire/db/rootfiles/vsftpd | \
+    grep -v "home/ftp" | \
+    grep -v "var/ftp" > /opt/pakfire/db/rootfiles/vsftpd.tmp
+mv /opt/pakfire/db/rootfiles/vsftpd.tmp /opt/pakfire/db/rootfiles/vsftpd 
+
+remove_files
diff --git a/src/paks/vsftpd/update.sh b/src/paks/vsftpd/update.sh
new file mode 100644 (file)
index 0000000..e42310f
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+extract_files
+restore_backup ${NAME}
+start_service --background ${NAME}