diff --git a/.cvsignore b/.cvsignore index 856c4c3..c05734b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -vsftpd-1.1.0.tar.gz +vsftpd-1.1.3.tar.gz diff --git a/sources b/sources index 1191a36..ebe3608 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b76403e4b366dc4c2344040f5e3fe137 vsftpd-1.1.0.tar.gz +3f5f59be09a6f89e516a75ad0d1e3802 vsftpd-1.1.3.tar.gz diff --git a/vsftpd.init b/vsftpd.init new file mode 100755 index 0000000..ded8fe0 --- /dev/null +++ b/vsftpd.init @@ -0,0 +1,91 @@ + +#!/bin/bash +# +# vsftpd This shell script takes care of starting and stopping +# standalone vsftpd. +# +# chkconfig: - 60 50 +# description: Vsftpd is a ftp daemon, which is the program \ +# that answers incoming ftp service requests. +# processname: vsftpd +# config: /etc/vsftpd/vsftpd.conf + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +[ -x /usr/sbin/vsftpd ] || exit 0 + +RETVAL=0 +prog="vsftpd" + +start() { + # Start daemons. + + if [ -d /etc/vsftpd ] ; then + declare -a sites + sites=(`ls /etc/vsftpd/*.conf`) + site_count=${#sites[@]} + index=0 + + while [ "${index}" -lt "${site_count}" ] ; do + site=`basename ${sites[${index}]} .conf` + echo -n $"Starting $prog for $site: " + ( /usr/sbin/vsftpd ${sites[${index}]} &) + daemon true + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog + let "index = index + 1" + done + else + RETVAL=1 + fi + return $RETVAL +} + +stop() { + # Stop daemons. + echo -n $"Shutting down $prog: " + killproc $prog + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + RETVAL=$? + ;; + condrestart) + if [ -f /var/lock/subsys/$prog ]; then + stop + start + RETVAL=$? + fi + ;; + status) + status $prog + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 +esac + +exit $RETVAL diff --git a/vsftpd.spec b/vsftpd.spec index 4075aed..aee9f0e 100644 --- a/vsftpd.spec +++ b/vsftpd.spec @@ -1,7 +1,7 @@ Summary: vsftpd - Very Secure Ftp Daemon Name: vsftpd -Version: 1.1.0 -Release: 2 +Version: 1.1.3 +Release: 7 License: GPL Group: System Environment/Daemons Source: ftp://ferret.lmh.ox.ac.uk/pub/linux/%{name}-%{version}.tar.gz @@ -9,11 +9,13 @@ Source1: vsftpd.xinetd Source2: vsftpd.pam Source3: vsftpd.ftpusers Source4: vsftpd.user_list +Source5: vsftpd.init Patch1: vsftpd-1.1.0-rh.patch Patch2: vsftpd-1.0.1-missingok.patch -Patch3: vsftpd-1.0.1-anon.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Requires: xinetd, logrotate +Requires: logrotate +Prereq: /sbin/chkconfig, /sbin/service, /usr/sbin/usermod +Obsoletes: anonftp Provides: ftpserver %description @@ -24,10 +26,10 @@ scratch. %setup -q -n %{name}-%{version} %patch1 -p1 -b .rh %patch2 -p1 -b .mok -%patch3 -p1 -b .anon +cp %{SOURCE1} . %build -make CFLAGS="$RPM_OPT_FLAGS -pipe -D_FILE_OFFSET_BITS=64" \ +make CFLAGS="$RPM_OPT_FLAGS -pipe" \ LINK="" \ %{?_smp_mflags} @@ -35,36 +37,73 @@ make CFLAGS="$RPM_OPT_FLAGS -pipe -D_FILE_OFFSET_BITS=64" \ [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/sbin mkdir -p $RPM_BUILD_ROOT/etc -mkdir -p $RPM_BUILD_ROOT/etc/pam.d -mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d -mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d -mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man5 -mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8 +mkdir -p $RPM_BUILD_ROOT/etc/{vsftpd,pam.d,logrotate.d,rc.d/init.d} +mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man{5,8} install -m 755 vsftpd $RPM_BUILD_ROOT/usr/sbin/vsftpd -install -m 600 vsftpd.conf $RPM_BUILD_ROOT/etc/vsftpd.conf +install -m 600 vsftpd.conf $RPM_BUILD_ROOT/etc/vsftpd/vsftpd.conf install -m 644 vsftpd.conf.5 $RPM_BUILD_ROOT/%{_mandir}/man5/ install -m 644 vsftpd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/ install -m 644 RedHat/vsftpd.log $RPM_BUILD_ROOT/etc/logrotate.d/vsftpd.log -install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/xinetd.d/vsftpd install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/vsftpd install -m 600 %{SOURCE3} $RPM_BUILD_ROOT/etc/vsftpd.ftpusers install -m 600 %{SOURCE4} $RPM_BUILD_ROOT/etc/vsftpd.user_list +install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vsftpd + +mkdir -p $RPM_BUILD_ROOT/var/ftp/pub %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT +%post +/sbin/chkconfig --add vsftpd +/usr/sbin/usermod -d /var/ftp ftp >/dev/null 2>&1 || : + +%preun +if [ $1 = 0 ]; then + /sbin/service vsftpd stop > /dev/null 2>&1 + /sbin/chkconfig --del vsftpd +fi + + %files %defattr(-,root,root) /usr/sbin/vsftpd +/etc/rc.d/init.d/vsftpd %config(noreplace) /etc/vsftpd.* +%dir /etc/vsftpd +%config(noreplace) /etc/vsftpd/* %config(noreplace) /etc/pam.d/vsftpd %config(noreplace) /etc/logrotate.d/vsftpd.log -%config(noreplace) /etc/xinetd.d/vsftpd -%doc INSTALL BUGS AUDIT Changelog LICENSE README README.security REWARD SPEED TODO SECURITY/ TUNING SIZE +%doc FAQ INSTALL BUGS AUDIT Changelog LICENSE README README.security REWARD SPEED TODO SECURITY/ TUNING SIZE vsftpd.xinetd %{_mandir}/man5/vsftpd.conf.* %{_mandir}/man8/vsftpd.* +/var/ftp %changelog +* Tue Feb 11 2003 Bill Nottingham 1.1.3-7 +- provide /var/ftp & /var/ftp/pub. obsolete anonftp. + +* Mon Feb 10 2003 Bill Nottingham 1.1.3-6 +- clean up comments in init script (#83962) + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Mon Dec 30 2002 Florian La Roche +- change to /etc/rc.d/init.d for better compatibility + +* Mon Dec 16 2002 Bill Nottingham 1.1.3-3 +- fix initscript perms +- fix typo in initscript (#76587) + +* Fri Dec 13 2002 Bill Nottingham 1.1.3-2 +- update to 1.1.3 +- run standalone, don't run by default +- fix reqs + +* Fri Nov 22 2002 Joe Orton 1.1.0-3 +- fix use with xinetd-ipv6; add flags=IPv4 in xinetd file (#78410) + * Tue Nov 12 2002 Nalin Dahyabhai 1.0.1-9 - remove absolute paths from PAM configuration so that the right modules get used for whichever arch we're built for on multilib systems diff --git a/vsftpd.xinetd b/vsftpd.xinetd index 845ba58..9807b70 100644 --- a/vsftpd.xinetd +++ b/vsftpd.xinetd @@ -3,10 +3,11 @@ # normal, unencrypted usernames and passwords for authentication. service ftp { - disable = yes socket_type = stream wait = no user = root server = /usr/sbin/vsftpd nice = 10 + disable = yes + flags = IPv4 }