From 043fee09a64dae79798b18f75aca341927042777 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sun, 13 Mar 2005 21:45:54 +0000 Subject: [PATCH 001/122] auto-import pure-ftpd-1.0.20-0.fdr.9 on branch devel from pure-ftpd-1.0.20-0.fdr.9.src.rpm --- .cvsignore | 1 + pure-ftpd-1.0.20-config.patch | 95 +++++++++++++++ pure-ftpd-1.0.20-libdir.patch | 13 +++ pure-ftpd.init | 80 +++++++++++++ pure-ftpd.logrotate | 5 + pure-ftpd.spec | 213 ++++++++++++++++++++++++++++++++++ pure-ftpd.xinetd | 17 +++ sources | 1 + 8 files changed, 425 insertions(+) create mode 100644 pure-ftpd-1.0.20-config.patch create mode 100644 pure-ftpd-1.0.20-libdir.patch create mode 100644 pure-ftpd.init create mode 100644 pure-ftpd.logrotate create mode 100644 pure-ftpd.spec create mode 100644 pure-ftpd.xinetd diff --git a/.cvsignore b/.cvsignore index e69de29..b57698d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +pure-ftpd-1.0.20.tar.bz2 diff --git a/pure-ftpd-1.0.20-config.patch b/pure-ftpd-1.0.20-config.patch new file mode 100644 index 0000000..aa88019 --- /dev/null +++ b/pure-ftpd-1.0.20-config.patch @@ -0,0 +1,95 @@ +--- ./configuration-file/pure-ftpd.conf.in.config 2004-05-15 22:34:54.000000000 +0200 ++++ ./configuration-file/pure-ftpd.conf.in 2005-02-11 20:26:35.209063248 +0100 +@@ -9,7 +9,7 @@ + # instead of command-line options, please run the + # following command : + # +-# @prefix@/sbin/pure-config.pl @prefix@/etc/pure-ftpd.conf ++# @sbindir@/pure-config.pl @sysconfdir@/pure-ftpd.conf + # + # Please don't forget to have a look at documentation at + # http://www.pureftpd.org/documentation.shtml for a complete list of +@@ -107,23 +107,23 @@ + + # LDAP configuration file (see README.LDAP) + +-# LDAPConfigFile /etc/pureftpd-ldap.conf ++# LDAPConfigFile @sysconfdir@/pureftpd-ldap.conf + + + + # MySQL configuration file (see README.MySQL) + +-# MySQLConfigFile /etc/pureftpd-mysql.conf ++# MySQLConfigFile @sysconfdir@/pureftpd-mysql.conf + + + # Postgres configuration file (see README.PGSQL) + +-# PGSQLConfigFile /etc/pureftpd-pgsql.conf ++# PGSQLConfigFile @sysconfdir@/pureftpd-pgsql.conf + + + # PureDB user database (see README.Virtual-Users) + +-# PureDB /etc/pureftpd.pdb ++# PureDB @sysconfdir@/pureftpd.pdb + + + # Path to pure-authd socket (see README.Authentication-Modules) +@@ -134,7 +134,7 @@ + + # If you want to enable PAM authentication, uncomment the following line + +-# PAMAuthentication yes ++PAMAuthentication yes + + + +@@ -158,7 +158,7 @@ + # 'ls' recursion limits. The first argument is the maximum number of + # files to be displayed. The second one is the max subdirectories depth + +-LimitRecursion 2000 8 ++LimitRecursion 7500 8 + + + +@@ -237,7 +237,7 @@ + + # Minimum UID for an authenticated user to log in. + +-MinUID 100 ++MinUID 500 + + + +@@ -276,7 +276,7 @@ + + # Disallow anonymous users to upload new files (no = upload is allowed) + +-AnonymousCantUpload no ++AnonymousCantUpload yes + + + +@@ -301,7 +301,7 @@ + # fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338 + # This log file can then be processed by www traffic analyzers. + +-# AltLog clf:/var/log/pureftpd.log ++AltLog clf:/var/log/pureftpd.log + + + +@@ -434,3 +434,10 @@ + # By default, both IPv4 and IPv6 are enabled. + + # IPV6Only yes ++ ++ ++ ++# Do not use the /etc/ftpusers file to disable accounts. We're already ++# using MinUID to block users with uid < 500 ++ ++UseFtpUsers no diff --git a/pure-ftpd-1.0.20-libdir.patch b/pure-ftpd-1.0.20-libdir.patch new file mode 100644 index 0000000..77b6c86 --- /dev/null +++ b/pure-ftpd-1.0.20-libdir.patch @@ -0,0 +1,13 @@ +--- ./configure.libdir 2004-06-20 19:41:54.000000000 +0200 ++++ ./configure 2005-01-31 12:33:03.901660331 +0100 +@@ -19781,8 +19781,8 @@ + LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/mysql -L${withval}/mysql/lib" + CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/mysql -I${withval}/mysql/include" + else +- LD_RUN_PATH="/usr/local/mysql/lib:/usr/local/mysql/lib/mysql:/usr/lib/mysql:/usr/mysql/lib:/usr/mysql/lib/mysql:/usr/local/lib/mysql:${LD_RUN_PATH:+:}${LD_RUN_PATH}" +- LDFLAGS="$LDFLAGS -L/usr/local/mysql/lib -L/usr/lib/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql" ++ LD_RUN_PATH="/usr/local/mysql/lib:/usr/local/mysql/lib/mysql:${libdir}/mysql:/usr/mysql/lib:/usr/mysql/lib/mysql:/usr/local/lib/mysql:${LD_RUN_PATH:+:}${LD_RUN_PATH}" ++ LDFLAGS="$LDFLAGS -L/usr/local/mysql/lib -L${libdir}/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql" + CPPFLAGS="$CPPFLAGS -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql" + fi + diff --git a/pure-ftpd.init b/pure-ftpd.init new file mode 100644 index 0000000..b330c9b --- /dev/null +++ b/pure-ftpd.init @@ -0,0 +1,80 @@ +#!/bin/bash +# +# Startup script for the pure-ftpd FTP Server $Revision: 1.1 $ +# +# chkconfig: - 85 15 +# description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd +# processname: pure-ftpd +# pidfile: /var/run/pure-ftpd.pid +# config: /etc/pure-ftpd/pure-ftpd.conf + +# Source function library. +. /etc/init.d/functions +. /etc/sysconfig/network + +# Check that networking is configured. +[ ${NETWORKING} = "no" ] && exit 0 + +RETVAL=0 + +# Path to the pure-ftp binaries. +fullpath=/usr/sbin/pure-ftpd +pureftpwho=/usr/sbin/pure-ftpwho +pure_config=/etc/pure-ftpd/pure-ftpd.conf +pure_launch_script=/usr/sbin/pure-config.pl + + +start() { + echo -n $"Starting Pure-ftpd: " + daemon $pure_launch_script $pure_config --daemonize + RETVAL=$? + [ $RETVAL = 0 ] && touch /var/lock/subsys/pure-ftpd + echo +} + +stop() { + echo -n $"Stopping Pure-ftpd: " + killproc pure-ftpd + RETVAL=$? + [ $RETVAL = 0 ] && rm -f /var/lock/subsys/pure-ftpd + echo +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; + reload) + echo -n "Re-reading Pure-ftpd config: " + killproc pure-ftpd -HUP + RETVAL=$? + echo + ;; + condrestart) + if [ -f /var/lock/subsys/pure-ftpd ] ; then + stop + # avoid race + sleep 3 + start + fi + ;; + status) + status pure-ftpd + RETVAL=$? + if [ -f $pureftpwho ] && [ $RETVAL -eq 0 ] ; then + $pureftpwho + fi + ;; + *) + echo $"Usage: pure-ftpd {start|stop|restart|reload|condrestart|status}" + RETVAL=1 +esac +exit $RETVAL diff --git a/pure-ftpd.logrotate b/pure-ftpd.logrotate new file mode 100644 index 0000000..dde31f1 --- /dev/null +++ b/pure-ftpd.logrotate @@ -0,0 +1,5 @@ +/var/log/pureftpd.log { + weekly + notifempty + missingok +} diff --git a/pure-ftpd.spec b/pure-ftpd.spec new file mode 100644 index 0000000..942a403 --- /dev/null +++ b/pure-ftpd.spec @@ -0,0 +1,213 @@ +Name: pure-ftpd +Version: 1.0.20 +Release: 0.fdr.9 +Epoch: 0 +Summary: Lightweight, fast and secure FTP server + +Group: System Environment/Daemons +License: BSD +URL: http://www.pureftpd.org +Source0: ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.20.tar.bz2 +Source1: pure-ftpd.init +Source2: pure-ftpd.logrotate +Source3: pure-ftpd.xinetd +Patch0: pure-ftpd-1.0.20-config.patch +Patch1: pure-ftpd-1.0.20-libdir.patch +Provides: ftpserver +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: pam-devel, perl, python, libcap-devel +#BuildRequires: openssl-devel +%{?_with_ldap:BuildRequires: openldap-devel} +%{?_with_mysql:BuildRequires: mysql-devel} +%{?_with_pgsql:BuildRequires: postgresql-devel} + +Requires(post): chkconfig +Requires(preun): chkconfig, initscripts +Requires(postun): initscripts +Requires: logrotate + + +%description +Pure-FTPd is a fast, production-quality, standard-comformant FTP server, +based upon Troll-FTPd. Unlike other popular FTP servers, it has no known +security flaw, it is really trivial to set up and it is especially designed +for modern Linux and FreeBSD kernels (setfsuid, sendfile, capabilities) . +Features include PAM support, IPv6, chroot()ed home directories, virtual +domains, built-in LS, anti-warez system, bandwidth throttling, FXP, bounded +ports for passive downloads, UL/DL ratios, native LDAP and SQL support, +Apache log files and more. +Rebuild switches: +--with ldap enable ldap support +--with mysql enable mysql support +--with pgsql enable postgresql support +--with extauth enable external authentication + + +%prep +%setup -q +%patch0 -p0 -b .config +%patch1 -p0 -b .libdir + + +%build +%configure --with-paranoidmsg \ + --with-capabilities \ + --with-privsep \ + --with-pam \ + --with-puredb \ + --with-sendfile \ + --with-altlog \ + --with-cookie \ + --with-diraliases \ + --with-throttling \ + --with-ratios \ + --with-quotas \ + --with-ftpwho \ + --with-welcomemsg \ + --with-uploadscript \ + --with-peruserlimits \ + --with-virtualhosts \ + --with-virtualchroot \ + --with-largefile \ + --sysconfdir=%{_sysconfdir}/%{name} \ + --without-tls \ + --without-rendezvous \ + %{?_with_ldap} \ + %{?_with_mysql} \ + %{?_with_pgsql} \ + %{?_with_extauth} + +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT + +make install DESTDIR=$RPM_BUILD_ROOT + +install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man8/ +install -d -m 755 $RPM_BUILD_ROOT%{_sbindir} +install -d -m 755 $RPM_BUILD_ROOT%{_initrddir} +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} +install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/ftp + +# Conf +install -p -m 755 configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir} +install -p -m 644 configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name} +install -p -m 755 configuration-file/pure-config.py $RPM_BUILD_ROOT%{_sbindir} +install -p -m 644 pureftpd-ldap.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name} +install -p -m 644 pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name} +install -p -m 644 pureftpd-pgsql.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name} + +# Man +install -p -m 644 man/pure-ftpd.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -p -m 644 man/pure-ftpwho.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -p -m 644 man/pure-mrtginfo.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -p -m 644 man/pure-uploadscript.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -p -m 644 man/pure-pw.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -p -m 644 man/pure-pwconvert.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -p -m 644 man/pure-statsdecode.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -p -m 644 man/pure-quotacheck.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install -p -m 644 man/pure-authd.8 $RPM_BUILD_ROOT%{_mandir}/man8 + +# Init script +install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name} + +# Pam +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/ +install -p -m 644 pam/pure-ftpd $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/ + +# Logrotate +install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ +install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} + +# xinetd support +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/ +install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post +if [ "$1" -le "1" ]; then + /sbin/chkconfig --add pure-ftpd +fi + +%preun +if [ "$1" -lt "1" ]; then + /sbin/service pure-ftpd stop > /dev/null 2>&1 || : + /sbin/chkconfig --del pure-ftpd +fi + +%postun +if [ "$1" -ge "1" ]; then + /sbin/service pure-ftpd condrestart > /dev/null 2>&1 +fi + + +%files +%defattr(-, root, root, -) +%doc FAQ THANKS README.Authentication-Modules README.Virtual-Users README +%doc README.Contrib README.Configuration-File AUTHORS CONTACT HISTORY NEWS +%doc README.LDAP README.PGSQL README.MySQL README.Netfilter +%doc contrib/pure-vpopauth.pl pureftpd.schema contrib/pure-stat.pl +%{_bindir}/pure-* +%{_sbindir}/pure-* +%config %{_initrddir}/%{name} +%config(noreplace) %{_sysconfdir}/%{name} +%config(noreplace) %{_sysconfdir}/pam.d/%{name} +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%config(noreplace) %{_sysconfdir}/xinetd.d/%{name} +%{_mandir}/man8/* +%dir /var/ftp/ + + +%changelog +* Wed Feb 16 2005 Aurelien Bompard 0:1.0.20-0.fdr.9 +- license is BSD, not GPL + +* Mon Feb 14 2005 Aurelien Bompard 0:1.0.20-0.fdr.8 +- various fixes. See bug 1573 (fedora.us) for more info. + +* Fri Feb 11 2005 Aurelien Bompard 0:1.0.20-0.fdr.7 +- fix init script +- require logrotate +- add rebuild switches to lower dependancies +- see bug 1573 (fedora.us) for more info. + +* Fri Feb 04 2005 Aurelien Bompard 0:1.0.20-0.fdr.6 +- Add the "UseFtpUsers no" directive in the config file since we don't + use it anymore + +* Wed Feb 02 2005 Aurelien Bompard 0:1.0.20-0.fdr.5 +- various spec file improvements + +* Mon Jan 31 2005 Aurelien Bompard 0:1.0.20-0.fdr.4 +- add patch for x86_64 support +- implement wishes in bug 1573 from Jose Pedro Oliveira +- don't use the ftpusers file, and thus remove conflicts with other FTP servers +- rediff config patch + +* Tue Nov 02 2004 Aurelien Bompard 0:1.0.20-0.fdr.3 +- add large file support + +* Fri Sep 24 2004 Aurelien Bompard 0:1.0.20-0.fdr.2 +- redirect %%preun output to /dev/null +- add requirements to chkconfig for the scriptlets + +* Sun Aug 01 2004 Aurelien Bompard 0:1.0.20-0.fdr.1 +- version 1.0.20 (bugfixes) + +* Mon Jun 28 2004 Aurelien Bompard 0:1.0.19-0.fdr.1 +- version 1.0.19 + +* Tue May 04 2004 Aurelien Bompard 0:1.0.18-0.fdr.1 +- version 1.0.18 +- spec file cleanups + +* Sun Oct 19 2003 Aurelien Bompard 1.0.16a-1 +- Redhatize the Mandrake RPM +- version 1.0.16a +- improve ftpusers creation script + diff --git a/pure-ftpd.xinetd b/pure-ftpd.xinetd new file mode 100644 index 0000000..e980e94 --- /dev/null +++ b/pure-ftpd.xinetd @@ -0,0 +1,17 @@ +# default: off +# description: pure-ftpd server, xinetd version. \ +# Don't run the standalone version if you run \ +# this and remember do set "Daemonize" to "no" \ +# in /etc/pure-ftpd/pure-ftpd.conf +service ftp +{ + disable = yes + socket_type = stream + wait = no + user = root + server = /usr/sbin/pure-config.pl + server_args = /etc/pure-ftpd/pure-ftpd.conf + log_on_success += DURATION USERID + log_on_failure += USERID + nice = 10 +} diff --git a/sources b/sources index e69de29..b2e6338 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +e928e9e15adf6b52bfe6183fdad20144 pure-ftpd-1.0.20.tar.bz2 From b6d921c62d97bdc5f3e62e907f02fdb2fa403008 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sun, 13 Mar 2005 21:49:29 +0000 Subject: [PATCH 002/122] - adapt to Fedora Extras (drop Epoch, change Release tag) --- pure-ftpd.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 942a403..1a9a70b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,7 +1,6 @@ Name: pure-ftpd Version: 1.0.20 -Release: 0.fdr.9 -Epoch: 0 +Release: 1 Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -164,6 +163,9 @@ fi %changelog +* Sun Mar 13 2005 Aurelien Bompard 1.0.20-1 +- adapt to Fedora Extras (drop Epoch, change Release tag) + * Wed Feb 16 2005 Aurelien Bompard 0:1.0.20-0.fdr.9 - license is BSD, not GPL From 61bc9447c55737b0fbea460b69359023dbe65440 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Wed, 23 Mar 2005 22:19:44 +0000 Subject: [PATCH 003/122] - implement Jose's RFE in bug 151337: pure-ftpwho can be run by a normal user. - change release tag for FC3/FC4 --- pure-ftpd.init | 4 +++- pure-ftpd.spec | 27 +++++++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/pure-ftpd.init b/pure-ftpd.init index b330c9b..31bf65b 100644 --- a/pure-ftpd.init +++ b/pure-ftpd.init @@ -1,6 +1,6 @@ #!/bin/bash # -# Startup script for the pure-ftpd FTP Server $Revision: 1.1 $ +# Startup script for the pure-ftpd FTP Server $Revision: 1.2 $ # # chkconfig: - 85 15 # description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd @@ -10,6 +10,8 @@ # Source function library. . /etc/init.d/functions + +# Source networking configuration. . /etc/sysconfig/network # Check that networking is configured. diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 1a9a70b..0b02139 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.20 -Release: 1 +Release: 2.fc4 Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -10,6 +10,8 @@ Source0: ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.20.tar.b Source1: pure-ftpd.init Source2: pure-ftpd.logrotate Source3: pure-ftpd.xinetd +Source4: pure-ftpd.pure-ftpwho.pam +Source5: pure-ftpd.pure-ftpwho.consoleapp Patch0: pure-ftpd-1.0.20-config.patch Patch1: pure-ftpd-1.0.20-libdir.patch Provides: ftpserver @@ -23,7 +25,7 @@ BuildRequires: pam-devel, perl, python, libcap-devel Requires(post): chkconfig Requires(preun): chkconfig, initscripts Requires(postun): initscripts -Requires: logrotate +Requires: logrotate, usermode %description @@ -83,7 +85,7 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man8/ +install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man8 install -d -m 755 $RPM_BUILD_ROOT%{_sbindir} install -d -m 755 $RPM_BUILD_ROOT%{_initrddir} install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} @@ -112,17 +114,23 @@ install -p -m 644 man/pure-authd.8 $RPM_BUILD_ROOT%{_mandir}/man8 install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name} # Pam -install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/ +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d install -p -m 644 pam/pure-ftpd $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/ # Logrotate -install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} # xinetd support -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/ +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name} +# pure-ftpwho and non-root users +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps +install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/pure-ftpwho +install -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/pure-ftpwho +ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/pure-ftpwho + %clean rm -rf $RPM_BUILD_ROOT @@ -158,11 +166,18 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/xinetd.d/%{name} +%config %{_sysconfdir}/pam.d/pure-ftpwho +%config %{_sysconfdir}/security/console.apps/pure-ftpwho %{_mandir}/man8/* %dir /var/ftp/ %changelog +* Wed Mar 23 2005 Aurelien Bompard 1.0.20-2.fc4 +- implement Jose's RFE in bug 151337: pure-ftpwho can be run + by a normal user. +- change release tag for FC4 + * Sun Mar 13 2005 Aurelien Bompard 1.0.20-1 - adapt to Fedora Extras (drop Epoch, change Release tag) From b3a2f69437069b31e84700da0610c5281c54a799 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Tue, 29 Mar 2005 15:27:13 +0000 Subject: [PATCH 004/122] - add missing usermode files --- pure-ftpd.pure-ftpwho.consoleapp | 3 +++ pure-ftpd.pure-ftpwho.pam | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 pure-ftpd.pure-ftpwho.consoleapp create mode 100644 pure-ftpd.pure-ftpwho.pam diff --git a/pure-ftpd.pure-ftpwho.consoleapp b/pure-ftpd.pure-ftpwho.consoleapp new file mode 100644 index 0000000..8452f88 --- /dev/null +++ b/pure-ftpd.pure-ftpwho.consoleapp @@ -0,0 +1,3 @@ +USER=root +PROGRAM=/usr/sbin/pure-ftpwho +GUI=no diff --git a/pure-ftpd.pure-ftpwho.pam b/pure-ftpd.pure-ftpwho.pam new file mode 100644 index 0000000..268cc92 --- /dev/null +++ b/pure-ftpd.pure-ftpwho.pam @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth required pam_localuser.so +account required pam_permit.so From 76d92c433082f99f4f72eb5da28f0a60240df100 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Mon, 1 Aug 2005 20:24:05 +0000 Subject: [PATCH 005/122] - build feature-complete by default - add TLS support - see bug #162849 --- pure-ftpd.spec | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 0b02139..6ce08d4 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.20 -Release: 2.fc4 +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -17,10 +17,10 @@ Patch1: pure-ftpd-1.0.20-libdir.patch Provides: ftpserver BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel, perl, python, libcap-devel -#BuildRequires: openssl-devel -%{?_with_ldap:BuildRequires: openldap-devel} -%{?_with_mysql:BuildRequires: mysql-devel} -%{?_with_pgsql:BuildRequires: postgresql-devel} +%{!?_without_ldap:BuildRequires: openldap-devel} +%{!?_without_mysql:BuildRequires: mysql-devel} +%{!?_without_pgsql:BuildRequires: postgresql-devel} +%{!?_without_tls:BuildRequires: openssl-devel} Requires(post): chkconfig Requires(preun): chkconfig, initscripts @@ -38,10 +38,11 @@ domains, built-in LS, anti-warez system, bandwidth throttling, FXP, bounded ports for passive downloads, UL/DL ratios, native LDAP and SQL support, Apache log files and more. Rebuild switches: ---with ldap enable ldap support ---with mysql enable mysql support ---with pgsql enable postgresql support ---with extauth enable external authentication +--without ldap disable ldap support +--without mysql disable mysql support +--without pgsql disable postgresql support +--without extauth disable external authentication +--without tls disable SSL/TLS %prep @@ -71,12 +72,12 @@ Rebuild switches: --with-virtualchroot \ --with-largefile \ --sysconfdir=%{_sysconfdir}/%{name} \ - --without-tls \ --without-rendezvous \ - %{?_with_ldap} \ - %{?_with_mysql} \ - %{?_with_pgsql} \ - %{?_with_extauth} + %{!?_without_tls:--with-tls --with-certfile=%{_sysconfdir}/pki/%{name}/%{name}.pem} \ + %{!?_without_ldap:--with-ldap} \ + %{!?_without_mysql:--with-mysql} \ + %{!?_without_pgsql:--with-pgsql} \ + %{!?_without_extauth:--with-extauth} make %{?_smp_mflags} @@ -90,6 +91,7 @@ install -d -m 755 $RPM_BUILD_ROOT%{_sbindir} install -d -m 755 $RPM_BUILD_ROOT%{_initrddir} install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/ftp +%{!?_without_tls:install -d -m 700 $RPM_BUILD_ROOT%{_sysconfdir}/pki/%{name}} # Conf install -p -m 755 configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir} @@ -168,11 +170,17 @@ fi %config(noreplace) %{_sysconfdir}/xinetd.d/%{name} %config %{_sysconfdir}/pam.d/pure-ftpwho %config %{_sysconfdir}/security/console.apps/pure-ftpwho +%{!?_without_tls:%{_sysconfdir}/pki/%{name}} %{_mandir}/man8/* %dir /var/ftp/ %changelog +* Mon Aug 01 2005 Aurelien Bompard 1.0.20-3 +- build feature-complete by default +- add TLS support +- see bug #162849 + * Wed Mar 23 2005 Aurelien Bompard 1.0.20-2.fc4 - implement Jose's RFE in bug 151337: pure-ftpwho can be run by a normal user. From f1099f633de2b7737edc86a1c6440c23a378aa1f Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sun, 13 Nov 2005 17:41:27 +0000 Subject: [PATCH 006/122] rebuild --- pure-ftpd.init | 10 ++++++---- pure-ftpd.spec | 6 +++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pure-ftpd.init b/pure-ftpd.init index 31bf65b..b568876 100644 --- a/pure-ftpd.init +++ b/pure-ftpd.init @@ -1,6 +1,6 @@ #!/bin/bash # -# Startup script for the pure-ftpd FTP Server $Revision: 1.2 $ +# Startup script for the pure-ftpd FTP Server $Revision: 1.3 $ # # chkconfig: - 85 15 # description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd @@ -19,6 +19,8 @@ RETVAL=0 +prog="pure-ftpd" + # Path to the pure-ftp binaries. fullpath=/usr/sbin/pure-ftpd pureftpwho=/usr/sbin/pure-ftpwho @@ -27,7 +29,7 @@ pure_launch_script=/usr/sbin/pure-config.pl start() { - echo -n $"Starting Pure-ftpd: " + echo -n $"Starting $prog: " daemon $pure_launch_script $pure_config --daemonize RETVAL=$? [ $RETVAL = 0 ] && touch /var/lock/subsys/pure-ftpd @@ -35,7 +37,7 @@ start() { } stop() { - echo -n $"Stopping Pure-ftpd: " + echo -n $"Stopping $prog: " killproc pure-ftpd RETVAL=$? [ $RETVAL = 0 ] && rm -f /var/lock/subsys/pure-ftpd @@ -55,7 +57,7 @@ case "$1" in start ;; reload) - echo -n "Re-reading Pure-ftpd config: " + echo -n $"Reloading $prog: " killproc pure-ftpd -HUP RETVAL=$? echo diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 6ce08d4..a58e922 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.20 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -176,6 +176,10 @@ fi %changelog +* Sun Nov 13 2005 Aurelien Bompard 1.0.20-4 +- rebuild +- i18n in init script + * Mon Aug 01 2005 Aurelien Bompard 1.0.20-3 - build feature-complete by default - add TLS support From 95182cfda99e45e6cfe40530a3d44e4b655e9076 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Tue, 21 Feb 2006 18:56:27 +0000 Subject: [PATCH 007/122] - version 1.0.21 --- .cvsignore | 2 +- pure-ftpd.spec | 12 ++++++++---- sources | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index b57698d..b8006af 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pure-ftpd-1.0.20.tar.bz2 +pure-ftpd-1.0.21.tar.bz2 diff --git a/pure-ftpd.spec b/pure-ftpd.spec index a58e922..52322e5 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,18 +1,18 @@ Name: pure-ftpd -Version: 1.0.20 -Release: 4%{?dist} +Version: 1.0.21 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons License: BSD URL: http://www.pureftpd.org -Source0: ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.20.tar.bz2 +Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.21.tar.bz2 Source1: pure-ftpd.init Source2: pure-ftpd.logrotate Source3: pure-ftpd.xinetd Source4: pure-ftpd.pure-ftpwho.pam Source5: pure-ftpd.pure-ftpwho.consoleapp -Patch0: pure-ftpd-1.0.20-config.patch +Patch0: pure-ftpd-1.0.21-config.patch Patch1: pure-ftpd-1.0.20-libdir.patch Provides: ftpserver BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -73,6 +73,7 @@ Rebuild switches: --with-largefile \ --sysconfdir=%{_sysconfdir}/%{name} \ --without-rendezvous \ + --with-rfc2640 \ %{!?_without_tls:--with-tls --with-certfile=%{_sysconfdir}/pki/%{name}/%{name}.pem} \ %{!?_without_ldap:--with-ldap} \ %{!?_without_mysql:--with-mysql} \ @@ -176,6 +177,9 @@ fi %changelog +* Tue Feb 21 2006 Aurelien Bompard 1.0.21-1 +- version 1.0.21 + * Sun Nov 13 2005 Aurelien Bompard 1.0.20-4 - rebuild - i18n in init script diff --git a/sources b/sources index b2e6338..f44164a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e928e9e15adf6b52bfe6183fdad20144 pure-ftpd-1.0.20.tar.bz2 +ca8a8dbec0cd9c8ea92fc4c37ea9c410 pure-ftpd-1.0.21.tar.bz2 From 02cdded9c6411f4d529ec857825522d94220d29a Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Tue, 21 Feb 2006 18:57:46 +0000 Subject: [PATCH 008/122] update config patch --- ...fig.patch => pure-ftpd-1.0.21-config.patch | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) rename pure-ftpd-1.0.20-config.patch => pure-ftpd-1.0.21-config.patch (85%) diff --git a/pure-ftpd-1.0.20-config.patch b/pure-ftpd-1.0.21-config.patch similarity index 85% rename from pure-ftpd-1.0.20-config.patch rename to pure-ftpd-1.0.21-config.patch index aa88019..fce0358 100644 --- a/pure-ftpd-1.0.20-config.patch +++ b/pure-ftpd-1.0.21-config.patch @@ -1,5 +1,5 @@ ---- ./configuration-file/pure-ftpd.conf.in.config 2004-05-15 22:34:54.000000000 +0200 -+++ ./configuration-file/pure-ftpd.conf.in 2005-02-11 20:26:35.209063248 +0100 +--- ./configuration-file/pure-ftpd.conf.in.config 2006-02-15 14:15:47.000000000 +0100 ++++ ./configuration-file/pure-ftpd.conf.in 2006-02-21 19:50:18.000000000 +0100 @@ -9,7 +9,7 @@ # instead of command-line options, please run the # following command : @@ -55,16 +55,23 @@ -@@ -237,7 +237,7 @@ +@@ -237,7 +237,14 @@ # Minimum UID for an authenticated user to log in. -MinUID 100 +MinUID 500 ++ ++ ++ ++# Do not use the /etc/ftpusers file to disable accounts. We're already ++# using MinUID to block users with uid < 500 ++ ++UseFtpUsers no -@@ -276,7 +276,7 @@ +@@ -276,7 +283,7 @@ # Disallow anonymous users to upload new files (no = upload is allowed) @@ -73,23 +80,12 @@ -@@ -301,7 +301,7 @@ +@@ -301,7 +308,7 @@ # fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338 # This log file can then be processed by www traffic analyzers. -# AltLog clf:/var/log/pureftpd.log -+AltLog clf:/var/log/pureftpd.log ++AltLog clf:@localstatedir@/log/pureftpd.log -@@ -434,3 +434,10 @@ - # By default, both IPv4 and IPv6 are enabled. - - # IPV6Only yes -+ -+ -+ -+# Do not use the /etc/ftpusers file to disable accounts. We're already -+# using MinUID to block users with uid < 500 -+ -+UseFtpUsers no From 461e78cdc0c38230ceea3ca92f182ebc98623793 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Wed, 22 Feb 2006 10:35:42 +0000 Subject: [PATCH 009/122] fix bug 182314 --- pure-ftpd.spec | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 52322e5..e95f9f0 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -46,7 +46,7 @@ Rebuild switches: %prep -%setup -q +%setup -q %patch0 -p0 -b .config %patch1 -p0 -b .libdir @@ -72,7 +72,8 @@ Rebuild switches: --with-virtualchroot \ --with-largefile \ --sysconfdir=%{_sysconfdir}/%{name} \ - --without-rendezvous \ + --without-bonjour \ + --with-cork \ --with-rfc2640 \ %{!?_without_tls:--with-tls --with-certfile=%{_sysconfdir}/pki/%{name}/%{name}.pem} \ %{!?_without_ldap:--with-ldap} \ @@ -82,7 +83,7 @@ Rebuild switches: make %{?_smp_mflags} -%install +%install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT @@ -94,7 +95,7 @@ install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/ftp %{!?_without_tls:install -d -m 700 $RPM_BUILD_ROOT%{_sysconfdir}/pki/%{name}} -# Conf +# Conf install -p -m 755 configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir} install -p -m 644 configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name} install -p -m 755 configuration-file/pure-config.py $RPM_BUILD_ROOT%{_sbindir} @@ -177,6 +178,11 @@ fi %changelog +* Wed Feb 22 2006 Aurelien Bompard 1.0.21-2 +- build option rendezvous has been renamed to bonjour +- add --with-cork +- see bug 182314 for more info, thanks to Jose Pedro Oliveira + * Tue Feb 21 2006 Aurelien Bompard 1.0.21-1 - version 1.0.21 From fc5c0bd9f5ce5af37cfa0640f3699183482464cb Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sun, 9 Apr 2006 15:39:18 +0000 Subject: [PATCH 010/122] fix mysql socket location (bug 188426) --- pure-ftpd-1.0.21-config.patch | 13 ++++++++++++- pure-ftpd.spec | 5 ++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pure-ftpd-1.0.21-config.patch b/pure-ftpd-1.0.21-config.patch index fce0358..d98ba8b 100644 --- a/pure-ftpd-1.0.21-config.patch +++ b/pure-ftpd-1.0.21-config.patch @@ -1,5 +1,5 @@ --- ./configuration-file/pure-ftpd.conf.in.config 2006-02-15 14:15:47.000000000 +0100 -+++ ./configuration-file/pure-ftpd.conf.in 2006-02-21 19:50:18.000000000 +0100 ++++ ./configuration-file/pure-ftpd.conf.in 2006-04-09 17:31:03.000000000 +0200 @@ -9,7 +9,7 @@ # instead of command-line options, please run the # following command : @@ -89,3 +89,14 @@ +--- ./pureftpd-mysql.conf.config 2006-04-09 17:33:04.000000000 +0200 ++++ ./pureftpd-mysql.conf 2006-04-09 17:33:27.000000000 +0200 +@@ -19,7 +19,7 @@ + + # Optional : define the location of mysql.sock if the server runs on this host. + +-MYSQLSocket /tmp/mysql.sock ++MYSQLSocket /var/lib/mysql/mysql.sock + + + # Mandatory : user to bind the server as. diff --git a/pure-ftpd.spec b/pure-ftpd.spec index e95f9f0..18d2cef 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -178,6 +178,9 @@ fi %changelog +* Sun Apr 09 2006 Aurelien Bompard 1.0.21-3 +- fix mysql socket location (bug 188426) + * Wed Feb 22 2006 Aurelien Bompard 1.0.21-2 - build option rendezvous has been renamed to bonjour - add --with-cork From 074fd22d01ca3ba8c6a4d00c25ae8b02dc6170f1 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sun, 14 May 2006 17:35:26 +0000 Subject: [PATCH 011/122] - add SELinux support - prevent the init script from displaying the config on startup --- pure-ftpd.README.SELinux | 30 +++++++++++++++++ pure-ftpd.init | 4 +-- pure-ftpd.pureftpd.te | 25 ++++++++++++++ pure-ftpd.spec | 70 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 124 insertions(+), 5 deletions(-) create mode 100644 pure-ftpd.README.SELinux create mode 100644 pure-ftpd.pureftpd.te diff --git a/pure-ftpd.README.SELinux b/pure-ftpd.README.SELinux new file mode 100644 index 0000000..fc9d98c --- /dev/null +++ b/pure-ftpd.README.SELinux @@ -0,0 +1,30 @@ +============================= +SELinux support for Pure-FTPd +============================= + +With this package, Pure-FTPd is now protected in the same way VSFTPd and +ProFTPd are in Fedora. + +Read Access +----------- +To allow files to be accessed by Pure-FTPd, you need either : +- to place them in /var/ftp +- to label them with the public_content_t. To do that, you can use:: + chcon -t public_content_t file_to_publish + +Write Access +------------ +If you wish to grant write access, you have to use the public_content_rw_t +type, for example with this command:: + chcon -t public_content_rw_t file_to_publish +and you have to turn on the allow_ftpd_anon_write boolean using +system-config-securitylevel, or using the following command:: + setsebool -P allow_ftpd_anon_write 1 + +Access to home directories +-------------------------- +If you want to publish files in a user's home directory, you have to turn +on the ftp_home_dir boolean, using system-config-securitylevel, or using +the following command:: + setsebool -P ftp_home_dir 1 + diff --git a/pure-ftpd.init b/pure-ftpd.init index b568876..b057da9 100644 --- a/pure-ftpd.init +++ b/pure-ftpd.init @@ -1,6 +1,6 @@ #!/bin/bash # -# Startup script for the pure-ftpd FTP Server $Revision: 1.3 $ +# Startup script for the pure-ftpd FTP Server $Revision: 1.4 $ # # chkconfig: - 85 15 # description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd @@ -30,7 +30,7 @@ pure_launch_script=/usr/sbin/pure-config.pl start() { echo -n $"Starting $prog: " - daemon $pure_launch_script $pure_config --daemonize + daemon "$pure_launch_script $pure_config --daemonize > /dev/null" RETVAL=$? [ $RETVAL = 0 ] && touch /var/lock/subsys/pure-ftpd echo diff --git a/pure-ftpd.pureftpd.te b/pure-ftpd.pureftpd.te new file mode 100644 index 0000000..76b9e70 --- /dev/null +++ b/pure-ftpd.pureftpd.te @@ -0,0 +1,25 @@ +policy_module(pureftpd, 1.0) + +require { + type ftpd_t; +}; + +# Read /var/run/utmp +init_read_utmp(ftpd_t) +init_dontaudit_write_utmp(ftpd_t) + +### Allow connect to mysql +# Network connect +corenet_tcp_connect_mysqld_port(ftpd_t) +# Socket file connect +mysql_stream_connect(ftpd_t); +mysql_rw_db_sockets(ftpd_t) + +### Allow connect to postgresql +# Network connect +corenet_tcp_connect_postgresql_port(ftpd_t) +# Socket file connect +postgresql_stream_connect(ftpd_t) + +# Allow connect to ldap +sysnet_use_ldap(ftpd_t) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 18d2cef..cf2f9e6 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -12,6 +12,8 @@ Source2: pure-ftpd.logrotate Source3: pure-ftpd.xinetd Source4: pure-ftpd.pure-ftpwho.pam Source5: pure-ftpd.pure-ftpwho.consoleapp +Source6: pure-ftpd.README.SELinux +Source7: pure-ftpd.pureftpd.te Patch0: pure-ftpd-1.0.21-config.patch Patch1: pure-ftpd-1.0.20-libdir.patch Provides: ftpserver @@ -21,6 +23,7 @@ BuildRequires: pam-devel, perl, python, libcap-devel %{!?_without_mysql:BuildRequires: mysql-devel} %{!?_without_pgsql:BuildRequires: postgresql-devel} %{!?_without_tls:BuildRequires: openssl-devel} +BuildRequires: selinux-policy Requires(post): chkconfig Requires(preun): chkconfig, initscripts @@ -45,10 +48,28 @@ Rebuild switches: --without tls disable SSL/TLS +%package selinux +Summary: SELinux support for Pure-FTPD +Group: System Environment/Daemons +Requires: %{name} = %{version} +Requires(post): policycoreutils, initscripts, %{name} +Requires(preun): policycoreutils, initscripts, %{name} +Requires(postun): policycoreutils + +%description selinux +This package adds SELinux enforcement to Pure-FTPD. Install it if you want +Pure-FTPd to be protected in the same way other FTP servers are in Fedora +(e.g. VSFTPd and ProFTPd) + + + %prep %setup -q %patch0 -p0 -b .config %patch1 -p0 -b .libdir +cp -p %{SOURCE6} README.SELinux +mkdir selinux +cp -p %{SOURCE7} selinux/pureftpd.te %build @@ -83,6 +104,7 @@ Rebuild switches: make %{?_smp_mflags} + %install rm -rf $RPM_BUILD_ROOT @@ -135,13 +157,22 @@ install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/pure-ftpwho install -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/pure-ftpwho ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/pure-ftpwho +# SELinux support +cd selinux +echo "%{_sbindir}/pure-ftpd system_u:object_r:ftpd_exec_t:s0" > pureftpd.fc +echo '%{_localstatedir}/log/pureftpd.log system_u:object_r:xferlog_t:s0' >> pureftpd.fc +touch pureftpd.if +make -f %{_datadir}/selinux/devel/Makefile +install -p -m 644 -D pureftpd.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/pureftpd.pp + + %clean rm -rf $RPM_BUILD_ROOT %post -if [ "$1" -le "1" ]; then +if [ "$1" -le "1" ]; then # fist install /sbin/chkconfig --add pure-ftpd fi @@ -151,12 +182,35 @@ if [ "$1" -lt "1" ]; then /sbin/chkconfig --del pure-ftpd fi -%postun +%postun if [ "$1" -ge "1" ]; then /sbin/service pure-ftpd condrestart > /dev/null 2>&1 fi +%post selinux +if [ "$1" -le "1" ]; then # Fist install + semodule -i %{_datadir}/selinux/packages/%{name}/pureftpd.pp 2>/dev/null || : + fixfiles -R pure-ftpd restore + /sbin/service pure-ftpd condrestart > /dev/null 2>&1 +fi + +%preun selinux +if [ "$1" -lt "1" ]; then # Final removal + semodule -r pureftpd 2>/dev/null || : + fixfiles -R pure-ftpd restore + /sbin/service pure-ftpd condrestart > /dev/null 2>&1 +fi + +%postun selinux +if [ "$1" -ge "1" ]; then # Upgrade + # Replaces the module if it is already loaded + semodule -i %{_datadir}/selinux/packages/%{name}/pureftpd.pp 2>/dev/null || : + # no need to restart the daemon +fi + + + %files %defattr(-, root, root, -) %doc FAQ THANKS README.Authentication-Modules README.Virtual-Users README @@ -177,7 +231,17 @@ fi %dir /var/ftp/ +%files selinux +%defattr(-, root, root, -) +%doc README.SELinux +%{_datadir}/selinux/packages/%{name}/pureftpd.pp + + %changelog +* Sun May 14 2006 Aurelien Bompard 1.0.21-4 +- add SELinux support +- prevent the init script from displaying the config on startup + * Sun Apr 09 2006 Aurelien Bompard 1.0.21-3 - fix mysql socket location (bug 188426) From 4fdcae94203aafb6f062f8987882e5689e67c193 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sun, 14 May 2006 18:12:48 +0000 Subject: [PATCH 012/122] add missing BuildRequires --- pure-ftpd.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index cf2f9e6..642c694 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -23,7 +23,7 @@ BuildRequires: pam-devel, perl, python, libcap-devel %{!?_without_mysql:BuildRequires: mysql-devel} %{!?_without_pgsql:BuildRequires: postgresql-devel} %{!?_without_tls:BuildRequires: openssl-devel} -BuildRequires: selinux-policy +BuildRequires: selinux-policy, selinux-policy-targeted, checkpolicy Requires(post): chkconfig Requires(preun): chkconfig, initscripts @@ -238,6 +238,9 @@ fi %changelog +* Sun May 14 2006 Aurelien Bompard 1.0.21-5 +- add missing BuildRequires + * Sun May 14 2006 Aurelien Bompard 1.0.21-4 - add SELinux support - prevent the init script from displaying the config on startup From 8d49b1d5c1d001f6472c8c0fb083e68389d884ac Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Fri, 16 Jun 2006 05:25:34 +0000 Subject: [PATCH 013/122] add missing m4 BuildReq --- pure-ftpd.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 642c694..ce8ade1 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -23,7 +23,8 @@ BuildRequires: pam-devel, perl, python, libcap-devel %{!?_without_mysql:BuildRequires: mysql-devel} %{!?_without_pgsql:BuildRequires: postgresql-devel} %{!?_without_tls:BuildRequires: openssl-devel} -BuildRequires: selinux-policy, selinux-policy-targeted, checkpolicy +# SELinux module +BuildRequires: selinux-policy, selinux-policy-targeted, checkpolicy, m4 Requires(post): chkconfig Requires(preun): chkconfig, initscripts @@ -238,6 +239,9 @@ fi %changelog +* Fri Jun 16 2006 Aurelien Bompard 1.0.21-6 +- add missing m4 BuildRequires + * Sun May 14 2006 Aurelien Bompard 1.0.21-5 - add missing BuildRequires From ada33c7215956508296d842edb70e0eb839d3537 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Fri, 4 Aug 2006 19:22:29 +0000 Subject: [PATCH 014/122] fix bug 200844 --- pure-ftpd.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index ce8ade1..0c77372 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -68,7 +68,7 @@ Pure-FTPd to be protected in the same way other FTP servers are in Fedora %setup -q %patch0 -p0 -b .config %patch1 -p0 -b .libdir -cp -p %{SOURCE6} README.SELinux +install -pm 644 %{SOURCE6} README.SELinux mkdir selinux cp -p %{SOURCE7} selinux/pureftpd.te @@ -239,6 +239,10 @@ fi %changelog +* Fri Aug 04 2006 Aurelien Bompard 1.0.21-7 +- install README.SELinux with perms 644 to avoid depending on the + buildsys' umask (bug 200844) + * Fri Jun 16 2006 Aurelien Bompard 1.0.21-6 - add missing m4 BuildRequires From df15c92819f6a133639fc27645b428ddc9b1fd45 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Fri, 4 Aug 2006 20:59:21 +0000 Subject: [PATCH 015/122] BuildRequire selinux-policy-devel for FC6 onwards --- pure-ftpd.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 0c77372..36d7689 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -25,6 +25,9 @@ BuildRequires: pam-devel, perl, python, libcap-devel %{!?_without_tls:BuildRequires: openssl-devel} # SELinux module BuildRequires: selinux-policy, selinux-policy-targeted, checkpolicy, m4 +%if "%{fedora}" >= "6" +BuildRequires: selinux-policy-devel +%endif Requires(post): chkconfig Requires(preun): chkconfig, initscripts @@ -239,6 +242,9 @@ fi %changelog +* Fri Aug 04 2006 Aurelien Bompard 1.0.21-8 +- BuildRequire selinux-policy-devel for FC6 onwards + * Fri Aug 04 2006 Aurelien Bompard 1.0.21-7 - install README.SELinux with perms 644 to avoid depending on the buildsys' umask (bug 200844) From 15317a86ccebc9fdca44066659f127f556624b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 27 Aug 2006 21:00:27 +0000 Subject: [PATCH 016/122] http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild --- needs.rebuild | 1 + 1 file changed, 1 insertion(+) create mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild new file mode 100644 index 0000000..815fd29 --- /dev/null +++ b/needs.rebuild @@ -0,0 +1 @@ +http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From f47988b423648df43f9997dea5027efa1e322453 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Wed, 30 Aug 2006 16:33:57 +0000 Subject: [PATCH 017/122] rebuild --- needs.rebuild | 1 - pure-ftpd.spec | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild deleted file mode 100644 index 815fd29..0000000 --- a/needs.rebuild +++ /dev/null @@ -1 +0,0 @@ -http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 36d7689..845cf6a 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -242,6 +242,9 @@ fi %changelog +* Wed Aug 30 2006 Aurelien Bompard 1.0.21-9 +- rebuild + * Fri Aug 04 2006 Aurelien Bompard 1.0.21-8 - BuildRequire selinux-policy-devel for FC6 onwards From 20b9c9b84f9e79e1f1c1b816de39b76460adc866 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sat, 9 Dec 2006 15:51:20 +0000 Subject: [PATCH 018/122] rebuild --- pure-ftpd.spec | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 845cf6a..0321f16 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 9%{?dist} +Release: 11%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -16,6 +16,7 @@ Source6: pure-ftpd.README.SELinux Source7: pure-ftpd.pureftpd.te Patch0: pure-ftpd-1.0.21-config.patch Patch1: pure-ftpd-1.0.20-libdir.patch +Patch2: pure-ftpd-paminclude.patch Provides: ftpserver BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel, perl, python, libcap-devel @@ -24,9 +25,10 @@ BuildRequires: pam-devel, perl, python, libcap-devel %{!?_without_pgsql:BuildRequires: postgresql-devel} %{!?_without_tls:BuildRequires: openssl-devel} # SELinux module -BuildRequires: selinux-policy, selinux-policy-targeted, checkpolicy, m4 -%if "%{fedora}" >= "6" -BuildRequires: selinux-policy-devel +%if 0%{?fedora} == 5 +BuildRequires: checkpolicy, selinux-policy >= 2.2.40, m4 +%else +BuildRequires: checkpolicy, selinux-policy-devel %endif Requires(post): chkconfig @@ -71,6 +73,7 @@ Pure-FTPd to be protected in the same way other FTP servers are in Fedora %setup -q %patch0 -p0 -b .config %patch1 -p0 -b .libdir +%patch2 -p0 -b .paminclude install -pm 644 %{SOURCE6} README.SELinux mkdir selinux cp -p %{SOURCE7} selinux/pureftpd.te @@ -179,6 +182,14 @@ rm -rf $RPM_BUILD_ROOT if [ "$1" -le "1" ]; then # fist install /sbin/chkconfig --add pure-ftpd fi +%if 0%{!?_without_tls:1} +# TLS Certificate +if [ ! -f %{_sysconfdir}/pki/%{name}/%{name}.pem ]; then + %{_sysconfdir}/pki/tls/certs/make-dummy-cert \ + %{_sysconfdir}/pki/%{name}/%{name}.pem +fi +%endif + %preun if [ "$1" -lt "1" ]; then @@ -242,6 +253,9 @@ fi %changelog +* Sat Dec 09 2006 Aurelien Bompard 1.0.21-11 +- rebuild + * Wed Aug 30 2006 Aurelien Bompard 1.0.21-9 - rebuild From ee8376cd230c4a0f12d023c9b614d68ed054c448 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sat, 9 Dec 2006 15:54:47 +0000 Subject: [PATCH 019/122] forgot to add patch --- pure-ftpd-paminclude.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pure-ftpd-paminclude.patch diff --git a/pure-ftpd-paminclude.patch b/pure-ftpd-paminclude.patch new file mode 100644 index 0000000..0f23096 --- /dev/null +++ b/pure-ftpd-paminclude.patch @@ -0,0 +1,20 @@ +--- ./pam/pure-ftpd.paminclude 2006-10-27 09:28:40.000000000 +0200 ++++ ./pam/pure-ftpd 2006-10-27 09:37:22.000000000 +0200 +@@ -4,13 +4,13 @@ + # Install it in /etc/pam.d/pure-ftpd or add to /etc/pam.conf + + auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed +-auth required pam_stack.so service=system-auth ++auth include system-auth + auth required pam_shells.so + auth required pam_nologin.so + +-account required pam_stack.so service=system-auth ++account include system-auth + +-password required pam_stack.so service=system-auth ++password include system-auth + +-session required pam_stack.so service=system-auth ++session include system-auth + From cc93ae34762bae6259f84cb5e7c61b922350789a Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sat, 9 Dec 2006 15:56:56 +0000 Subject: [PATCH 020/122] rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 0321f16..593e9df 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -256,6 +256,9 @@ fi * Sat Dec 09 2006 Aurelien Bompard 1.0.21-11 - rebuild +* Sat Dec 09 2006 Aurelien Bompard 1.0.21-11 +- rebuild + * Wed Aug 30 2006 Aurelien Bompard 1.0.21-9 - rebuild From d16488e254826df5777e9b978a4f7832a7fb4d5f Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sun, 26 Aug 2007 09:47:12 +0000 Subject: [PATCH 021/122] - rebuild for BuildID --- pure-ftpd.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 593e9df..9d464a5 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -253,7 +253,10 @@ fi %changelog -* Sat Dec 09 2006 Aurelien Bompard 1.0.21-11 +* Sun Aug 26 2007 Aurelien Bompard 1.0.21-13 +- rebuild for BuildID + +* Sat Dec 09 2006 Aurelien Bompard 1.0.21-12 - rebuild * Sat Dec 09 2006 Aurelien Bompard 1.0.21-11 From 041f93ebcbead474c2a536d08c4a3d94043455ea Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 6 Dec 2007 20:19:29 +0000 Subject: [PATCH 022/122] - Rebuild for deps --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 9d464a5..1e065bc 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -253,6 +253,9 @@ fi %changelog +* Thu Dec 06 2007 Release Engineering - 1.0.21-14 +- Rebuild for deps + * Sun Aug 26 2007 Aurelien Bompard 1.0.21-13 - rebuild for BuildID From 837707e4c396d44008616a98a24a25a8174f401d Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 18 Feb 2008 18:26:47 +0000 Subject: [PATCH 023/122] - Autorebuild for GCC 4.3 --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 1e065bc..79a8de9 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -253,6 +253,9 @@ fi %changelog +* Mon Feb 18 2008 Fedora Release Engineering - 1.0.21-15 +- Autorebuild for GCC 4.3 + * Thu Dec 06 2007 Release Engineering - 1.0.21-14 - Rebuild for deps From 1738345e27aeb10e1b4e43ba6d87196900fcdf67 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Thu, 5 Jun 2008 12:36:51 +0000 Subject: [PATCH 024/122] - Rebuild for libcap.so.2 (bug 450086) --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 79a8de9..a1d7a95 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -253,6 +253,9 @@ fi %changelog +* Thu Jun 05 2008 Aurelien Bompard 1.0.21-16 +- Rebuild for libcap.so.2 (bug 450086) + * Mon Feb 18 2008 Fedora Release Engineering - 1.0.21-15 - Autorebuild for GCC 4.3 From 3e79dd38fb4acac8e9dce6858b6900270254bfa8 Mon Sep 17 00:00:00 2001 From: Ignacio Vazquez-Abrams Date: Mon, 1 Dec 2008 15:00:39 +0000 Subject: [PATCH 025/122] Rebuild for Python 2.6 --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index a1d7a95..9f115c2 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -253,6 +253,9 @@ fi %changelog +* Mon Dec 01 2008 Ignacio Vazquez-Abrams - 1.0.21-17 +- Rebuild for Python 2.6 + * Thu Jun 05 2008 Aurelien Bompard 1.0.21-16 - Rebuild for libcap.so.2 (bug 450086) From 448f0ef7e5d075e414b5e6a1df99c9c11e68a07b Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sat, 24 Jan 2009 10:01:28 +0000 Subject: [PATCH 026/122] - Rebuild for mysql --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 9f115c2..b218e1c 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -253,6 +253,9 @@ fi %changelog +* Sat Jan 24 2009 Aurelien Bompard 1.0.21-18 +- Rebuild for mysql + * Mon Dec 01 2008 Ignacio Vazquez-Abrams - 1.0.21-17 - Rebuild for Python 2.6 From b2270de1ab7b75c80e0f53b0592c061c189f1982 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 27 Feb 2009 03:01:27 +0000 Subject: [PATCH 027/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index b218e1c..bd3afab 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -253,6 +253,9 @@ fi %changelog +* Thu Feb 26 2009 Fedora Release Engineering - 1.0.21-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Sat Jan 24 2009 Aurelien Bompard 1.0.21-18 - Rebuild for mysql From 0f2149c0dbee95b30d1135b3e2ca4f2c53d6c703 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Wed, 4 Mar 2009 02:19:01 +0000 Subject: [PATCH 028/122] - make pam and consolehelper's conf files noreplace --- pure-ftpd.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index bd3afab..85b8d28 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.21 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -239,8 +239,8 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/xinetd.d/%{name} -%config %{_sysconfdir}/pam.d/pure-ftpwho -%config %{_sysconfdir}/security/console.apps/pure-ftpwho +%config(noreplace) %{_sysconfdir}/pam.d/pure-ftpwho +%config(noreplace) %{_sysconfdir}/security/console.apps/pure-ftpwho %{!?_without_tls:%{_sysconfdir}/pki/%{name}} %{_mandir}/man8/* %dir /var/ftp/ @@ -253,6 +253,9 @@ fi %changelog +* Wed Mar 04 2009 Aurelien Bompard 1.0.21-20 +- make pam and consolehelper's conf files noreplace + * Thu Feb 26 2009 Fedora Release Engineering - 1.0.21-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From cf0864de6ea22cb6e2511d6c5465d23218e2768f Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Mon, 27 Apr 2009 10:35:45 +0000 Subject: [PATCH 029/122] - version 1.0.22 --- .cvsignore | 2 +- pure-ftpd.spec | 42 +++++++++++++++++++++++------------------- sources | 2 +- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.cvsignore b/.cvsignore index b8006af..a84f40b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pure-ftpd-1.0.21.tar.bz2 +pure-ftpd-1.0.22.tar.bz2 diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 85b8d28..b697d38 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,12 +1,12 @@ Name: pure-ftpd -Version: 1.0.21 -Release: 20%{?dist} +Version: 1.0.22 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons License: BSD URL: http://www.pureftpd.org -Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.21.tar.bz2 +Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.22.tar.bz2 Source1: pure-ftpd.init Source2: pure-ftpd.logrotate Source3: pure-ftpd.xinetd @@ -80,34 +80,34 @@ cp -p %{SOURCE7} selinux/pureftpd.te %build -%configure --with-paranoidmsg \ +%configure \ + --sysconfdir=%{_sysconfdir}/%{name} \ --with-capabilities \ - --with-privsep \ - --with-pam \ - --with-puredb \ --with-sendfile \ + --with-cork \ + --with-paranoidmsg \ --with-altlog \ + --with-puredb \ + %{!?_without_extauth:--with-extauth} \ + --with-pam \ --with-cookie \ - --with-diraliases \ --with-throttling \ --with-ratios \ --with-quotas \ --with-ftpwho \ --with-welcomemsg \ --with-uploadscript \ - --with-peruserlimits \ --with-virtualhosts \ --with-virtualchroot \ - --with-largefile \ - --sysconfdir=%{_sysconfdir}/%{name} \ - --without-bonjour \ - --with-cork \ - --with-rfc2640 \ - %{!?_without_tls:--with-tls --with-certfile=%{_sysconfdir}/pki/%{name}/%{name}.pem} \ + --with-diraliases \ + --with-peruserlimits \ %{!?_without_ldap:--with-ldap} \ %{!?_without_mysql:--with-mysql} \ %{!?_without_pgsql:--with-pgsql} \ - %{!?_without_extauth:--with-extauth} + --with-privsep \ + %{!?_without_tls:--with-tls --with-certfile=%{_sysconfdir}/pki/%{name}/%{name}.pem} \ + --with-rfc2640 \ + --without-bonjour \ make %{?_smp_mflags} @@ -228,9 +228,10 @@ fi %files %defattr(-, root, root, -) -%doc FAQ THANKS README.Authentication-Modules README.Virtual-Users README -%doc README.Contrib README.Configuration-File AUTHORS CONTACT HISTORY NEWS -%doc README.LDAP README.PGSQL README.MySQL README.Netfilter +%doc FAQ THANKS AUTHORS CONTACT HISTORY NEWS +%doc README README.Authentication-Modules README.Configuration-File +%doc README.Contrib README.Donations README.LDAP README.MySQL +%doc README.PGSQL README.TLS README.Virtual-Users %doc contrib/pure-vpopauth.pl pureftpd.schema contrib/pure-stat.pl %{_bindir}/pure-* %{_sbindir}/pure-* @@ -253,6 +254,9 @@ fi %changelog +* Mon Apr 27 2009 Aurelien Bompard 1.0.22-1 +- version 1.0.22 + * Wed Mar 04 2009 Aurelien Bompard 1.0.21-20 - make pam and consolehelper's conf files noreplace diff --git a/sources b/sources index f44164a..2273e50 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ca8a8dbec0cd9c8ea92fc4c37ea9c410 pure-ftpd-1.0.21.tar.bz2 +7f9ceefafaf9eb8fca757d7358f474fa pure-ftpd-1.0.22.tar.bz2 From b9cfaf2a721eb7ce1a157b91c7f8189e7dd236e5 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sun, 26 Jul 2009 19:40:08 +0000 Subject: [PATCH 030/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index b697d38..0c577cc 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.22 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Sun Jul 26 2009 Fedora Release Engineering - 1.0.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Mon Apr 27 2009 Aurelien Bompard 1.0.22-1 - version 1.0.22 From 1be2309b4b8798ee04b5f121f8110817b1a833ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Fri, 21 Aug 2009 15:32:02 +0000 Subject: [PATCH 031/122] - rebuilt with new openssl --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 0c577cc..8e88d62 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.22 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Fri Aug 21 2009 Tomas Mraz - 1.0.22-3 +- rebuilt with new openssl + * Sun Jul 26 2009 Fedora Release Engineering - 1.0.22-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From a78f46b25f116531b774d9f36b348a6ca567c2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Wed, 16 Sep 2009 18:14:17 +0000 Subject: [PATCH 032/122] - use password-auth common PAM configuration instead of system-auth --- pure-ftpd-paminclude.patch | 11 ++++++----- pure-ftpd.spec | 5 ++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pure-ftpd-paminclude.patch b/pure-ftpd-paminclude.patch index 0f23096..e8ace75 100644 --- a/pure-ftpd-paminclude.patch +++ b/pure-ftpd-paminclude.patch @@ -1,20 +1,21 @@ --- ./pam/pure-ftpd.paminclude 2006-10-27 09:28:40.000000000 +0200 +++ ./pam/pure-ftpd 2006-10-27 09:37:22.000000000 +0200 -@@ -4,13 +4,13 @@ +@@ -4,13 +4,14 @@ # Install it in /etc/pam.d/pure-ftpd or add to /etc/pam.conf auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed -auth required pam_stack.so service=system-auth -+auth include system-auth ++auth include password-auth auth required pam_shells.so auth required pam_nologin.so -account required pam_stack.so service=system-auth -+account include system-auth ++account include password-auth -password required pam_stack.so service=system-auth -+password include system-auth ++password include password-auth -session required pam_stack.so service=system-auth -+session include system-auth ++session required pam_loginuid.so ++session include password-auth diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 8e88d62..bd8caa2 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.22 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Wed Sep 16 2009 Tomas Mraz - 1.0.22-4 +- use password-auth common PAM configuration instead of system-auth + * Fri Aug 21 2009 Tomas Mraz - 1.0.22-3 - rebuilt with new openssl From da89bb4d9c4a454cc2fd33f16ff6c27c3eca20fe Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:31:48 +0000 Subject: [PATCH 033/122] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8f501ce..bb5c174 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: pure-ftpd -# $Id$ +# $Id: Makefile,v 1.1 2005/03/13 21:44:16 abompard Exp $ NAME := pure-ftpd SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From dbc7ba4cb8da3f37999e5710c4a2e6ec5b88658e Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Sat, 5 Dec 2009 06:29:48 +0000 Subject: [PATCH 034/122] - version 1.0.27 --- .cvsignore | 2 +- ...fig.patch => pure-ftpd-1.0.27-config.patch | 61 +++++++++++++------ pure-ftpd.spec | 15 +++-- sources | 2 +- 4 files changed, 54 insertions(+), 26 deletions(-) rename pure-ftpd-1.0.21-config.patch => pure-ftpd-1.0.27-config.patch (56%) diff --git a/.cvsignore b/.cvsignore index a84f40b..b2f43f7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pure-ftpd-1.0.22.tar.bz2 +pure-ftpd-1.0.27.tar.bz2 diff --git a/pure-ftpd-1.0.21-config.patch b/pure-ftpd-1.0.27-config.patch similarity index 56% rename from pure-ftpd-1.0.21-config.patch rename to pure-ftpd-1.0.27-config.patch index d98ba8b..a67d164 100644 --- a/pure-ftpd-1.0.21-config.patch +++ b/pure-ftpd-1.0.27-config.patch @@ -1,5 +1,6 @@ ---- ./configuration-file/pure-ftpd.conf.in.config 2006-02-15 14:15:47.000000000 +0100 -+++ ./configuration-file/pure-ftpd.conf.in 2006-04-09 17:31:03.000000000 +0200 +diff -up ./configuration-file/pure-ftpd.conf.in.config ./configuration-file/pure-ftpd.conf.in +--- ./configuration-file/pure-ftpd.conf.in.config 2009-11-20 14:15:01.000000000 +0100 ++++ ./configuration-file/pure-ftpd.conf.in 2009-12-04 22:09:21.461504212 +0100 @@ -9,7 +9,7 @@ # instead of command-line options, please run the # following command : @@ -9,7 +10,7 @@ # # Please don't forget to have a look at documentation at # http://www.pureftpd.org/documentation.shtml for a complete list of -@@ -107,23 +107,23 @@ +@@ -107,34 +107,34 @@ MaxIdleTime 15 # LDAP configuration file (see README.LDAP) @@ -37,7 +38,11 @@ # Path to pure-authd socket (see README.Authentication-Modules) -@@ -134,7 +134,7 @@ + +-# ExtAuth /var/run/ftpd.sock ++# ExtAuth @localstatedir@/run/ftpd.sock + + # If you want to enable PAM authentication, uncomment the following line @@ -46,16 +51,7 @@ -@@ -158,7 +158,7 @@ - # 'ls' recursion limits. The first argument is the maximum number of - # files to be displayed. The second one is the max subdirectories depth - --LimitRecursion 2000 8 -+LimitRecursion 7500 8 - - - -@@ -237,7 +237,14 @@ +@@ -237,7 +237,14 @@ Umask 133:022 # Minimum UID for an authenticated user to log in. @@ -71,7 +67,7 @@ -@@ -276,7 +283,7 @@ +@@ -276,7 +283,7 @@ AutoRename no # Disallow anonymous users to upload new files (no = upload is allowed) @@ -80,7 +76,7 @@ -@@ -301,7 +308,7 @@ +@@ -301,21 +308,21 @@ AnonymousCantUpload no # fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338 # This log file can then be processed by www traffic analyzers. @@ -89,8 +85,37 @@ ---- ./pureftpd-mysql.conf.config 2006-04-09 17:33:04.000000000 +0200 -+++ ./pureftpd-mysql.conf 2006-04-09 17:33:27.000000000 +0200 + # Create an additional log file with transfers logged in a format optimized + # for statistic reports. + +-# AltLog stats:/var/log/pureftpd.log ++# AltLog stats:@localstatedir@/log/pureftpd.log + + + + # Create an additional log file with transfers logged in the standard W3C + # format (compatible with most commercial log analyzers) + +-# AltLog w3c:/var/log/pureftpd.log ++# AltLog w3c:@localstatedir@/log/pureftpd.log + + + +@@ -346,9 +353,9 @@ AnonymousCantUpload no + + + # If your pure-ftpd has been compiled with standalone support, you can change +-# the location of the pid file. The default is /var/run/pure-ftpd.pid ++# the location of the pid file. The default is @localstatedir@/run/pure-ftpd.pid + +-#PIDFile /var/run/pure-ftpd.pid ++#PIDFile @localstatedir@/run/pure-ftpd.pid + + + +diff -up ./pureftpd-mysql.conf.config ./pureftpd-mysql.conf +--- ./pureftpd-mysql.conf.config 2009-10-20 12:17:56.000000000 +0200 ++++ ./pureftpd-mysql.conf 2009-12-04 22:05:35.350755132 +0100 @@ -19,7 +19,7 @@ # Optional : define the location of mysql.sock if the server runs on this host. diff --git a/pure-ftpd.spec b/pure-ftpd.spec index bd8caa2..c6355da 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,12 +1,12 @@ Name: pure-ftpd -Version: 1.0.22 -Release: 4%{?dist} +Version: 1.0.27 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons License: BSD URL: http://www.pureftpd.org -Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.22.tar.bz2 +Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-%{version}.tar.bz2 Source1: pure-ftpd.init Source2: pure-ftpd.logrotate Source3: pure-ftpd.xinetd @@ -14,8 +14,8 @@ Source4: pure-ftpd.pure-ftpwho.pam Source5: pure-ftpd.pure-ftpwho.consoleapp Source6: pure-ftpd.README.SELinux Source7: pure-ftpd.pureftpd.te -Patch0: pure-ftpd-1.0.21-config.patch -Patch1: pure-ftpd-1.0.20-libdir.patch +Patch0: pure-ftpd-1.0.27-config.patch +#Patch1: pure-ftpd-1.0.20-libdir.patch Patch2: pure-ftpd-paminclude.patch Provides: ftpserver BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -72,7 +72,7 @@ Pure-FTPd to be protected in the same way other FTP servers are in Fedora %prep %setup -q %patch0 -p0 -b .config -%patch1 -p0 -b .libdir +#%%patch1 -p0 -b .libdir %patch2 -p0 -b .paminclude install -pm 644 %{SOURCE6} README.SELinux mkdir selinux @@ -254,6 +254,9 @@ fi %changelog +* Fri Dec 04 2009 Aurelien Bompard - 1.0.27-1 +- version 1.0.27 + * Wed Sep 16 2009 Tomas Mraz - 1.0.22-4 - use password-auth common PAM configuration instead of system-auth diff --git a/sources b/sources index 2273e50..f63f0e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7f9ceefafaf9eb8fca757d7358f474fa pure-ftpd-1.0.22.tar.bz2 +7d18544384aa1649d483ba86518ed34e pure-ftpd-1.0.27.tar.bz2 From 6dc7386b0ae0e78e273af1797d473d0907cb3c64 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Tue, 16 Mar 2010 07:05:27 +0000 Subject: [PATCH 035/122] - version 0.1.29 --- .cvsignore | 2 +- pure-ftpd.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index b2f43f7..2a3acab 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pure-ftpd-1.0.27.tar.bz2 +pure-ftpd-1.0.29.tar.bz2 diff --git a/pure-ftpd.spec b/pure-ftpd.spec index c6355da..25383f9 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,5 +1,5 @@ Name: pure-ftpd -Version: 1.0.27 +Version: 1.0.29 Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server @@ -254,6 +254,9 @@ fi %changelog +* Tue Mar 16 2010 Aurelien Bompard - 1.0.29-1 +- version 0.1.29 + * Fri Dec 04 2009 Aurelien Bompard - 1.0.27-1 - version 1.0.27 diff --git a/sources b/sources index f63f0e7..468f7da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7d18544384aa1649d483ba86518ed34e pure-ftpd-1.0.27.tar.bz2 +12a074824b509f9e7684fab333ed6915 pure-ftpd-1.0.29.tar.bz2 From 708bc9da32e415e835c1e20e01d50a3ccf500221 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Wed, 28 Apr 2010 06:15:15 +0000 Subject: [PATCH 036/122] - fix bug #586513 --- pure-ftpd.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 25383f9..643ce04 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.29 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -206,15 +206,15 @@ fi %post selinux if [ "$1" -le "1" ]; then # Fist install semodule -i %{_datadir}/selinux/packages/%{name}/pureftpd.pp 2>/dev/null || : - fixfiles -R pure-ftpd restore - /sbin/service pure-ftpd condrestart > /dev/null 2>&1 + fixfiles -R pure-ftpd restore || : + /sbin/service pure-ftpd condrestart > /dev/null 2>&1 || : fi %preun selinux if [ "$1" -lt "1" ]; then # Final removal semodule -r pureftpd 2>/dev/null || : - fixfiles -R pure-ftpd restore - /sbin/service pure-ftpd condrestart > /dev/null 2>&1 + fixfiles -R pure-ftpd restore || : + /sbin/service pure-ftpd condrestart > /dev/null 2>&1 || : fi %postun selinux @@ -254,6 +254,9 @@ fi %changelog +* Wed Apr 28 2010 Aurelien Bompard - 1.0.29-2 +- fix bug #586513 + * Tue Mar 16 2010 Aurelien Bompard - 1.0.29-1 - version 0.1.29 From 3d29debd363835b0d6a9f9a4b76f0d56851a5118 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 09:54:36 +0000 Subject: [PATCH 037/122] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index bb5c174..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: pure-ftpd -# $Id: Makefile,v 1.1 2005/03/13 21:44:16 abompard Exp $ -NAME := pure-ftpd -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From f37dfcf52d58c53e94b537aca227a1aeba2df027 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 9 Feb 2011 11:20:55 -0600 Subject: [PATCH 038/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 643ce04..5538f3a 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.29 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Wed Feb 09 2011 Fedora Release Engineering - 1.0.29-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Wed Apr 28 2010 Aurelien Bompard - 1.0.29-2 - fix bug #586513 From 9c2b9b5ccf686126a854c8174aff855091c1d327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 23 Mar 2011 19:44:54 +0100 Subject: [PATCH 039/122] rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 5538f3a..f32361e 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.29 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Wed Mar 23 2011 Dan Horák - 1.0.29-4 +- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) + * Wed Feb 09 2011 Fedora Release Engineering - 1.0.29-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 5193142bb36fccb364c2af35d0cf77cbac12bd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 23 Mar 2011 19:45:16 +0100 Subject: [PATCH 040/122] rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 5538f3a..f32361e 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.29 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Wed Mar 23 2011 Dan Horák - 1.0.29-4 +- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) + * Wed Feb 09 2011 Fedora Release Engineering - 1.0.29-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From fe103918633dc8ce0e8f829738113f3b9bde9e9b Mon Sep 17 00:00:00 2001 From: Michal Ingeli Date: Sun, 27 Mar 2011 00:54:10 +0100 Subject: [PATCH 041/122] bug fix for mysql passwords #690346 --- pure-ftpd-mysql-password.patch | 17 +++++++++++++++++ pure-ftpd.spec | 14 ++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 pure-ftpd-mysql-password.patch diff --git a/pure-ftpd-mysql-password.patch b/pure-ftpd-mysql-password.patch new file mode 100644 index 0000000..a3468fa --- /dev/null +++ b/pure-ftpd-mysql-password.patch @@ -0,0 +1,17 @@ +Use my_make_scrambled_password() rather than the deprecated equivalent +make_scrambled_password(). As of Fedora 15 the latter is not exported +by libmysqlclient.so. + + +--- pure-ftpd-1.0.30.orig/src/log_mysql.c 2011-03-26 19:14:20.492368416 +0100 ++++ pure-ftpd-1.0.30/src/log_mysql.c 2011-03-26 19:16:51.110255978 +0100 +@@ -451,7 +451,8 @@ + # if MYSQL_VERSION_ID >= 40100 && MYSQL_VERSION_ID < 40101 + make_scrambled_password(scrambled_password, password, 1, NULL); + # else +- make_scrambled_password(scrambled_password, password); ++ my_make_scrambled_password(scrambled_password, password, ++ strlen(password)); + # endif + #endif + if (strcmp(scrambled_password, spwd) == 0) { diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 5538f3a..7a03abe 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.29 -Release: 3%{?dist} +Version: 1.0.30 +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -17,6 +17,7 @@ Source7: pure-ftpd.pureftpd.te Patch0: pure-ftpd-1.0.27-config.patch #Patch1: pure-ftpd-1.0.20-libdir.patch Patch2: pure-ftpd-paminclude.patch +Patch3: pure-ftpd-mysql-password.patch Provides: ftpserver BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel, perl, python, libcap-devel @@ -74,6 +75,7 @@ Pure-FTPd to be protected in the same way other FTP servers are in Fedora %patch0 -p0 -b .config #%%patch1 -p0 -b .libdir %patch2 -p0 -b .paminclude +%patch3 -p1 -b .mysql-password install -pm 644 %{SOURCE6} README.SELinux mkdir selinux cp -p %{SOURCE7} selinux/pureftpd.te @@ -254,8 +256,12 @@ fi %changelog -* Wed Feb 09 2011 Fedora Release Engineering - 1.0.29-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild +* Sat Mar 26 2011 Michal Ingeli - 1.0.30-2 +- bug fix for mysql passwords #690346 + +* Mon Mar 14 2011 Michal Ingeli - 1.0.30-1 +- version 1.0.30 +- security bug fix #683221 by upstream * Wed Apr 28 2010 Aurelien Bompard - 1.0.29-2 - fix bug #586513 From bee409f49e67ec9b16191c610d1f88e154ba3fed Mon Sep 17 00:00:00 2001 From: Michal Ingeli Date: Sun, 27 Mar 2011 01:11:26 +0100 Subject: [PATCH 042/122] bug fix for mysql passwords #690346 --- pure-ftpd-mysql-password.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pure-ftpd-mysql-password.patch diff --git a/pure-ftpd-mysql-password.patch b/pure-ftpd-mysql-password.patch new file mode 100644 index 0000000..a3468fa --- /dev/null +++ b/pure-ftpd-mysql-password.patch @@ -0,0 +1,17 @@ +Use my_make_scrambled_password() rather than the deprecated equivalent +make_scrambled_password(). As of Fedora 15 the latter is not exported +by libmysqlclient.so. + + +--- pure-ftpd-1.0.30.orig/src/log_mysql.c 2011-03-26 19:14:20.492368416 +0100 ++++ pure-ftpd-1.0.30/src/log_mysql.c 2011-03-26 19:16:51.110255978 +0100 +@@ -451,7 +451,8 @@ + # if MYSQL_VERSION_ID >= 40100 && MYSQL_VERSION_ID < 40101 + make_scrambled_password(scrambled_password, password, 1, NULL); + # else +- make_scrambled_password(scrambled_password, password); ++ my_make_scrambled_password(scrambled_password, password, ++ strlen(password)); + # endif + #endif + if (strcmp(scrambled_password, spwd) == 0) { From d162cf2e535cfad751c2e0bec93e40c809703fa5 Mon Sep 17 00:00:00 2001 From: Michal Ingeli Date: Sun, 27 Mar 2011 01:37:18 +0100 Subject: [PATCH 043/122] bug fix for mysql passwords #690346 --- pure-ftpd.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index f32361e..9d76659 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -254,6 +254,11 @@ fi %changelog +* Sat Mar 26 2011 Michal Ingeli - 1.0.30-2 +- bug fix for mysql passwords #690346 +- version 1.0.30 +- security bug fix #683221 by upstream + * Wed Mar 23 2011 Dan Horák - 1.0.29-4 - rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) From 7d1379a901151a93d32354fbd89bb4dd849d99fd Mon Sep 17 00:00:00 2001 From: Michal Ingeli Date: Sun, 27 Mar 2011 01:38:29 +0100 Subject: [PATCH 044/122] bug fix for mysql passwords #690346 --- pure-ftpd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 9d76659..06e86e7 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.29 -Release: 4%{?dist} +Version: 1.0.30 +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons From b85292858a24a18aef6d142b4467e3eaede70255 Mon Sep 17 00:00:00 2001 From: Michal Ingeli Date: Sun, 27 Mar 2011 19:19:09 +0200 Subject: [PATCH 045/122] new source for 1.0.30 --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2a3acab..c57b6ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ pure-ftpd-1.0.29.tar.bz2 +/pure-ftpd-1.0.30.tar.bz2 diff --git a/sources b/sources index 468f7da..2e1a01b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -12a074824b509f9e7684fab333ed6915 pure-ftpd-1.0.29.tar.bz2 +865a9020dbe48d30913c796ac3ec1f32 pure-ftpd-1.0.30.tar.bz2 From b5c977e435b57fa7ce9970168fa797dd79b5bad1 Mon Sep 17 00:00:00 2001 From: Michal Ingeli Date: Mon, 28 Mar 2011 10:18:03 +0200 Subject: [PATCH 046/122] new sources for 1.0.30 --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2a3acab..c57b6ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ pure-ftpd-1.0.29.tar.bz2 +/pure-ftpd-1.0.30.tar.bz2 diff --git a/sources b/sources index 468f7da..2e1a01b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -12a074824b509f9e7684fab333ed6915 pure-ftpd-1.0.29.tar.bz2 +865a9020dbe48d30913c796ac3ec1f32 pure-ftpd-1.0.30.tar.bz2 From d6626dd17e23aa4605c8dae631d167eea655227a Mon Sep 17 00:00:00 2001 From: Michal Ingeli Date: Mon, 28 Mar 2011 10:32:23 +0200 Subject: [PATCH 047/122] adding the forgotten patch --- pure-ftpd.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 06e86e7..4b6854b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -17,6 +17,7 @@ Source7: pure-ftpd.pureftpd.te Patch0: pure-ftpd-1.0.27-config.patch #Patch1: pure-ftpd-1.0.20-libdir.patch Patch2: pure-ftpd-paminclude.patch +Patch3: pure-ftpd-mysql-password.patch Provides: ftpserver BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel, perl, python, libcap-devel @@ -74,6 +75,7 @@ Pure-FTPd to be protected in the same way other FTP servers are in Fedora %patch0 -p0 -b .config #%%patch1 -p0 -b .libdir %patch2 -p0 -b .paminclude +%patch2 -p1 -b .mysql-password install -pm 644 %{SOURCE6} README.SELinux mkdir selinux cp -p %{SOURCE7} selinux/pureftpd.te From c9abb35ebd30b8e6e0c56ca4fd1460ed34471c45 Mon Sep 17 00:00:00 2001 From: Michal Ingeli Date: Mon, 28 Mar 2011 12:54:36 +0200 Subject: [PATCH 048/122] typo in %patch statement --- pure-ftpd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 4b6854b..8d291dc 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -75,7 +75,7 @@ Pure-FTPd to be protected in the same way other FTP servers are in Fedora %patch0 -p0 -b .config #%%patch1 -p0 -b .libdir %patch2 -p0 -b .paminclude -%patch2 -p1 -b .mysql-password +%patch3 -p1 -b .mysql-password install -pm 644 %{SOURCE6} README.SELinux mkdir selinux cp -p %{SOURCE7} selinux/pureftpd.te From 5cd264676e52ef01a42f78ed1803292093e81ee3 Mon Sep 17 00:00:00 2001 From: Michal Ingeli Date: Thu, 19 May 2011 12:30:35 +0200 Subject: [PATCH 049/122] version 1.0.32 security bug fix #704283 by upstream (CVE-2011-0418) --- .gitignore | 1 + pure-ftpd.spec | 12 ++++++++---- sources | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c57b6ab..43b4ca3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.30.tar.bz2 +/pure-ftpd-1.0.32.tar.bz2 diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 8d291dc..1816f0f 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.30 -Release: 2%{?dist} +Version: 1.0.32 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -17,7 +17,7 @@ Source7: pure-ftpd.pureftpd.te Patch0: pure-ftpd-1.0.27-config.patch #Patch1: pure-ftpd-1.0.20-libdir.patch Patch2: pure-ftpd-paminclude.patch -Patch3: pure-ftpd-mysql-password.patch +#Patch3: pure-ftpd-mysql-password.patch Provides: ftpserver BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel, perl, python, libcap-devel @@ -75,7 +75,7 @@ Pure-FTPd to be protected in the same way other FTP servers are in Fedora %patch0 -p0 -b .config #%%patch1 -p0 -b .libdir %patch2 -p0 -b .paminclude -%patch3 -p1 -b .mysql-password +#%%patch3 -p1 -b .mysql-password install -pm 644 %{SOURCE6} README.SELinux mkdir selinux cp -p %{SOURCE7} selinux/pureftpd.te @@ -256,6 +256,10 @@ fi %changelog +* Thu May 19 2011 Michal Ingeli - 1.0.32-1 +- version 1.0.32 +- security bug fix #704283 by upstream (CVE-2011-0418) + * Sat Mar 26 2011 Michal Ingeli - 1.0.30-2 - bug fix for mysql passwords #690346 - version 1.0.30 diff --git a/sources b/sources index 2e1a01b..655e9fb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -865a9020dbe48d30913c796ac3ec1f32 pure-ftpd-1.0.30.tar.bz2 +065211a4319e2089bd16b44c003eb0f8 pure-ftpd-1.0.32.tar.bz2 From 7b09f082bb6d715a96e1201305eade987c61632d Mon Sep 17 00:00:00 2001 From: "Tom \"spot\" Callaway" Date: Mon, 12 Sep 2011 15:51:27 -0400 Subject: [PATCH 050/122] convert to systemd --- pure-ftpd.service | 12 ++++++++++ pure-ftpd.spec | 60 +++++++++++++++++++++++++++-------------------- 2 files changed, 46 insertions(+), 26 deletions(-) create mode 100644 pure-ftpd.service diff --git a/pure-ftpd.service b/pure-ftpd.service new file mode 100644 index 0000000..e0b3dba --- /dev/null +++ b/pure-ftpd.service @@ -0,0 +1,12 @@ +[Unit] +Description=Pure-FTPd FTP server +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/var/run/pure-ftpd.pid +ExecStart=/usr/sbin/pure-config.pl /etc/pure-ftpd/pure-ftpd.conf --daemonize + +[Install] +WantedBy=multi-user.target + diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 1816f0f..45715e4 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,13 +1,13 @@ Name: pure-ftpd Version: 1.0.32 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons License: BSD URL: http://www.pureftpd.org Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-%{version}.tar.bz2 -Source1: pure-ftpd.init +Source1: pure-ftpd.service Source2: pure-ftpd.logrotate Source3: pure-ftpd.xinetd Source4: pure-ftpd.pure-ftpwho.pam @@ -19,7 +19,6 @@ Patch0: pure-ftpd-1.0.27-config.patch Patch2: pure-ftpd-paminclude.patch #Patch3: pure-ftpd-mysql-password.patch Provides: ftpserver -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel, perl, python, libcap-devel %{!?_without_ldap:BuildRequires: openldap-devel} %{!?_without_mysql:BuildRequires: mysql-devel} @@ -31,10 +30,11 @@ BuildRequires: checkpolicy, selinux-policy >= 2.2.40, m4 %else BuildRequires: checkpolicy, selinux-policy-devel %endif - -Requires(post): chkconfig -Requires(preun): chkconfig, initscripts -Requires(postun): initscripts +BuildRequires: systemd-units +Requires(post): systemd-sysv +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units Requires: logrotate, usermode @@ -115,13 +115,11 @@ make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT - make install DESTDIR=$RPM_BUILD_ROOT install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man8 install -d -m 755 $RPM_BUILD_ROOT%{_sbindir} -install -d -m 755 $RPM_BUILD_ROOT%{_initrddir} +install -d -m 755 $RPM_BUILD_ROOT%{_unitdir} install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/ftp %{!?_without_tls:install -d -m 700 $RPM_BUILD_ROOT%{_sysconfdir}/pki/%{name}} @@ -146,7 +144,7 @@ install -p -m 644 man/pure-quotacheck.8 $RPM_BUILD_ROOT%{_mandir}/man8 install -p -m 644 man/pure-authd.8 $RPM_BUILD_ROOT%{_mandir}/man8 # Init script -install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name} +install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service # Pam install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d @@ -176,13 +174,10 @@ install -p -m 644 -D pureftpd.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{n -%clean -rm -rf $RPM_BUILD_ROOT - - %post -if [ "$1" -le "1" ]; then # fist install - /sbin/chkconfig --add pure-ftpd +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi %if 0%{!?_without_tls:1} # TLS Certificate @@ -192,16 +187,18 @@ if [ ! -f %{_sysconfdir}/pki/%{name}/%{name}.pem ]; then fi %endif - %preun -if [ "$1" -lt "1" ]; then - /sbin/service pure-ftpd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del pure-ftpd +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable pure-ftpd.service > /dev/null 2>&1 || : + /bin/systemctl stop pure-ftpd.service > /dev/null 2>&1 || : fi %postun -if [ "$1" -ge "1" ]; then - /sbin/service pure-ftpd condrestart > /dev/null 2>&1 +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart pure-ftpd.service >/dev/null 2>&1 || : fi @@ -227,9 +224,18 @@ if [ "$1" -ge "1" ]; then # Upgrade fi +%triggerun -- pure-ftpd < 1.0.32-2 +# Save the current service runlevel info +# User must manually run systemd-sysv-convert --apply pure-ftpd +# to migrate them to systemd targets +/usr/bin/systemd-sysv-convert --save pure-ftpd >/dev/null 2>&1 ||: + +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del pure-ftpd >/dev/null 2>&1 || : +/bin/systemctl try-restart pure-ftpd.service >/dev/null 2>&1 || : + %files -%defattr(-, root, root, -) %doc FAQ THANKS AUTHORS CONTACT HISTORY NEWS %doc README README.Authentication-Modules README.Configuration-File %doc README.Contrib README.Donations README.LDAP README.MySQL @@ -237,7 +243,7 @@ fi %doc contrib/pure-vpopauth.pl pureftpd.schema contrib/pure-stat.pl %{_bindir}/pure-* %{_sbindir}/pure-* -%config %{_initrddir}/%{name} +%{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} @@ -250,12 +256,14 @@ fi %files selinux -%defattr(-, root, root, -) %doc README.SELinux %{_datadir}/selinux/packages/%{name}/pureftpd.pp %changelog +* Mon Sep 12 2011 Tom Callaway - 1.0.32-2 +- convert to systemd + * Thu May 19 2011 Michal Ingeli - 1.0.32-1 - version 1.0.32 - security bug fix #704283 by upstream (CVE-2011-0418) From ab2bf6c9d682d489fee168d0d7f8c55e689353c5 Mon Sep 17 00:00:00 2001 From: "Tom \"spot\" Callaway" Date: Mon, 12 Sep 2011 15:51:57 -0400 Subject: [PATCH 051/122] convert to systemd --- pure-ftpd.service | 12 ++++++++++ pure-ftpd.spec | 60 +++++++++++++++++++++++++++-------------------- 2 files changed, 46 insertions(+), 26 deletions(-) create mode 100644 pure-ftpd.service diff --git a/pure-ftpd.service b/pure-ftpd.service new file mode 100644 index 0000000..e0b3dba --- /dev/null +++ b/pure-ftpd.service @@ -0,0 +1,12 @@ +[Unit] +Description=Pure-FTPd FTP server +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/var/run/pure-ftpd.pid +ExecStart=/usr/sbin/pure-config.pl /etc/pure-ftpd/pure-ftpd.conf --daemonize + +[Install] +WantedBy=multi-user.target + diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 1816f0f..45715e4 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,13 +1,13 @@ Name: pure-ftpd Version: 1.0.32 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons License: BSD URL: http://www.pureftpd.org Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-%{version}.tar.bz2 -Source1: pure-ftpd.init +Source1: pure-ftpd.service Source2: pure-ftpd.logrotate Source3: pure-ftpd.xinetd Source4: pure-ftpd.pure-ftpwho.pam @@ -19,7 +19,6 @@ Patch0: pure-ftpd-1.0.27-config.patch Patch2: pure-ftpd-paminclude.patch #Patch3: pure-ftpd-mysql-password.patch Provides: ftpserver -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel, perl, python, libcap-devel %{!?_without_ldap:BuildRequires: openldap-devel} %{!?_without_mysql:BuildRequires: mysql-devel} @@ -31,10 +30,11 @@ BuildRequires: checkpolicy, selinux-policy >= 2.2.40, m4 %else BuildRequires: checkpolicy, selinux-policy-devel %endif - -Requires(post): chkconfig -Requires(preun): chkconfig, initscripts -Requires(postun): initscripts +BuildRequires: systemd-units +Requires(post): systemd-sysv +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units Requires: logrotate, usermode @@ -115,13 +115,11 @@ make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT - make install DESTDIR=$RPM_BUILD_ROOT install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man8 install -d -m 755 $RPM_BUILD_ROOT%{_sbindir} -install -d -m 755 $RPM_BUILD_ROOT%{_initrddir} +install -d -m 755 $RPM_BUILD_ROOT%{_unitdir} install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/ftp %{!?_without_tls:install -d -m 700 $RPM_BUILD_ROOT%{_sysconfdir}/pki/%{name}} @@ -146,7 +144,7 @@ install -p -m 644 man/pure-quotacheck.8 $RPM_BUILD_ROOT%{_mandir}/man8 install -p -m 644 man/pure-authd.8 $RPM_BUILD_ROOT%{_mandir}/man8 # Init script -install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name} +install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service # Pam install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d @@ -176,13 +174,10 @@ install -p -m 644 -D pureftpd.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{n -%clean -rm -rf $RPM_BUILD_ROOT - - %post -if [ "$1" -le "1" ]; then # fist install - /sbin/chkconfig --add pure-ftpd +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi %if 0%{!?_without_tls:1} # TLS Certificate @@ -192,16 +187,18 @@ if [ ! -f %{_sysconfdir}/pki/%{name}/%{name}.pem ]; then fi %endif - %preun -if [ "$1" -lt "1" ]; then - /sbin/service pure-ftpd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del pure-ftpd +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable pure-ftpd.service > /dev/null 2>&1 || : + /bin/systemctl stop pure-ftpd.service > /dev/null 2>&1 || : fi %postun -if [ "$1" -ge "1" ]; then - /sbin/service pure-ftpd condrestart > /dev/null 2>&1 +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart pure-ftpd.service >/dev/null 2>&1 || : fi @@ -227,9 +224,18 @@ if [ "$1" -ge "1" ]; then # Upgrade fi +%triggerun -- pure-ftpd < 1.0.32-2 +# Save the current service runlevel info +# User must manually run systemd-sysv-convert --apply pure-ftpd +# to migrate them to systemd targets +/usr/bin/systemd-sysv-convert --save pure-ftpd >/dev/null 2>&1 ||: + +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del pure-ftpd >/dev/null 2>&1 || : +/bin/systemctl try-restart pure-ftpd.service >/dev/null 2>&1 || : + %files -%defattr(-, root, root, -) %doc FAQ THANKS AUTHORS CONTACT HISTORY NEWS %doc README README.Authentication-Modules README.Configuration-File %doc README.Contrib README.Donations README.LDAP README.MySQL @@ -237,7 +243,7 @@ fi %doc contrib/pure-vpopauth.pl pureftpd.schema contrib/pure-stat.pl %{_bindir}/pure-* %{_sbindir}/pure-* -%config %{_initrddir}/%{name} +%{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} @@ -250,12 +256,14 @@ fi %files selinux -%defattr(-, root, root, -) %doc README.SELinux %{_datadir}/selinux/packages/%{name}/pureftpd.pp %changelog +* Mon Sep 12 2011 Tom Callaway - 1.0.32-2 +- convert to systemd + * Thu May 19 2011 Michal Ingeli - 1.0.32-1 - version 1.0.32 - security bug fix #704283 by upstream (CVE-2011-0418) From fdbb005e750b0423fc097b4258b618e2478edc69 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Fri, 13 Jan 2012 16:54:20 +0100 Subject: [PATCH 052/122] Update to 1.0.35 --- .gitignore | 1 + pure-ftpd.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 43b4ca3..0666a4c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.30.tar.bz2 /pure-ftpd-1.0.32.tar.bz2 +/pure-ftpd-1.0.35.tar.bz2 diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 45715e4..38a1733 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.32 -Release: 2%{?dist} +Version: 1.0.35 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -261,6 +261,9 @@ fi %changelog +* Fri Jan 13 2012 Jaromir Capik - 1.0.35-1 +- Update to 1.0.35 + * Mon Sep 12 2011 Tom Callaway - 1.0.32-2 - convert to systemd diff --git a/sources b/sources index 655e9fb..cdfa583 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -065211a4319e2089bd16b44c003eb0f8 pure-ftpd-1.0.32.tar.bz2 +500988c4fa8decff294b56f164be955e pure-ftpd-1.0.35.tar.bz2 From 67a98c6cc1b972a8670d66436d478c6e43d1e35d Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Tue, 13 Mar 2012 16:57:23 +0100 Subject: [PATCH 053/122] Changing MinUID from 500 to 1000 --- pure-ftpd-1.0.35-config.patch | 127 ++++++++++++++++++++++++++++++++++ pure-ftpd.spec | 10 ++- 2 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 pure-ftpd-1.0.35-config.patch diff --git a/pure-ftpd-1.0.35-config.patch b/pure-ftpd-1.0.35-config.patch new file mode 100644 index 0000000..76863d4 --- /dev/null +++ b/pure-ftpd-1.0.35-config.patch @@ -0,0 +1,127 @@ +diff -up ./configuration-file/pure-ftpd.conf.in.config ./configuration-file/pure-ftpd.conf.in +--- ./configuration-file/pure-ftpd.conf.in.config 2009-11-20 14:15:01.000000000 +0100 ++++ ./configuration-file/pure-ftpd.conf.in 2009-12-04 22:09:21.461504212 +0100 +@@ -9,7 +9,7 @@ + # instead of command-line options, please run the + # following command : + # +-# @prefix@/sbin/pure-config.pl @prefix@/etc/pure-ftpd.conf ++# @sbindir@/pure-config.pl @sysconfdir@/pure-ftpd.conf + # + # Please don't forget to have a look at documentation at + # http://www.pureftpd.org/documentation.shtml for a complete list of +@@ -107,34 +107,34 @@ MaxIdleTime 15 + + # LDAP configuration file (see README.LDAP) + +-# LDAPConfigFile /etc/pureftpd-ldap.conf ++# LDAPConfigFile @sysconfdir@/pureftpd-ldap.conf + + + + # MySQL configuration file (see README.MySQL) + +-# MySQLConfigFile /etc/pureftpd-mysql.conf ++# MySQLConfigFile @sysconfdir@/pureftpd-mysql.conf + + + # Postgres configuration file (see README.PGSQL) + +-# PGSQLConfigFile /etc/pureftpd-pgsql.conf ++# PGSQLConfigFile @sysconfdir@/pureftpd-pgsql.conf + + + # PureDB user database (see README.Virtual-Users) + +-# PureDB /etc/pureftpd.pdb ++# PureDB @sysconfdir@/pureftpd.pdb + + + # Path to pure-authd socket (see README.Authentication-Modules) + +-# ExtAuth /var/run/ftpd.sock ++# ExtAuth @localstatedir@/run/ftpd.sock + + + + # If you want to enable PAM authentication, uncomment the following line + +-# PAMAuthentication yes ++PAMAuthentication yes + + + +@@ -237,7 +237,14 @@ Umask 133:022 + + # Minimum UID for an authenticated user to log in. + +-MinUID 100 ++MinUID 1000 ++ ++ ++ ++# Do not use the /etc/ftpusers file to disable accounts. We're already ++# using MinUID to block users with uid < 1000 ++ ++UseFtpUsers no + + + +@@ -276,7 +283,7 @@ AutoRename no + + # Disallow anonymous users to upload new files (no = upload is allowed) + +-AnonymousCantUpload no ++AnonymousCantUpload yes + + + +@@ -301,21 +308,21 @@ AnonymousCantUpload no + # fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338 + # This log file can then be processed by www traffic analyzers. + +-# AltLog clf:/var/log/pureftpd.log ++AltLog clf:@localstatedir@/log/pureftpd.log + + + + # Create an additional log file with transfers logged in a format optimized + # for statistic reports. + +-# AltLog stats:/var/log/pureftpd.log ++# AltLog stats:@localstatedir@/log/pureftpd.log + + + + # Create an additional log file with transfers logged in the standard W3C + # format (compatible with most commercial log analyzers) + +-# AltLog w3c:/var/log/pureftpd.log ++# AltLog w3c:@localstatedir@/log/pureftpd.log + + + +@@ -346,9 +353,9 @@ AnonymousCantUpload no + + + # If your pure-ftpd has been compiled with standalone support, you can change +-# the location of the pid file. The default is /var/run/pure-ftpd.pid ++# the location of the pid file. The default is @localstatedir@/run/pure-ftpd.pid + +-#PIDFile /var/run/pure-ftpd.pid ++#PIDFile @localstatedir@/run/pure-ftpd.pid + + + +diff -up ./pureftpd-mysql.conf.config ./pureftpd-mysql.conf +--- ./pureftpd-mysql.conf.config 2009-10-20 12:17:56.000000000 +0200 ++++ ./pureftpd-mysql.conf 2009-12-04 22:05:35.350755132 +0100 +@@ -19,7 +19,7 @@ + + # Optional : define the location of mysql.sock if the server runs on this host. + +-MYSQLSocket /tmp/mysql.sock ++MYSQLSocket /var/lib/mysql/mysql.sock + + + # Mandatory : user to bind the server as. diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 38a1733..d151c22 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -14,10 +14,12 @@ Source4: pure-ftpd.pure-ftpwho.pam Source5: pure-ftpd.pure-ftpwho.consoleapp Source6: pure-ftpd.README.SELinux Source7: pure-ftpd.pureftpd.te -Patch0: pure-ftpd-1.0.27-config.patch +#Patch0: pure-ftpd-1.0.27-config.patch #Patch1: pure-ftpd-1.0.20-libdir.patch Patch2: pure-ftpd-paminclude.patch #Patch3: pure-ftpd-mysql-password.patch +Patch4: pure-ftpd-1.0.35-config.patch + Provides: ftpserver BuildRequires: pam-devel, perl, python, libcap-devel %{!?_without_ldap:BuildRequires: openldap-devel} @@ -72,10 +74,11 @@ Pure-FTPd to be protected in the same way other FTP servers are in Fedora %prep %setup -q -%patch0 -p0 -b .config +#%%patch0 -p0 -b .config #%%patch1 -p0 -b .libdir %patch2 -p0 -b .paminclude #%%patch3 -p1 -b .mysql-password +%patch4 -p0 -b .config install -pm 644 %{SOURCE6} README.SELinux mkdir selinux cp -p %{SOURCE7} selinux/pureftpd.te @@ -261,6 +264,9 @@ fi %changelog +* Tue Mar 13 2012 Jaromir Capik - 1.0.35-2 +- Changing MinUID from 500 to 1000 + * Fri Jan 13 2012 Jaromir Capik - 1.0.35-1 - Update to 1.0.35 From bb61bf2b09b8d3b054d1026ac9a32c1b13e79eaa Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Tue, 13 Mar 2012 17:29:12 +0100 Subject: [PATCH 054/122] Wrong release number --- pure-ftpd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index d151c22..1a33f85 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.35 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons From 04de23ded364575e33a595493528b0c105662b50 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 20 Jul 2012 22:37:15 -0500 Subject: [PATCH 055/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 1a33f85..938cc60 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.35 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -264,6 +264,9 @@ fi %changelog +* Sat Jul 21 2012 Fedora Release Engineering - 1.0.35-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Tue Mar 13 2012 Jaromir Capik - 1.0.35-2 - Changing MinUID from 500 to 1000 From ff72594c00de1c48677bcb0cca0405482665b7ba Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Mon, 27 Aug 2012 15:30:39 +0200 Subject: [PATCH 056/122] Migration to new systemd scriptlet macros --- pure-ftpd.spec | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 938cc60..8f93b43 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.35 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -178,10 +178,8 @@ install -p -m 644 -D pureftpd.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{n %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post pure-ftpd.service + %if 0%{!?_without_tls:1} # TLS Certificate if [ ! -f %{_sysconfdir}/pki/%{name}/%{name}.pem ]; then @@ -191,18 +189,10 @@ fi %endif %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable pure-ftpd.service > /dev/null 2>&1 || : - /bin/systemctl stop pure-ftpd.service > /dev/null 2>&1 || : -fi +%systemd_preun pure-ftpd.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart pure-ftpd.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart pure-ftpd.service %post selinux @@ -264,6 +254,9 @@ fi %changelog +* Mon Aug 27 2012 Jaromir Capik - 1.0.35-4 +- Migration to new systemd scriptlet macros + * Sat Jul 21 2012 Fedora Release Engineering - 1.0.35-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 769754fd1e24e171cc69f4c90020adb8675640cc Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Tue, 23 Oct 2012 15:42:08 +0200 Subject: [PATCH 057/122] Update to 1.0.36 --- .gitignore | 1 + pure-ftpd.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0666a4c..63587a5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.30.tar.bz2 /pure-ftpd-1.0.32.tar.bz2 /pure-ftpd-1.0.35.tar.bz2 +/pure-ftpd-1.0.36.tar.bz2 diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 8f93b43..23ac478 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.35 -Release: 4%{?dist} +Version: 1.0.36 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Tue Oct 23 2012 Jaromir Capik - 1.0.36-1 +- Update to 1.0.36 + * Mon Aug 27 2012 Jaromir Capik - 1.0.35-4 - Migration to new systemd scriptlet macros diff --git a/sources b/sources index cdfa583..e2f7d3a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -500988c4fa8decff294b56f164be955e pure-ftpd-1.0.35.tar.bz2 +7899c75c1fed7dbad0352eb31080e066 pure-ftpd-1.0.36.tar.bz2 From e1cc71e223059e88aac7cc955e28123ac8aead4d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 12:32:43 -0600 Subject: [PATCH 058/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 23ac478..f552a78 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.36 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 1.0.36-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Tue Oct 23 2012 Jaromir Capik - 1.0.36-1 - Update to 1.0.36 From 7500ac3925e39c2df0dcfa6c1c6343e3bc372e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 18 Jul 2013 01:36:28 +0200 Subject: [PATCH 059/122] Perl 5.18 rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index f552a78..31ad4c0 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.36 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Wed Jul 17 2013 Petr Pisar - 1.0.36-3 +- Perl 5.18 rebuild + * Thu Feb 14 2013 Fedora Release Engineering - 1.0.36-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From f1ce01faf962a772e97f3043372d9e566c5e09ef Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 00:32:21 -0500 Subject: [PATCH 060/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 31ad4c0..b6bcc0b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.36 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 1.0.36-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Wed Jul 17 2013 Petr Pisar - 1.0.36-3 - Perl 5.18 rebuild From e76b8059d7509ca1afe7fdf7559551afe2584015 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 12:35:14 -0500 Subject: [PATCH 061/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index b6bcc0b..ec3cde4 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.36 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 1.0.36-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sun Aug 04 2013 Fedora Release Engineering - 1.0.36-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 69b442f8bfb340a47eb3015a5781b5ada5b063fe Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Aug 2014 20:13:55 +0000 Subject: [PATCH 062/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index ec3cde4..53f0123 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.36 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Sun Aug 17 2014 Fedora Release Engineering - 1.0.36-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 1.0.36-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 54cf1c64dde43f3e270c3e9bb827a81039b3b604 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Sat, 28 Feb 2015 00:19:35 +0100 Subject: [PATCH 063/122] - Updating to 1.0.37 --- pure-ftpd.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 53f0123..ea10f0a 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.36 -Release: 6%{?dist} +Version: 1.0.37 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -254,6 +254,9 @@ fi %changelog +* Fri Feb 27 2015 Jaromir Capik - 1.0.37-1 +- Updating to 1.0.37 + * Sun Aug 17 2014 Fedora Release Engineering - 1.0.36-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 0580ab2fbc6445651b3308e861baffb9689e9010 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Sat, 28 Feb 2015 00:20:51 +0100 Subject: [PATCH 064/122] - sources too --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index e2f7d3a..8a2e31e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7899c75c1fed7dbad0352eb31080e066 pure-ftpd-1.0.36.tar.bz2 +8ece9270ead3d1f8db3675c3dfc9d9ad pure-ftpd-1.0.37.tar.bz2 From aca6dad2bf7a70d009ecac885659d2c588833b9e Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Sat, 28 Feb 2015 00:47:44 +0100 Subject: [PATCH 065/122] - gitignore as well (something failed during the source upload) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 63587a5..dc9310c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.32.tar.bz2 /pure-ftpd-1.0.35.tar.bz2 /pure-ftpd-1.0.36.tar.bz2 +/pure-ftpd-1.0.37.tar.bz2 From 18208fcc38f708462f8e9d637ef85afd37073760 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Mon, 1 Jun 2015 16:39:26 +0200 Subject: [PATCH 066/122] - Updating to 1.0.39 (#1224479) --- .gitignore | 1 + pure-ftpd.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index dc9310c..9b97272 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.35.tar.bz2 /pure-ftpd-1.0.36.tar.bz2 /pure-ftpd-1.0.37.tar.bz2 +/pure-ftpd-1.0.39.tar.bz2 diff --git a/pure-ftpd.spec b/pure-ftpd.spec index ea10f0a..006af13 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,5 +1,5 @@ Name: pure-ftpd -Version: 1.0.37 +Version: 1.0.39 Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server @@ -254,6 +254,9 @@ fi %changelog +* Mon Jun 01 2015 Jaromir Capik - 1.0.39-1 +- Updating to 1.0.39 (#1224479) + * Fri Feb 27 2015 Jaromir Capik - 1.0.37-1 - Updating to 1.0.37 diff --git a/sources b/sources index 8a2e31e..1872437 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8ece9270ead3d1f8db3675c3dfc9d9ad pure-ftpd-1.0.37.tar.bz2 +901b8e9a6e0ab355ef0bcbd566477bab pure-ftpd-1.0.39.tar.bz2 From f45fbc8b5d4e489e0a6aad2a7a78a33672dfb315 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Mon, 15 Jun 2015 16:51:46 +0200 Subject: [PATCH 067/122] - Updating to 1.0.40 (#1231498) --- .gitignore | 1 + pure-ftpd-1.0.20-libdir.patch | 13 -- pure-ftpd-1.0.27-config.patch | 127 ------------------ ...patch => pure-ftpd-1.0.40-paminclude.patch | 8 +- pure-ftpd-mysql-password.patch | 17 --- pure-ftpd.spec | 24 ++-- sources | 2 +- 7 files changed, 14 insertions(+), 178 deletions(-) delete mode 100644 pure-ftpd-1.0.20-libdir.patch delete mode 100644 pure-ftpd-1.0.27-config.patch rename pure-ftpd-paminclude.patch => pure-ftpd-1.0.40-paminclude.patch (71%) delete mode 100644 pure-ftpd-mysql-password.patch diff --git a/.gitignore b/.gitignore index 9b97272..8c91658 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.36.tar.bz2 /pure-ftpd-1.0.37.tar.bz2 /pure-ftpd-1.0.39.tar.bz2 +/pure-ftpd-1.0.40.tar.bz2 diff --git a/pure-ftpd-1.0.20-libdir.patch b/pure-ftpd-1.0.20-libdir.patch deleted file mode 100644 index 77b6c86..0000000 --- a/pure-ftpd-1.0.20-libdir.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- ./configure.libdir 2004-06-20 19:41:54.000000000 +0200 -+++ ./configure 2005-01-31 12:33:03.901660331 +0100 -@@ -19781,8 +19781,8 @@ - LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/mysql -L${withval}/mysql/lib" - CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/mysql -I${withval}/mysql/include" - else -- LD_RUN_PATH="/usr/local/mysql/lib:/usr/local/mysql/lib/mysql:/usr/lib/mysql:/usr/mysql/lib:/usr/mysql/lib/mysql:/usr/local/lib/mysql:${LD_RUN_PATH:+:}${LD_RUN_PATH}" -- LDFLAGS="$LDFLAGS -L/usr/local/mysql/lib -L/usr/lib/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql" -+ LD_RUN_PATH="/usr/local/mysql/lib:/usr/local/mysql/lib/mysql:${libdir}/mysql:/usr/mysql/lib:/usr/mysql/lib/mysql:/usr/local/lib/mysql:${LD_RUN_PATH:+:}${LD_RUN_PATH}" -+ LDFLAGS="$LDFLAGS -L/usr/local/mysql/lib -L${libdir}/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql" - CPPFLAGS="$CPPFLAGS -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql" - fi - diff --git a/pure-ftpd-1.0.27-config.patch b/pure-ftpd-1.0.27-config.patch deleted file mode 100644 index a67d164..0000000 --- a/pure-ftpd-1.0.27-config.patch +++ /dev/null @@ -1,127 +0,0 @@ -diff -up ./configuration-file/pure-ftpd.conf.in.config ./configuration-file/pure-ftpd.conf.in ---- ./configuration-file/pure-ftpd.conf.in.config 2009-11-20 14:15:01.000000000 +0100 -+++ ./configuration-file/pure-ftpd.conf.in 2009-12-04 22:09:21.461504212 +0100 -@@ -9,7 +9,7 @@ - # instead of command-line options, please run the - # following command : - # --# @prefix@/sbin/pure-config.pl @prefix@/etc/pure-ftpd.conf -+# @sbindir@/pure-config.pl @sysconfdir@/pure-ftpd.conf - # - # Please don't forget to have a look at documentation at - # http://www.pureftpd.org/documentation.shtml for a complete list of -@@ -107,34 +107,34 @@ MaxIdleTime 15 - - # LDAP configuration file (see README.LDAP) - --# LDAPConfigFile /etc/pureftpd-ldap.conf -+# LDAPConfigFile @sysconfdir@/pureftpd-ldap.conf - - - - # MySQL configuration file (see README.MySQL) - --# MySQLConfigFile /etc/pureftpd-mysql.conf -+# MySQLConfigFile @sysconfdir@/pureftpd-mysql.conf - - - # Postgres configuration file (see README.PGSQL) - --# PGSQLConfigFile /etc/pureftpd-pgsql.conf -+# PGSQLConfigFile @sysconfdir@/pureftpd-pgsql.conf - - - # PureDB user database (see README.Virtual-Users) - --# PureDB /etc/pureftpd.pdb -+# PureDB @sysconfdir@/pureftpd.pdb - - - # Path to pure-authd socket (see README.Authentication-Modules) - --# ExtAuth /var/run/ftpd.sock -+# ExtAuth @localstatedir@/run/ftpd.sock - - - - # If you want to enable PAM authentication, uncomment the following line - --# PAMAuthentication yes -+PAMAuthentication yes - - - -@@ -237,7 +237,14 @@ Umask 133:022 - - # Minimum UID for an authenticated user to log in. - --MinUID 100 -+MinUID 500 -+ -+ -+ -+# Do not use the /etc/ftpusers file to disable accounts. We're already -+# using MinUID to block users with uid < 500 -+ -+UseFtpUsers no - - - -@@ -276,7 +283,7 @@ AutoRename no - - # Disallow anonymous users to upload new files (no = upload is allowed) - --AnonymousCantUpload no -+AnonymousCantUpload yes - - - -@@ -301,21 +308,21 @@ AnonymousCantUpload no - # fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338 - # This log file can then be processed by www traffic analyzers. - --# AltLog clf:/var/log/pureftpd.log -+AltLog clf:@localstatedir@/log/pureftpd.log - - - - # Create an additional log file with transfers logged in a format optimized - # for statistic reports. - --# AltLog stats:/var/log/pureftpd.log -+# AltLog stats:@localstatedir@/log/pureftpd.log - - - - # Create an additional log file with transfers logged in the standard W3C - # format (compatible with most commercial log analyzers) - --# AltLog w3c:/var/log/pureftpd.log -+# AltLog w3c:@localstatedir@/log/pureftpd.log - - - -@@ -346,9 +353,9 @@ AnonymousCantUpload no - - - # If your pure-ftpd has been compiled with standalone support, you can change --# the location of the pid file. The default is /var/run/pure-ftpd.pid -+# the location of the pid file. The default is @localstatedir@/run/pure-ftpd.pid - --#PIDFile /var/run/pure-ftpd.pid -+#PIDFile @localstatedir@/run/pure-ftpd.pid - - - -diff -up ./pureftpd-mysql.conf.config ./pureftpd-mysql.conf ---- ./pureftpd-mysql.conf.config 2009-10-20 12:17:56.000000000 +0200 -+++ ./pureftpd-mysql.conf 2009-12-04 22:05:35.350755132 +0100 -@@ -19,7 +19,7 @@ - - # Optional : define the location of mysql.sock if the server runs on this host. - --MYSQLSocket /tmp/mysql.sock -+MYSQLSocket /var/lib/mysql/mysql.sock - - - # Mandatory : user to bind the server as. diff --git a/pure-ftpd-paminclude.patch b/pure-ftpd-1.0.40-paminclude.patch similarity index 71% rename from pure-ftpd-paminclude.patch rename to pure-ftpd-1.0.40-paminclude.patch index e8ace75..83bcf70 100644 --- a/pure-ftpd-paminclude.patch +++ b/pure-ftpd-1.0.40-paminclude.patch @@ -1,10 +1,10 @@ ---- ./pam/pure-ftpd.paminclude 2006-10-27 09:28:40.000000000 +0200 -+++ ./pam/pure-ftpd 2006-10-27 09:37:22.000000000 +0200 -@@ -4,13 +4,14 @@ +diff -Naur pure-ftpd-1.0.40.orig/pam/pure-ftpd pure-ftpd-1.0.40/pam/pure-ftpd +--- pure-ftpd-1.0.40.orig/pam/pure-ftpd 2015-06-13 12:26:37.000000000 +0200 ++++ pure-ftpd-1.0.40/pam/pure-ftpd 2015-06-01 16:36:31.000000000 +0200 +@@ -4,12 +4,14 @@ # Install it in /etc/pam.d/pure-ftpd or add to /etc/pam.conf auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed --auth required pam_stack.so service=system-auth +auth include password-auth auth required pam_shells.so auth required pam_nologin.so diff --git a/pure-ftpd-mysql-password.patch b/pure-ftpd-mysql-password.patch deleted file mode 100644 index a3468fa..0000000 --- a/pure-ftpd-mysql-password.patch +++ /dev/null @@ -1,17 +0,0 @@ -Use my_make_scrambled_password() rather than the deprecated equivalent -make_scrambled_password(). As of Fedora 15 the latter is not exported -by libmysqlclient.so. - - ---- pure-ftpd-1.0.30.orig/src/log_mysql.c 2011-03-26 19:14:20.492368416 +0100 -+++ pure-ftpd-1.0.30/src/log_mysql.c 2011-03-26 19:16:51.110255978 +0100 -@@ -451,7 +451,8 @@ - # if MYSQL_VERSION_ID >= 40100 && MYSQL_VERSION_ID < 40101 - make_scrambled_password(scrambled_password, password, 1, NULL); - # else -- make_scrambled_password(scrambled_password, password); -+ my_make_scrambled_password(scrambled_password, password, -+ strlen(password)); - # endif - #endif - if (strcmp(scrambled_password, spwd) == 0) { diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 006af13..54c900b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,5 +1,5 @@ Name: pure-ftpd -Version: 1.0.39 +Version: 1.0.40 Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server @@ -14,11 +14,8 @@ Source4: pure-ftpd.pure-ftpwho.pam Source5: pure-ftpd.pure-ftpwho.consoleapp Source6: pure-ftpd.README.SELinux Source7: pure-ftpd.pureftpd.te -#Patch0: pure-ftpd-1.0.27-config.patch -#Patch1: pure-ftpd-1.0.20-libdir.patch -Patch2: pure-ftpd-paminclude.patch -#Patch3: pure-ftpd-mysql-password.patch -Patch4: pure-ftpd-1.0.35-config.patch +Patch0: pure-ftpd-1.0.35-config.patch +Patch1: pure-ftpd-1.0.40-paminclude.patch Provides: ftpserver BuildRequires: pam-devel, perl, python, libcap-devel @@ -26,12 +23,7 @@ BuildRequires: pam-devel, perl, python, libcap-devel %{!?_without_mysql:BuildRequires: mysql-devel} %{!?_without_pgsql:BuildRequires: postgresql-devel} %{!?_without_tls:BuildRequires: openssl-devel} -# SELinux module -%if 0%{?fedora} == 5 -BuildRequires: checkpolicy, selinux-policy >= 2.2.40, m4 -%else BuildRequires: checkpolicy, selinux-policy-devel -%endif BuildRequires: systemd-units Requires(post): systemd-sysv Requires(post): systemd-units @@ -74,11 +66,8 @@ Pure-FTPd to be protected in the same way other FTP servers are in Fedora %prep %setup -q -#%%patch0 -p0 -b .config -#%%patch1 -p0 -b .libdir -%patch2 -p0 -b .paminclude -#%%patch3 -p1 -b .mysql-password -%patch4 -p0 -b .config +%patch0 -p0 -b .config +%patch1 -p1 -b .paminclude install -pm 644 %{SOURCE6} README.SELinux mkdir selinux cp -p %{SOURCE7} selinux/pureftpd.te @@ -254,6 +243,9 @@ fi %changelog +* Mon Jun 15 2015 Jaromir Capik - 1.0.40-1 +- Updating to 1.0.40 (#1231498) + * Mon Jun 01 2015 Jaromir Capik - 1.0.39-1 - Updating to 1.0.39 (#1224479) diff --git a/sources b/sources index 1872437..be1dbdf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -901b8e9a6e0ab355ef0bcbd566477bab pure-ftpd-1.0.39.tar.bz2 +33a503343a0f960332156387cc2dde55 pure-ftpd-1.0.40.tar.bz2 From 1e6ab0539312d47197b4178901f424022861b5de Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 18 Jun 2015 18:00:30 +0000 Subject: [PATCH 068/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 54c900b..0ea8dda 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.40 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -243,6 +243,9 @@ fi %changelog +* Thu Jun 18 2015 Fedora Release Engineering - 1.0.40-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Mon Jun 15 2015 Jaromir Capik - 1.0.40-1 - Updating to 1.0.40 (#1231498) From c7f25102d321d6bbb578f44f7c0de75576f56f59 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Mon, 27 Jul 2015 14:00:14 +0200 Subject: [PATCH 069/122] - Updating to 1.0.42 (#1236253) --- .gitignore | 1 + pure-ftpd-1.0.35-config.patch | 12 ------------ pure-ftpd.spec | 10 ++++++---- sources | 2 +- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 8c91658..63a8518 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.37.tar.bz2 /pure-ftpd-1.0.39.tar.bz2 /pure-ftpd-1.0.40.tar.bz2 +/pure-ftpd-1.0.42.tar.bz2 diff --git a/pure-ftpd-1.0.35-config.patch b/pure-ftpd-1.0.35-config.patch index 76863d4..845379e 100644 --- a/pure-ftpd-1.0.35-config.patch +++ b/pure-ftpd-1.0.35-config.patch @@ -113,15 +113,3 @@ diff -up ./configuration-file/pure-ftpd.conf.in.config ./configuration-file/pure -diff -up ./pureftpd-mysql.conf.config ./pureftpd-mysql.conf ---- ./pureftpd-mysql.conf.config 2009-10-20 12:17:56.000000000 +0200 -+++ ./pureftpd-mysql.conf 2009-12-04 22:05:35.350755132 +0100 -@@ -19,7 +19,7 @@ - - # Optional : define the location of mysql.sock if the server runs on this host. - --MYSQLSocket /tmp/mysql.sock -+MYSQLSocket /var/lib/mysql/mysql.sock - - - # Mandatory : user to bind the server as. diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 0ea8dda..3ef0753 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,13 +1,13 @@ Name: pure-ftpd -Version: 1.0.40 -Release: 2%{?dist} +Version: 1.0.42 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons License: BSD URL: http://www.pureftpd.org Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-%{version}.tar.bz2 -Source1: pure-ftpd.service +Source1: pure-ftpd.service Source2: pure-ftpd.logrotate Source3: pure-ftpd.xinetd Source4: pure-ftpd.pure-ftpwho.pam @@ -165,7 +165,6 @@ make -f %{_datadir}/selinux/devel/Makefile install -p -m 644 -D pureftpd.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/pureftpd.pp - %post %systemd_post pure-ftpd.service @@ -243,6 +242,9 @@ fi %changelog +* Mon Jul 27 2015 Jaromir Capik - 1.0.42-1 +- Updating to 1.0.42 (#1236253) + * Thu Jun 18 2015 Fedora Release Engineering - 1.0.40-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index be1dbdf..f3bc784 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -33a503343a0f960332156387cc2dde55 pure-ftpd-1.0.40.tar.bz2 +4022f38939f6a112b18c1a43dee552c1 pure-ftpd-1.0.42.tar.bz2 From 5ab9a6d35da4cf3c2190dcff67bb4b5761ba472c Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Wed, 5 Aug 2015 16:18:35 +0200 Subject: [PATCH 070/122] - Making mysql/postgresql policies optional (#1249109) --- pure-ftpd.pureftpd.te | 12 ++++++++---- pure-ftpd.spec | 5 ++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pure-ftpd.pureftpd.te b/pure-ftpd.pureftpd.te index 76b9e70..84766f4 100644 --- a/pure-ftpd.pureftpd.te +++ b/pure-ftpd.pureftpd.te @@ -2,7 +2,7 @@ policy_module(pureftpd, 1.0) require { type ftpd_t; -}; +} # Read /var/run/utmp init_read_utmp(ftpd_t) @@ -12,14 +12,18 @@ init_dontaudit_write_utmp(ftpd_t) # Network connect corenet_tcp_connect_mysqld_port(ftpd_t) # Socket file connect -mysql_stream_connect(ftpd_t); -mysql_rw_db_sockets(ftpd_t) +optional_policy(` + mysql_stream_connect(ftpd_t) + mysql_rw_db_sockets(ftpd_t) +') ### Allow connect to postgresql # Network connect corenet_tcp_connect_postgresql_port(ftpd_t) # Socket file connect -postgresql_stream_connect(ftpd_t) +optional_policy(` + postgresql_stream_connect(ftpd_t) +') # Allow connect to ldap sysnet_use_ldap(ftpd_t) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 3ef0753..d438b33 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.42 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -242,6 +242,9 @@ fi %changelog +* Wed Aug 05 2015 Jaromir Capik - 1.0.42-2 +- Making mysql/postgresql policies optional (#1249109) + * Mon Jul 27 2015 Jaromir Capik - 1.0.42-1 - Updating to 1.0.42 (#1236253) From 1f3baac5a7d2fa0524bf3dc1ca76b11d2b9072e6 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Wed, 23 Dec 2015 16:43:45 +0100 Subject: [PATCH 071/122] Remove executable permission bits from pure-ftpd systemd unit --- pure-ftpd.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index d438b33..21fca18 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.42 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -136,7 +136,7 @@ install -p -m 644 man/pure-quotacheck.8 $RPM_BUILD_ROOT%{_mandir}/man8 install -p -m 644 man/pure-authd.8 $RPM_BUILD_ROOT%{_mandir}/man8 # Init script -install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service # Pam install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d @@ -242,6 +242,9 @@ fi %changelog +* Wed Dec 23 2015 Robert Scheck - 1.0.42-3 +- Remove executable permission bits from pure-ftpd systemd unit + * Wed Aug 05 2015 Jaromir Capik - 1.0.42-2 - Making mysql/postgresql policies optional (#1249109) From 2884f6b658cac94609af331df6e4dca7db4c5e6d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 18:36:35 +0000 Subject: [PATCH 072/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 21fca18..1fa306b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.42 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -242,6 +242,9 @@ fi %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 1.0.42-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Dec 23 2015 Robert Scheck - 1.0.42-3 - Remove executable permission bits from pure-ftpd systemd unit From 9c1956be7093ba8fec9cb539fe89d850c1b2b97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 24 Jun 2016 10:02:39 +0200 Subject: [PATCH 073/122] Mandatory Perl build-requires added --- pure-ftpd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 1fa306b..f5c511c 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -18,7 +18,7 @@ Patch0: pure-ftpd-1.0.35-config.patch Patch1: pure-ftpd-1.0.40-paminclude.patch Provides: ftpserver -BuildRequires: pam-devel, perl, python, libcap-devel +BuildRequires: pam-devel, perl, perl-generators, python, libcap-devel %{!?_without_ldap:BuildRequires: openldap-devel} %{!?_without_mysql:BuildRequires: mysql-devel} %{!?_without_pgsql:BuildRequires: postgresql-devel} From 718bbc9a666428f97b6e9adba506f3fd9c5ceb16 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 07:58:52 +0000 Subject: [PATCH 074/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index f5c511c..e3aab9b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.42 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -242,6 +242,9 @@ fi %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 1.0.42-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Feb 04 2016 Fedora Release Engineering - 1.0.42-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 17e7e91e6a2c624add3c373d5aa4c9ead93a3c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 12 Jul 2017 14:07:04 +0200 Subject: [PATCH 075/122] perl dependency renamed to perl-interpreter --- pure-ftpd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index e3aab9b..57a9adc 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -18,7 +18,7 @@ Patch0: pure-ftpd-1.0.35-config.patch Patch1: pure-ftpd-1.0.40-paminclude.patch Provides: ftpserver -BuildRequires: pam-devel, perl, perl-generators, python, libcap-devel +BuildRequires: pam-devel, perl-interpreter, perl-generators, python, libcap-devel %{!?_without_ldap:BuildRequires: openldap-devel} %{!?_without_mysql:BuildRequires: mysql-devel} %{!?_without_pgsql:BuildRequires: postgresql-devel} From 2e80e45a046c54f94e29e8869f25522bbf5d66e0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 09:11:21 +0000 Subject: [PATCH 076/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 57a9adc..89b2306 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.42 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -242,6 +242,9 @@ fi %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 1.0.42-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sat Feb 11 2017 Fedora Release Engineering - 1.0.42-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From a5f4b2edabc6b7c33472f111f485237e28bb4e09 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 06:27:24 +0000 Subject: [PATCH 077/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 89b2306..2e3b8ad 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.42 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -242,6 +242,9 @@ fi %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 1.0.42-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 1.0.42-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 9683b36f713878529beba846b764c4b4463ecf7c Mon Sep 17 00:00:00 2001 From: Martin Sehnoutka Date: Wed, 12 Jul 2017 12:30:42 +0200 Subject: [PATCH 078/122] Rebase to 1.0.46 --- .gitignore | 1 + ...-paminclude.patch => 0001-modify-pam.patch | 25 +++- 0002-fedora-specific-config-file.patch | 126 ++++++++++++++++++ pure-ftpd-1.0.35-config.patch | 115 ---------------- pure-ftpd.service | 2 +- pure-ftpd.spec | 42 +++--- sources | 2 +- 7 files changed, 171 insertions(+), 142 deletions(-) rename pure-ftpd-1.0.40-paminclude.patch => 0001-modify-pam.patch (60%) create mode 100644 0002-fedora-specific-config-file.patch delete mode 100644 pure-ftpd-1.0.35-config.patch diff --git a/.gitignore b/.gitignore index 63a8518..52988ca 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.39.tar.bz2 /pure-ftpd-1.0.40.tar.bz2 /pure-ftpd-1.0.42.tar.bz2 +/pure-ftpd-1.0.46.tar.bz2 diff --git a/pure-ftpd-1.0.40-paminclude.patch b/0001-modify-pam.patch similarity index 60% rename from pure-ftpd-1.0.40-paminclude.patch rename to 0001-modify-pam.patch index 83bcf70..094a5d1 100644 --- a/pure-ftpd-1.0.40-paminclude.patch +++ b/0001-modify-pam.patch @@ -1,7 +1,17 @@ -diff -Naur pure-ftpd-1.0.40.orig/pam/pure-ftpd pure-ftpd-1.0.40/pam/pure-ftpd ---- pure-ftpd-1.0.40.orig/pam/pure-ftpd 2015-06-13 12:26:37.000000000 +0200 -+++ pure-ftpd-1.0.40/pam/pure-ftpd 2015-06-01 16:36:31.000000000 +0200 -@@ -4,12 +4,14 @@ +From 0cabf3b8b952c6117d575360f793ba63fb53c7ba Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Wed, 12 Jul 2017 12:09:38 +0200 +Subject: [PATCH 1/2] modify pam + +--- + pam/pure-ftpd | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/pam/pure-ftpd b/pam/pure-ftpd +index 6611b87..ece8733 100644 +--- a/pam/pure-ftpd ++++ b/pam/pure-ftpd +@@ -4,12 +4,13 @@ # Install it in /etc/pam.d/pure-ftpd or add to /etc/pam.conf auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed @@ -13,9 +23,12 @@ diff -Naur pure-ftpd-1.0.40.orig/pam/pure-ftpd pure-ftpd-1.0.40/pam/pure-ftpd +account include password-auth -password required pam_stack.so service=system-auth +- +-session required pam_stack.so service=system-auth +password include password-auth --session required pam_stack.so service=system-auth +session required pam_loginuid.so +session include password-auth - +-- +2.13.0 + diff --git a/0002-fedora-specific-config-file.patch b/0002-fedora-specific-config-file.patch new file mode 100644 index 0000000..8244501 --- /dev/null +++ b/0002-fedora-specific-config-file.patch @@ -0,0 +1,126 @@ +From 7298eae83f798f572e33bce5cc5f0a43fabdf9ad Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Wed, 12 Jul 2017 13:17:05 +0200 +Subject: [PATCH] fedora specific config file + +--- + pure-ftpd.conf.in | 31 +++++++++++++++++-------------- + 1 file changed, 17 insertions(+), 14 deletions(-) + +diff --git a/pure-ftpd.conf.in b/pure-ftpd.conf.in +index fbaf9b4..b02617d 100644 +--- a/pure-ftpd.conf.in ++++ b/pure-ftpd.conf.in +@@ -9,7 +9,7 @@ + # instead of command-line options, please run the + # following command : + # +-# @prefix@/sbin/pure-ftpd @sysconfdir@/etc/pure-ftpd.conf ++# @sbindir@/pure-ftpd @sysconfdir@/pure-ftpd.conf + # + # Online documentation: + # https://www.pureftpd.org/project/pure-ftpd/doc +@@ -106,34 +106,34 @@ MaxIdleTime 15 + + # LDAP configuration file (see README.LDAP) + +-# LDAPConfigFile /etc/pureftpd-ldap.conf ++# LDAPConfigFile @sysconfigdir@/pureftpd-ldap.conf + + + + # MySQL configuration file (see README.MySQL) + +-# MySQLConfigFile /etc/pureftpd-mysql.conf ++# MySQLConfigFile @sysconfigdir@/pureftpd-mysql.conf + + + # PostgreSQL configuration file (see README.PGSQL) + +-# PGSQLConfigFile /etc/pureftpd-pgsql.conf ++# PGSQLConfigFile @sysconfigdir@/pureftpd-pgsql.conf + + + # PureDB user database (see README.Virtual-Users) + +-# PureDB /etc/pureftpd.pdb ++# PureDB @sysconfigdir@/pureftpd.pdb + + + # Path to pure-authd socket (see README.Authentication-Modules) + +-# ExtAuth /var/run/ftpd.sock ++# ExtAuth @localstatedir@/run/ftpd.sock + + + + # If you want to enable PAM authentication, uncomment the following line + +-# PAMAuthentication yes ++PAMAuthentication yes + + + +@@ -236,9 +236,12 @@ Umask 133:022 + + # Minimum UID for an authenticated user to log in. + +-MinUID 100 ++MinUID 1000 + ++# Do not use the /etc/ftpusers file to disable accounts. We're already ++# using MinUID to block users with uid < 1000 + ++UseFtpUsers no + + # Allow FXP transfers for authenticated users. + +@@ -275,7 +278,7 @@ AutoRename no + + # Prevent anonymous users from uploading new files (no = upload is allowed) + +-AnonymousCantUpload no ++AnonymousCantUpload yes + + + +@@ -299,21 +302,21 @@ AnonymousCantUpload no + # fw.c9x.org - jedi [13/Apr/2017:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338 + # This log file can then be processed by common HTTP traffic analyzers. + +-# AltLog clf:/var/log/pureftpd.log ++AltLog clf:@localstatedir@/log/pureftpd.log + + + + # Create an additional log file with transfers logged in a format optimized + # for statistic reports. + +-# AltLog stats:/var/log/pureftpd.log ++# AltLog stats:@localstatedir@/log/pureftpd.log + + + + # Create an additional log file with transfers logged in the standard W3C + # format (compatible with many HTTP log analyzers) + +-# AltLog w3c:/var/log/pureftpd.log ++# AltLog w3c:@localstatedir@/log/pureftpd.log + + + +@@ -344,9 +347,9 @@ AnonymousCantUpload no + + + # If your pure-ftpd has been compiled with standalone support, you can change +-# the location of the pid file. The default is /var/run/pure-ftpd.pid ++# the location of the pid file. The default is @localstatedir@/run/pure-ftpd.pid + +-# PIDFile /var/run/pure-ftpd.pid ++#PIDFile @localstatedir@/run/pure-ftpd.pid + + + +-- +2.13.0 + diff --git a/pure-ftpd-1.0.35-config.patch b/pure-ftpd-1.0.35-config.patch deleted file mode 100644 index 845379e..0000000 --- a/pure-ftpd-1.0.35-config.patch +++ /dev/null @@ -1,115 +0,0 @@ -diff -up ./configuration-file/pure-ftpd.conf.in.config ./configuration-file/pure-ftpd.conf.in ---- ./configuration-file/pure-ftpd.conf.in.config 2009-11-20 14:15:01.000000000 +0100 -+++ ./configuration-file/pure-ftpd.conf.in 2009-12-04 22:09:21.461504212 +0100 -@@ -9,7 +9,7 @@ - # instead of command-line options, please run the - # following command : - # --# @prefix@/sbin/pure-config.pl @prefix@/etc/pure-ftpd.conf -+# @sbindir@/pure-config.pl @sysconfdir@/pure-ftpd.conf - # - # Please don't forget to have a look at documentation at - # http://www.pureftpd.org/documentation.shtml for a complete list of -@@ -107,34 +107,34 @@ MaxIdleTime 15 - - # LDAP configuration file (see README.LDAP) - --# LDAPConfigFile /etc/pureftpd-ldap.conf -+# LDAPConfigFile @sysconfdir@/pureftpd-ldap.conf - - - - # MySQL configuration file (see README.MySQL) - --# MySQLConfigFile /etc/pureftpd-mysql.conf -+# MySQLConfigFile @sysconfdir@/pureftpd-mysql.conf - - - # Postgres configuration file (see README.PGSQL) - --# PGSQLConfigFile /etc/pureftpd-pgsql.conf -+# PGSQLConfigFile @sysconfdir@/pureftpd-pgsql.conf - - - # PureDB user database (see README.Virtual-Users) - --# PureDB /etc/pureftpd.pdb -+# PureDB @sysconfdir@/pureftpd.pdb - - - # Path to pure-authd socket (see README.Authentication-Modules) - --# ExtAuth /var/run/ftpd.sock -+# ExtAuth @localstatedir@/run/ftpd.sock - - - - # If you want to enable PAM authentication, uncomment the following line - --# PAMAuthentication yes -+PAMAuthentication yes - - - -@@ -237,7 +237,14 @@ Umask 133:022 - - # Minimum UID for an authenticated user to log in. - --MinUID 100 -+MinUID 1000 -+ -+ -+ -+# Do not use the /etc/ftpusers file to disable accounts. We're already -+# using MinUID to block users with uid < 1000 -+ -+UseFtpUsers no - - - -@@ -276,7 +283,7 @@ AutoRename no - - # Disallow anonymous users to upload new files (no = upload is allowed) - --AnonymousCantUpload no -+AnonymousCantUpload yes - - - -@@ -301,21 +308,21 @@ AnonymousCantUpload no - # fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338 - # This log file can then be processed by www traffic analyzers. - --# AltLog clf:/var/log/pureftpd.log -+AltLog clf:@localstatedir@/log/pureftpd.log - - - - # Create an additional log file with transfers logged in a format optimized - # for statistic reports. - --# AltLog stats:/var/log/pureftpd.log -+# AltLog stats:@localstatedir@/log/pureftpd.log - - - - # Create an additional log file with transfers logged in the standard W3C - # format (compatible with most commercial log analyzers) - --# AltLog w3c:/var/log/pureftpd.log -+# AltLog w3c:@localstatedir@/log/pureftpd.log - - - -@@ -346,9 +353,9 @@ AnonymousCantUpload no - - - # If your pure-ftpd has been compiled with standalone support, you can change --# the location of the pid file. The default is /var/run/pure-ftpd.pid -+# the location of the pid file. The default is @localstatedir@/run/pure-ftpd.pid - --#PIDFile /var/run/pure-ftpd.pid -+#PIDFile @localstatedir@/run/pure-ftpd.pid - - - diff --git a/pure-ftpd.service b/pure-ftpd.service index e0b3dba..c26bfb6 100644 --- a/pure-ftpd.service +++ b/pure-ftpd.service @@ -5,7 +5,7 @@ After=syslog.target network.target [Service] Type=forking PIDFile=/var/run/pure-ftpd.pid -ExecStart=/usr/sbin/pure-config.pl /etc/pure-ftpd/pure-ftpd.conf --daemonize +ExecStart=/usr/sbin/pure-ftpd /etc/pure-ftpd/pure-ftpd.conf --daemonize [Install] WantedBy=multi-user.target diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 2e3b8ad..4029a2e 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.42 -Release: 7%{?dist} +Version: 1.0.46 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -14,17 +14,18 @@ Source4: pure-ftpd.pure-ftpwho.pam Source5: pure-ftpd.pure-ftpwho.consoleapp Source6: pure-ftpd.README.SELinux Source7: pure-ftpd.pureftpd.te -Patch0: pure-ftpd-1.0.35-config.patch -Patch1: pure-ftpd-1.0.40-paminclude.patch +Patch0: 0001-modify-pam.patch +Patch1: 0002-fedora-specific-config-file.patch Provides: ftpserver -BuildRequires: pam-devel, perl-interpreter, perl-generators, python, libcap-devel +BuildRequires: pam-devel, libcap-devel %{!?_without_ldap:BuildRequires: openldap-devel} %{!?_without_mysql:BuildRequires: mysql-devel} %{!?_without_pgsql:BuildRequires: postgresql-devel} %{!?_without_tls:BuildRequires: openssl-devel} BuildRequires: checkpolicy, selinux-policy-devel BuildRequires: systemd-units +BuildRequires: git Requires(post): systemd-sysv Requires(post): systemd-units Requires(preun): systemd-units @@ -65,9 +66,7 @@ Pure-FTPd to be protected in the same way other FTP servers are in Fedora %prep -%setup -q -%patch0 -p0 -b .config -%patch1 -p1 -b .paminclude +%autosetup -S git install -pm 644 %{SOURCE6} README.SELinux mkdir selinux cp -p %{SOURCE7} selinux/pureftpd.te @@ -78,7 +77,6 @@ cp -p %{SOURCE7} selinux/pureftpd.te --sysconfdir=%{_sysconfdir}/%{name} \ --with-capabilities \ --with-sendfile \ - --with-cork \ --with-paranoidmsg \ --with-altlog \ --with-puredb \ @@ -103,11 +101,10 @@ cp -p %{SOURCE7} selinux/pureftpd.te --with-rfc2640 \ --without-bonjour \ -make %{?_smp_mflags} - +%make_build %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man8 install -d -m 755 $RPM_BUILD_ROOT%{_sbindir} @@ -117,9 +114,7 @@ install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/ftp %{!?_without_tls:install -d -m 700 $RPM_BUILD_ROOT%{_sysconfdir}/pki/%{name}} # Conf -install -p -m 755 configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir} -install -p -m 644 configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name} -install -p -m 755 configuration-file/pure-config.py $RPM_BUILD_ROOT%{_sbindir} +install -p -m 644 pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name} install -p -m 644 pureftpd-ldap.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name} install -p -m 644 pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name} install -p -m 644 pureftpd-pgsql.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name} @@ -157,13 +152,19 @@ install -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/pure-ftpwho # SELinux support -cd selinux +pushd selinux echo "%{_sbindir}/pure-ftpd system_u:object_r:ftpd_exec_t:s0" > pureftpd.fc echo '%{_localstatedir}/log/pureftpd.log system_u:object_r:xferlog_t:s0' >> pureftpd.fc touch pureftpd.if make -f %{_datadir}/selinux/devel/Makefile install -p -m 644 -D pureftpd.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/pureftpd.pp +popd +# Docs +install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name} +rm -f README.{MacOS-X,Windows} +install -p -m 644 README.* $RPM_BUILD_ROOT%{_docdir}/%{name} +install -p -m 644 pureftpd.schema $RPM_BUILD_ROOT%{_docdir}/%{name} %post %systemd_post pure-ftpd.service @@ -171,7 +172,7 @@ install -p -m 644 -D pureftpd.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{n %if 0%{!?_without_tls:1} # TLS Certificate if [ ! -f %{_sysconfdir}/pki/%{name}/%{name}.pem ]; then - %{_sysconfdir}/pki/tls/certs/make-dummy-cert \ + %{_bindir}/make-dummy-cert \ %{_sysconfdir}/pki/%{name}/%{name}.pem fi %endif @@ -219,9 +220,9 @@ fi %files %doc FAQ THANKS AUTHORS CONTACT HISTORY NEWS %doc README README.Authentication-Modules README.Configuration-File -%doc README.Contrib README.Donations README.LDAP README.MySQL +%doc README.Donations README.LDAP README.MySQL README.SELinux %doc README.PGSQL README.TLS README.Virtual-Users -%doc contrib/pure-vpopauth.pl pureftpd.schema contrib/pure-stat.pl +%doc pureftpd.schema %{_bindir}/pure-* %{_sbindir}/pure-* %{_unitdir}/%{name}.service @@ -242,6 +243,9 @@ fi %changelog +* Mon Aug 14 2017 Martin Sehnoutka - 1.0.46-1 +- Rebase to 1.0.46 + * Thu Aug 03 2017 Fedora Release Engineering - 1.0.42-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index f3bc784..d223bc2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4022f38939f6a112b18c1a43dee552c1 pure-ftpd-1.0.42.tar.bz2 +SHA512 (pure-ftpd-1.0.46.tar.bz2) = e44c1842e6f101f4d7dd42617392f3d54ff58d68608f6a3bc5e612fc89bfd1da6935215a7e87c0d2bbd9fc9f0fa31a40ceb764fd67428dfdd8c5454e0d64e0ab From 749308ee9d298aae7dc182debdd77b702a6d7e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Thu, 14 Sep 2017 01:09:18 +0200 Subject: [PATCH 079/122] Fix loading the configuration file Also drop the 'UseFtpUsers' option from default config file The option has not been imlemented for over 12 years. The /etc/ftpusers file is used by PAM irrespectively of the option. --- 0002-fedora-specific-config-file.patch | 26 +++---- ...h-options-and-config-file-on-command.patch | 68 +++++++++++++++++++ pure-ftpd.spec | 7 +- 3 files changed, 85 insertions(+), 16 deletions(-) create mode 100644 0003-Allow-having-both-options-and-config-file-on-command.patch diff --git a/0002-fedora-specific-config-file.patch b/0002-fedora-specific-config-file.patch index 8244501..725184c 100644 --- a/0002-fedora-specific-config-file.patch +++ b/0002-fedora-specific-config-file.patch @@ -1,14 +1,14 @@ -From 7298eae83f798f572e33bce5cc5f0a43fabdf9ad Mon Sep 17 00:00:00 2001 +From 5023020a73f60d4d512f934cfb67d94d1efd921c Mon Sep 17 00:00:00 2001 From: rpm-build -Date: Wed, 12 Jul 2017 13:17:05 +0200 +Date: Thu, 14 Sep 2017 16:41:12 +0200 Subject: [PATCH] fedora specific config file --- - pure-ftpd.conf.in | 31 +++++++++++++++++-------------- - 1 file changed, 17 insertions(+), 14 deletions(-) + pure-ftpd.conf.in | 29 ++++++++++++++--------------- + 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/pure-ftpd.conf.in b/pure-ftpd.conf.in -index fbaf9b4..b02617d 100644 +index fbaf9b4..b4d6837 100644 --- a/pure-ftpd.conf.in +++ b/pure-ftpd.conf.in @@ -9,7 +9,7 @@ @@ -61,21 +61,17 @@ index fbaf9b4..b02617d 100644 -@@ -236,9 +236,12 @@ Umask 133:022 +@@ -236,8 +236,7 @@ Umask 133:022 # Minimum UID for an authenticated user to log in. -MinUID 100 +- +MinUID 1000 -+# Do not use the /etc/ftpusers file to disable accounts. We're already -+# using MinUID to block users with uid < 1000 - -+UseFtpUsers no # Allow FXP transfers for authenticated users. - -@@ -275,7 +278,7 @@ AutoRename no +@@ -275,7 +274,7 @@ AutoRename no # Prevent anonymous users from uploading new files (no = upload is allowed) @@ -84,7 +80,7 @@ index fbaf9b4..b02617d 100644 -@@ -299,21 +302,21 @@ AnonymousCantUpload no +@@ -299,21 +298,21 @@ AnonymousCantUpload no # fw.c9x.org - jedi [13/Apr/2017:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338 # This log file can then be processed by common HTTP traffic analyzers. @@ -109,7 +105,7 @@ index fbaf9b4..b02617d 100644 -@@ -344,9 +347,9 @@ AnonymousCantUpload no +@@ -344,9 +343,9 @@ AnonymousCantUpload no # If your pure-ftpd has been compiled with standalone support, you can change @@ -122,5 +118,5 @@ index fbaf9b4..b02617d 100644 -- -2.13.0 +2.9.5 diff --git a/0003-Allow-having-both-options-and-config-file-on-command.patch b/0003-Allow-having-both-options-and-config-file-on-command.patch new file mode 100644 index 0000000..7eb99b2 --- /dev/null +++ b/0003-Allow-having-both-options-and-config-file-on-command.patch @@ -0,0 +1,68 @@ +From f5617a4de54c313580fe39562f0d32e5c95f5212 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Thu, 14 Sep 2017 01:05:53 +0200 +Subject: [PATCH] Allow having both options and config file on command line + +--- + src/ftpd.c | 2 +- + src/simpleconf.c | 23 +++++++++++++++++++++-- + 2 files changed, 22 insertions(+), 3 deletions(-) + +diff --git a/src/ftpd.c b/src/ftpd.c +index c5edac5..b13afc0 100644 +--- a/src/ftpd.c ++++ b/src/ftpd.c +@@ -5589,7 +5589,7 @@ int pureftpd_start(int argc, char *argv[], const char *home_directory_) + #endif + + #ifndef MINIMAL +- if (argc == 2 && *argv[1] != '-' && ++ if (argc >= 2 && *argv[1] != '-' && + sc_build_command_line_from_file(argv[1], NULL, simpleconf_options, + (sizeof simpleconf_options) / + (sizeof simpleconf_options[0]), +diff --git a/src/simpleconf.c b/src/simpleconf.c +index f296f54..505aee1 100644 +--- a/src/simpleconf.c ++++ b/src/simpleconf.c +@@ -674,9 +674,10 @@ sc_build_command_line_from_file(const char *file_name, + { + char **argv = NULL; + int argc = 0; ++ char **argv_tmp = NULL; ++ char *arg = NULL; ++ int i; + +- *argc_p = 0; +- *argv_p = NULL; + if ((argv = malloc(sizeof *argv)) == NULL || + (app_name = strdup(app_name)) == NULL) { + sc_argv_free(argc, argv); +@@ -689,6 +690,24 @@ sc_build_command_line_from_file(const char *file_name, + sc_argv_free(argc, argv); + return -1; + } ++ ++ for (i = 2; i < *argc_p; ++i) { ++ ++argc; ++ arg = strdup((*argv_p)[i]); ++ if (arg == NULL) { ++ return -1; ++ } ++ if ((argv_tmp = realloc(argv, (sizeof arg) * ++ ((size_t) argc + 1))) == NULL) { ++ return -1; ++ } ++ argv = argv_tmp; ++ argv[argc - 1] = arg; ++ } ++ if (*argc_p > 2) { ++ argv[argc] = NULL; ++ } ++ + *argc_p = argc; + *argv_p = argv; + +-- +2.9.5 + diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 4029a2e..6dd3e26 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.46 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -16,6 +16,7 @@ Source6: pure-ftpd.README.SELinux Source7: pure-ftpd.pureftpd.te Patch0: 0001-modify-pam.patch Patch1: 0002-fedora-specific-config-file.patch +Patch2: 0003-Allow-having-both-options-and-config-file-on-command.patch Provides: ftpserver BuildRequires: pam-devel, libcap-devel @@ -243,6 +244,10 @@ fi %changelog +* Thu Sep 14 2017 OndÅ™ej LysonÄ›k - 1.0.46-2 +- Fix loading the configuration file +- Drop unsupported UseFtpUsers option from configuration file + * Mon Aug 14 2017 Martin Sehnoutka - 1.0.46-1 - Rebase to 1.0.46 From 0a05cb720cdb07623fe5e1b500a631390f760d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Wed, 25 Oct 2017 13:52:13 +0200 Subject: [PATCH 080/122] Generate the TLS certificate using sscg in an initialization systemd service This is required by https://fedoraproject.org/wiki/Packaging:Initial_Service_Setup --- pure-ftpd-with-tls-init.service | 10 ++++++++++ pure-ftpd-with-tls.service | 12 ++++++++++++ pure-ftpd.spec | 34 +++++++++++++++++++++------------ 3 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 pure-ftpd-with-tls-init.service create mode 100644 pure-ftpd-with-tls.service diff --git a/pure-ftpd-with-tls-init.service b/pure-ftpd-with-tls-init.service new file mode 100644 index 0000000..aab2191 --- /dev/null +++ b/pure-ftpd-with-tls-init.service @@ -0,0 +1,10 @@ +[Unit] +Description=One-time configuration for pure-ftpd + +ConditionPathExists=|!/etc/pki/pure-ftpd/pure-ftpd.pem + +[Service] +Type=oneshot +RemainAfterExit=no + +ExecStart=/usr/bin/sscg --ca-file /etc/pki/pure-ftpd/ca.crt --cert-file /etc/pki/pure-ftpd/pure-ftpd.pem --cert-key-file /etc/pki/pure-ftpd/pure-ftpd.pem diff --git a/pure-ftpd-with-tls.service b/pure-ftpd-with-tls.service new file mode 100644 index 0000000..95d982c --- /dev/null +++ b/pure-ftpd-with-tls.service @@ -0,0 +1,12 @@ +[Unit] +Description=Pure-FTPd FTP server +After=syslog.target network.target pure-ftpd-init.service +Requires=pure-ftpd-init.service + +[Service] +Type=forking +PIDFile=/var/run/pure-ftpd.pid +ExecStart=/usr/sbin/pure-ftpd /etc/pure-ftpd/pure-ftpd.conf --daemonize + +[Install] +WantedBy=multi-user.target diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 6dd3e26..b76e3ae 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.46 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -14,6 +14,8 @@ Source4: pure-ftpd.pure-ftpwho.pam Source5: pure-ftpd.pure-ftpwho.consoleapp Source6: pure-ftpd.README.SELinux Source7: pure-ftpd.pureftpd.te +Source8: pure-ftpd-with-tls-init.service +Source9: pure-ftpd-with-tls.service Patch0: 0001-modify-pam.patch Patch1: 0002-fedora-specific-config-file.patch Patch2: 0003-Allow-having-both-options-and-config-file-on-command.patch @@ -32,6 +34,7 @@ Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units Requires: logrotate, usermode +%{!?_without_tls:Requires: sscg} %description @@ -131,8 +134,13 @@ install -p -m 644 man/pure-statsdecode.8 $RPM_BUILD_ROOT%{_mandir}/man8 install -p -m 644 man/pure-quotacheck.8 $RPM_BUILD_ROOT%{_mandir}/man8 install -p -m 644 man/pure-authd.8 $RPM_BUILD_ROOT%{_mandir}/man8 -# Init script -install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service +# Systemd services +%if 0%{!?_without_tls:1} +install -p -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_unitdir}/pure-ftpd-init.service +install -p -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_unitdir}/pure-ftpd.service +%else +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/pure-ftpd.service +%endif # Pam install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/pam.d @@ -170,14 +178,6 @@ install -p -m 644 pureftpd.schema $RPM_BUILD_ROOT%{_docdir}/%{name} %post %systemd_post pure-ftpd.service -%if 0%{!?_without_tls:1} -# TLS Certificate -if [ ! -f %{_sysconfdir}/pki/%{name}/%{name}.pem ]; then - %{_bindir}/make-dummy-cert \ - %{_sysconfdir}/pki/%{name}/%{name}.pem -fi -%endif - %preun %systemd_preun pure-ftpd.service @@ -226,7 +226,12 @@ fi %doc pureftpd.schema %{_bindir}/pure-* %{_sbindir}/pure-* -%{_unitdir}/%{name}.service +%if 0%{!?_without_tls:1} + %{_unitdir}/pure-ftpd-init.service + %{_unitdir}/pure-ftpd.service +%else + %{_unitdir}/pure-ftpd.service +%endif %config(noreplace) %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} @@ -244,6 +249,11 @@ fi %changelog +* Wed Oct 25 2017 OndÅ™ej LysonÄ›k - 1.0.46-3 +- Generate the TLS certificate using sscg in an initialization systemd service +- This is required by +- https://fedoraproject.org/wiki/Packaging:Initial_Service_Setup + * Thu Sep 14 2017 OndÅ™ej LysonÄ›k - 1.0.46-2 - Fix loading the configuration file - Drop unsupported UseFtpUsers option from configuration file From 7b8008a043645df482f2f64af6ccf6c03e371d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Wed, 25 Oct 2017 15:09:47 +0200 Subject: [PATCH 081/122] Depend on mariadb-connector-c-devel instead of mysql-devel Resolves: rhbz#1493658 --- pure-ftpd.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index b76e3ae..e6e7c60 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.46 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -23,7 +23,7 @@ Patch2: 0003-Allow-having-both-options-and-config-file-on-command.patch Provides: ftpserver BuildRequires: pam-devel, libcap-devel %{!?_without_ldap:BuildRequires: openldap-devel} -%{!?_without_mysql:BuildRequires: mysql-devel} +%{!?_without_mysql:BuildRequires: mariadb-connector-c-devel} %{!?_without_pgsql:BuildRequires: postgresql-devel} %{!?_without_tls:BuildRequires: openssl-devel} BuildRequires: checkpolicy, selinux-policy-devel @@ -249,6 +249,10 @@ fi %changelog +* Wed Oct 25 2017 OndÅ™ej LysonÄ›k - 1.0.46-4 +- Depend on mariadb-connector-c-devel instead of mysql-devel +- Resolves: rhbz#1493658 + * Wed Oct 25 2017 OndÅ™ej LysonÄ›k - 1.0.46-3 - Generate the TLS certificate using sscg in an initialization systemd service - This is required by From 92a7148671efa83943790381322765557a1ba3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 20 Jan 2018 23:07:38 +0100 Subject: [PATCH 082/122] Rebuilt for switch to libxcrypt --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index e6e7c60..fbfad11 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.46 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -249,6 +249,9 @@ fi %changelog +* Sat Jan 20 2018 Björn Esser - 1.0.46-5 +- Rebuilt for switch to libxcrypt + * Wed Oct 25 2017 OndÅ™ej LysonÄ›k - 1.0.46-4 - Depend on mariadb-connector-c-devel instead of mysql-devel - Resolves: rhbz#1493658 From 5be41d7de13ac9803ebf97b9a2356085d3bb9064 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 05:59:33 +0000 Subject: [PATCH 083/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index fbfad11..e837f99 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.46 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -249,6 +249,9 @@ fi %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 1.0.46-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Sat Jan 20 2018 Björn Esser - 1.0.46-5 - Rebuilt for switch to libxcrypt From c4e0ccede6c53159d6b4584e0e4897cd03fb10d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 13 Feb 2018 12:13:40 +0100 Subject: [PATCH 084/122] New version Dropped patch 0003-Allow-having-both-options-and-config-file-on-command.patch as it was rejected by upstream. Complain when invalid or excessive arguments are given on the command line. Resolves: rhbz#1508220 --- .gitignore | 1 + ...when-given-an-invalid-cmdline-option.patch | 25 ++ ...th-options-and-config-file-are-given.patch | 237 ++++++++++++++++++ 0002-fedora-specific-config-file.patch | 31 ++- pure-ftpd-with-tls.service | 2 +- pure-ftpd.service | 2 +- pure-ftpd.spec | 15 +- pure-ftpd.xinetd | 2 +- sources | 2 +- 9 files changed, 299 insertions(+), 18 deletions(-) create mode 100644 0001-Exit-when-given-an-invalid-cmdline-option.patch create mode 100644 0002-Complain-when-both-options-and-config-file-are-given.patch diff --git a/.gitignore b/.gitignore index 52988ca..3c3f0e2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.40.tar.bz2 /pure-ftpd-1.0.42.tar.bz2 /pure-ftpd-1.0.46.tar.bz2 +/pure-ftpd-1.0.47.tar.bz2 diff --git a/0001-Exit-when-given-an-invalid-cmdline-option.patch b/0001-Exit-when-given-an-invalid-cmdline-option.patch new file mode 100644 index 0000000..2e069d8 --- /dev/null +++ b/0001-Exit-when-given-an-invalid-cmdline-option.patch @@ -0,0 +1,25 @@ +From 8b6e9370ccbdff47107963c352caab24fdb0fcaa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Wed, 7 Feb 2018 13:28:02 +0100 +Subject: [PATCH 1/2] Exit when given an invalid cmdline option + +--- + src/ftpd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ftpd.c b/src/ftpd.c +index e19d8de..5c77410 100644 +--- a/src/ftpd.c ++++ b/src/ftpd.c +@@ -6192,7 +6192,7 @@ int pureftpd_start(int argc, char *argv[], const char *home_directory_) + exit(EXIT_SUCCESS); + } + default: +- logfile(LOG_WARNING, MSG_ILLEGAL_OPTION); ++ die(421, LOG_ERR, MSG_ILLEGAL_OPTION); + } + } + #ifdef WITH_RFC2640 +-- +2.14.3 + diff --git a/0002-Complain-when-both-options-and-config-file-are-given.patch b/0002-Complain-when-both-options-and-config-file-are-given.patch new file mode 100644 index 0000000..12169f7 --- /dev/null +++ b/0002-Complain-when-both-options-and-config-file-are-given.patch @@ -0,0 +1,237 @@ +From 4328fd5142d0f981687a484f4be34333432d27d1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Wed, 7 Feb 2018 15:05:25 +0100 +Subject: [PATCH 2/2] Complain when both options and config file are given on + cmdline + +--- + src/ftpd.c | 3 +++ + src/messages_cs_cz.h | 1 + + src/messages_da.h | 1 + + src/messages_de.h | 1 + + src/messages_en.h | 1 + + src/messages_es.h | 1 + + src/messages_fr.h | 1 + + src/messages_fr_funny.h | 1 + + src/messages_hu.h | 1 + + src/messages_it.h | 1 + + src/messages_kr.h | 1 + + src/messages_nl.h | 1 + + src/messages_no.h | 1 + + src/messages_pl.h | 1 + + src/messages_pt_br.h | 1 + + src/messages_ro.h | 1 + + src/messages_ru.h | 1 + + src/messages_sk.h | 1 + + src/messages_sv.h | 1 + + src/messages_tr.h | 1 + + src/messages_zh_cn.h | 1 + + src/messages_zh_tw.h | 1 + + 22 files changed, 24 insertions(+) + +diff --git a/src/ftpd.c b/src/ftpd.c +index 5c77410..3f474d2 100644 +--- a/src/ftpd.c ++++ b/src/ftpd.c +@@ -6195,6 +6195,9 @@ int pureftpd_start(int argc, char *argv[], const char *home_directory_) + die(421, LOG_ERR, MSG_ILLEGAL_OPTION); + } + } ++ if (optind < argc) { ++ die(421, LOG_ERR, MSG_INVALID_ARGUMENT, argv[optind]); ++ } + #ifdef WITH_RFC2640 + if (charset_fs == NULL) { + charset_fs = (char *) "utf-8"; +diff --git a/src/messages_cs_cz.h b/src/messages_cs_cz.h +index ef225ba..e103b37 100644 +--- a/src/messages_cs_cz.h ++++ b/src/messages_cs_cz.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Neplatný argument: \"%s\"" +diff --git a/src/messages_da.h b/src/messages_da.h +index ed6f77c..c79ad5a 100644 +--- a/src/messages_da.h ++++ b/src/messages_da.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_de.h b/src/messages_de.h +index e7ae9a9..cd6bc08 100644 +--- a/src/messages_de.h ++++ b/src/messages_de.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_en.h b/src/messages_en.h +index e980131..cb9abf3 100644 +--- a/src/messages_en.h ++++ b/src/messages_en.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_es.h b/src/messages_es.h +index 0c27d4f..60ed849 100644 +--- a/src/messages_es.h ++++ b/src/messages_es.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_fr.h b/src/messages_fr.h +index 7f41dae..a012c05 100644 +--- a/src/messages_fr.h ++++ b/src/messages_fr.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT doit etre precede d'une commande PBSZ reussie" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP n'a pas retourne d'attribut userPassword, verifiez les droits d'acces LDAP." + #define MSG_LDAP_INVALID_AUTH_METHOD "Methode LDAPAuthMethod invalide dans le fichier de configuration. Ce doit etre 'bind' ou 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_fr_funny.h b/src/messages_fr_funny.h +index c77e5bc..dff760b 100644 +--- a/src/messages_fr_funny.h ++++ b/src/messages_fr_funny.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT ca marche qu'apres un PBSZ reussi" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP n'a pas retourne d'attribut userPassword, ptet que les droits d'acces LDAP chient." + #define MSG_LDAP_INVALID_AUTH_METHOD "LDAPAuthMethod dans le fichier de conf, ca doit etre 'bind' ou 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_hu.h b/src/messages_hu.h +index b3beead..7c5a101 100644 +--- a/src/messages_hu.h ++++ b/src/messages_hu.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_it.h b/src/messages_it.h +index 4e6e984..e30f517 100644 +--- a/src/messages_it.h ++++ b/src/messages_it.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_kr.h b/src/messages_kr.h +index 14d8300..c9faead 100644 +--- a/src/messages_kr.h ++++ b/src/messages_kr.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_nl.h b/src/messages_nl.h +index 77efbb4..5a60d9e 100644 +--- a/src/messages_nl.h ++++ b/src/messages_nl.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "Geen userPassword attribuut aangetroffen. Controleer de toegangsrechten." + #define MSG_LDAP_INVALID_AUTH_METHOD "Onjuiste LDAPAuthMethod in de configuratie. Moet 'bind' of 'password' zijn." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_no.h b/src/messages_no.h +index f0be1b4..4c84405 100644 +--- a/src/messages_no.h ++++ b/src/messages_no.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_pl.h b/src/messages_pl.h +index c0be4d8..89d5af1 100644 +--- a/src/messages_pl.h ++++ b/src/messages_pl.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_pt_br.h b/src/messages_pt_br.h +index e5557b9..1dcfb64 100644 +--- a/src/messages_pt_br.h ++++ b/src/messages_pt_br.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_ro.h b/src/messages_ro.h +index 7bbcefe..da16a49 100644 +--- a/src/messages_ro.h ++++ b/src/messages_ro.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_ru.h b/src/messages_ru.h +index e0c1842..f0e4031 100644 +--- a/src/messages_ru.h ++++ b/src/messages_ru.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_sk.h b/src/messages_sk.h +index 24eca1b..e0ddd2a 100644 +--- a/src/messages_sk.h ++++ b/src/messages_sk.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_sv.h b/src/messages_sv.h +index b55c474..be4bbc1 100644 +--- a/src/messages_sv.h ++++ b/src/messages_sv.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_tr.h b/src/messages_tr.h +index 7d6db57..3ee84d2 100644 +--- a/src/messages_tr.h ++++ b/src/messages_tr.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_zh_cn.h b/src/messages_zh_cn.h +index a8bfc6c..93844fd 100644 +--- a/src/messages_zh_cn.h ++++ b/src/messages_zh_cn.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +diff --git a/src/messages_zh_tw.h b/src/messages_zh_tw.h +index db99719..05581bb 100644 +--- a/src/messages_zh_tw.h ++++ b/src/messages_zh_tw.h +@@ -227,3 +227,4 @@ + #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" + #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." + #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." ++#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" +-- +2.14.3 + diff --git a/0002-fedora-specific-config-file.patch b/0002-fedora-specific-config-file.patch index 725184c..e50a695 100644 --- a/0002-fedora-specific-config-file.patch +++ b/0002-fedora-specific-config-file.patch @@ -1,14 +1,14 @@ -From 5023020a73f60d4d512f934cfb67d94d1efd921c Mon Sep 17 00:00:00 2001 +From 23e169081a6cff2b73e521991fd9e260b49e80fa Mon Sep 17 00:00:00 2001 From: rpm-build Date: Thu, 14 Sep 2017 16:41:12 +0200 Subject: [PATCH] fedora specific config file --- - pure-ftpd.conf.in | 29 ++++++++++++++--------------- - 1 file changed, 14 insertions(+), 15 deletions(-) + pure-ftpd.conf.in | 31 +++++++++++++++---------------- + 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/pure-ftpd.conf.in b/pure-ftpd.conf.in -index fbaf9b4..b4d6837 100644 +index a327844..597ed59 100644 --- a/pure-ftpd.conf.in +++ b/pure-ftpd.conf.in @@ -9,7 +9,7 @@ @@ -20,6 +20,15 @@ index fbaf9b4..b4d6837 100644 # # Online documentation: # https://www.pureftpd.org/project/pure-ftpd/doc +@@ -42,7 +42,7 @@ MaxClientsNumber 50 + + + # Run as a background process +- ++# Important: this must be set to 'yes' for the systemd service to work. + Daemonize yes + + @@ -106,34 +106,34 @@ MaxIdleTime 15 # LDAP configuration file (see README.LDAP) @@ -61,9 +70,9 @@ index fbaf9b4..b4d6837 100644 -@@ -236,8 +236,7 @@ Umask 133:022 - - # Minimum UID for an authenticated user to log in. +@@ -238,8 +238,7 @@ Umask 133:022 + # For example, a value of 100 prevents all users whose user id is below + # 100 from logging in. If you want "root" to be able to log in, use 0. -MinUID 100 - @@ -71,7 +80,7 @@ index fbaf9b4..b4d6837 100644 # Allow FXP transfers for authenticated users. -@@ -275,7 +274,7 @@ AutoRename no +@@ -277,7 +276,7 @@ AutoRename no # Prevent anonymous users from uploading new files (no = upload is allowed) @@ -80,7 +89,7 @@ index fbaf9b4..b4d6837 100644 -@@ -299,21 +298,21 @@ AnonymousCantUpload no +@@ -301,21 +300,21 @@ AnonymousCantUpload no # fw.c9x.org - jedi [13/Apr/2017:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338 # This log file can then be processed by common HTTP traffic analyzers. @@ -105,7 +114,7 @@ index fbaf9b4..b4d6837 100644 -@@ -344,9 +343,9 @@ AnonymousCantUpload no +@@ -346,9 +345,9 @@ AnonymousCantUpload no # If your pure-ftpd has been compiled with standalone support, you can change @@ -118,5 +127,5 @@ index fbaf9b4..b4d6837 100644 -- -2.9.5 +2.14.3 diff --git a/pure-ftpd-with-tls.service b/pure-ftpd-with-tls.service index 95d982c..d7abfec 100644 --- a/pure-ftpd-with-tls.service +++ b/pure-ftpd-with-tls.service @@ -6,7 +6,7 @@ Requires=pure-ftpd-init.service [Service] Type=forking PIDFile=/var/run/pure-ftpd.pid -ExecStart=/usr/sbin/pure-ftpd /etc/pure-ftpd/pure-ftpd.conf --daemonize +ExecStart=/usr/sbin/pure-ftpd /etc/pure-ftpd/pure-ftpd.conf [Install] WantedBy=multi-user.target diff --git a/pure-ftpd.service b/pure-ftpd.service index c26bfb6..05bb621 100644 --- a/pure-ftpd.service +++ b/pure-ftpd.service @@ -5,7 +5,7 @@ After=syslog.target network.target [Service] Type=forking PIDFile=/var/run/pure-ftpd.pid -ExecStart=/usr/sbin/pure-ftpd /etc/pure-ftpd/pure-ftpd.conf --daemonize +ExecStart=/usr/sbin/pure-ftpd /etc/pure-ftpd/pure-ftpd.conf [Install] WantedBy=multi-user.target diff --git a/pure-ftpd.spec b/pure-ftpd.spec index e837f99..2d3fbcd 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.46 -Release: 6%{?dist} +Version: 1.0.47 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -18,7 +18,10 @@ Source8: pure-ftpd-with-tls-init.service Source9: pure-ftpd-with-tls.service Patch0: 0001-modify-pam.patch Patch1: 0002-fedora-specific-config-file.patch -Patch2: 0003-Allow-having-both-options-and-config-file-on-command.patch +# Upstream patch: +Patch2: 0001-Exit-when-given-an-invalid-cmdline-option.patch +# Upstream patch: +Patch3: 0002-Complain-when-both-options-and-config-file-are-given.patch Provides: ftpserver BuildRequires: pam-devel, libcap-devel @@ -249,6 +252,12 @@ fi %changelog +* Tue Feb 13 2018 OndÅ™ej LysonÄ›k - 1.0.47-1 +- New version +- Dropped patch 0003-Allow-having-both-options-and-config-file-on-command.patch + as it was rejected by upstream +- Complain when invalid or excessive arguments are given on the command line + * Fri Feb 09 2018 Fedora Release Engineering - 1.0.46-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/pure-ftpd.xinetd b/pure-ftpd.xinetd index e980e94..f3d3015 100644 --- a/pure-ftpd.xinetd +++ b/pure-ftpd.xinetd @@ -9,7 +9,7 @@ service ftp socket_type = stream wait = no user = root - server = /usr/sbin/pure-config.pl + server = /usr/sbin/pure-ftpd server_args = /etc/pure-ftpd/pure-ftpd.conf log_on_success += DURATION USERID log_on_failure += USERID diff --git a/sources b/sources index d223bc2..a5bbab1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pure-ftpd-1.0.46.tar.bz2) = e44c1842e6f101f4d7dd42617392f3d54ff58d68608f6a3bc5e612fc89bfd1da6935215a7e87c0d2bbd9fc9f0fa31a40ceb764fd67428dfdd8c5454e0d64e0ab +SHA512 (pure-ftpd-1.0.47.tar.bz2) = c1920a3f67f04635fde600fe226a7730b801e7e64658b25f1d9f9c0b35a704664be4adfb0b291594f7e0f10beade25eae9a5e6cc3b6777a3b413f3c2d9574e63 From b1400ae94bc5bec7b9501d84ce2c5d2ba315b3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 13 Feb 2018 14:45:02 +0100 Subject: [PATCH 085/122] Remove 0003-Allow-having-both-options-and-config-file-on-command.patch from the repo --- ...h-options-and-config-file-on-command.patch | 68 ------------------- 1 file changed, 68 deletions(-) delete mode 100644 0003-Allow-having-both-options-and-config-file-on-command.patch diff --git a/0003-Allow-having-both-options-and-config-file-on-command.patch b/0003-Allow-having-both-options-and-config-file-on-command.patch deleted file mode 100644 index 7eb99b2..0000000 --- a/0003-Allow-having-both-options-and-config-file-on-command.patch +++ /dev/null @@ -1,68 +0,0 @@ -From f5617a4de54c313580fe39562f0d32e5c95f5212 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Thu, 14 Sep 2017 01:05:53 +0200 -Subject: [PATCH] Allow having both options and config file on command line - ---- - src/ftpd.c | 2 +- - src/simpleconf.c | 23 +++++++++++++++++++++-- - 2 files changed, 22 insertions(+), 3 deletions(-) - -diff --git a/src/ftpd.c b/src/ftpd.c -index c5edac5..b13afc0 100644 ---- a/src/ftpd.c -+++ b/src/ftpd.c -@@ -5589,7 +5589,7 @@ int pureftpd_start(int argc, char *argv[], const char *home_directory_) - #endif - - #ifndef MINIMAL -- if (argc == 2 && *argv[1] != '-' && -+ if (argc >= 2 && *argv[1] != '-' && - sc_build_command_line_from_file(argv[1], NULL, simpleconf_options, - (sizeof simpleconf_options) / - (sizeof simpleconf_options[0]), -diff --git a/src/simpleconf.c b/src/simpleconf.c -index f296f54..505aee1 100644 ---- a/src/simpleconf.c -+++ b/src/simpleconf.c -@@ -674,9 +674,10 @@ sc_build_command_line_from_file(const char *file_name, - { - char **argv = NULL; - int argc = 0; -+ char **argv_tmp = NULL; -+ char *arg = NULL; -+ int i; - -- *argc_p = 0; -- *argv_p = NULL; - if ((argv = malloc(sizeof *argv)) == NULL || - (app_name = strdup(app_name)) == NULL) { - sc_argv_free(argc, argv); -@@ -689,6 +690,24 @@ sc_build_command_line_from_file(const char *file_name, - sc_argv_free(argc, argv); - return -1; - } -+ -+ for (i = 2; i < *argc_p; ++i) { -+ ++argc; -+ arg = strdup((*argv_p)[i]); -+ if (arg == NULL) { -+ return -1; -+ } -+ if ((argv_tmp = realloc(argv, (sizeof arg) * -+ ((size_t) argc + 1))) == NULL) { -+ return -1; -+ } -+ argv = argv_tmp; -+ argv[argc - 1] = arg; -+ } -+ if (*argc_p > 2) { -+ argv[argc] = NULL; -+ } -+ - *argc_p = argc; - *argv_p = argv; - --- -2.9.5 - From 19810353e47a3fabcbadef6142e1369ee3075911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Mon, 19 Feb 2018 14:52:33 +0100 Subject: [PATCH 086/122] Add gcc to BuildRequires --- pure-ftpd.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 2d3fbcd..eecef77 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.47 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -32,6 +32,7 @@ BuildRequires: pam-devel, libcap-devel BuildRequires: checkpolicy, selinux-policy-devel BuildRequires: systemd-units BuildRequires: git +BuildRequires: gcc Requires(post): systemd-sysv Requires(post): systemd-units Requires(preun): systemd-units @@ -252,6 +253,9 @@ fi %changelog +* Mon Feb 19 2018 OndÅ™ej LysonÄ›k - 1.0.47-2 +- Add gcc to BuildRequires + * Tue Feb 13 2018 OndÅ™ej LysonÄ›k - 1.0.47-1 - New version - Dropped patch 0003-Allow-having-both-options-and-config-file-on-command.patch From ac1fd363aecb17a1d57cbe49baf462088fa4d8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Thu, 15 Mar 2018 17:21:18 +0100 Subject: [PATCH 087/122] Increase max size of process's data segment Apply upstream patch to increase the size limit of the process's data segment. Upstream bug report: https://github.com/jedisct1/pure-ftpd/issues/82 Resolves: rhbz#1490354 --- ...TA_SIZE-due-to-Argon2id-requirements.patch | 25 +++++++++++++++++++ pure-ftpd.spec | 9 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch diff --git a/0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch b/0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch new file mode 100644 index 0000000..f9545bd --- /dev/null +++ b/0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch @@ -0,0 +1,25 @@ +From 27a5c200f9643ce907118aad169279b3a66a9e8a Mon Sep 17 00:00:00 2001 +From: Frank Denis +Date: Sat, 4 Nov 2017 20:46:16 +0100 +Subject: [PATCH] Increase MAX_DATA_SIZE due to Argon2id requirements + +--- + src/ftpd.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ftpd.h b/src/ftpd.h +index 1beeab8..5bb1f6b 100644 +--- a/src/ftpd.h ++++ b/src/ftpd.h +@@ -557,7 +557,7 @@ Your platform has a very large PATH_MAX, we should not trust it. + + #ifndef MAX_DATA_SIZE + # ifdef HAVE_LIBSODIUM +-# define MAX_DATA_SIZE (40 * 1024 * 1024) ++# define MAX_DATA_SIZE (70 * 1024 * 1024) + # elif defined(WITH_LDAP) || defined(WITH_MYSQL) || defined(WITH_PGSQL) + # define MAX_DATA_SIZE (16 * 1024 * 1024) /* Max memory usage - SQL/LDAP need more */ + # else +-- +2.14.3 + diff --git a/pure-ftpd.spec b/pure-ftpd.spec index eecef77..02eb8db 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.47 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -22,6 +22,8 @@ Patch1: 0002-fedora-specific-config-file.patch Patch2: 0001-Exit-when-given-an-invalid-cmdline-option.patch # Upstream patch: Patch3: 0002-Complain-when-both-options-and-config-file-are-given.patch +# Upstream patch: +Patch4: 0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch Provides: ftpserver BuildRequires: pam-devel, libcap-devel @@ -253,6 +255,11 @@ fi %changelog +* Thu Mar 15 2018 OndÅ™ej LysonÄ›k - 1.0.47-3 +- Apply upstream patch to increase the size limit of the process's data segment +- https://github.com/jedisct1/pure-ftpd/issues/82 +- Resolves: rhbz#1490354 + * Mon Feb 19 2018 OndÅ™ej LysonÄ›k - 1.0.47-2 - Add gcc to BuildRequires From 0e9f57032281024755cf1e91b1010ab86fa212a4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 23:00:44 +0000 Subject: [PATCH 088/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 02eb8db..50da87b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.47 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server Group: System Environment/Daemons @@ -255,6 +255,9 @@ fi %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1.0.47-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Thu Mar 15 2018 OndÅ™ej LysonÄ›k - 1.0.47-3 - Apply upstream patch to increase the size limit of the process's data segment - https://github.com/jedisct1/pure-ftpd/issues/82 From 67313c1a47d588bd52bec374312586ccddf61266 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 6 Sep 2018 10:10:15 +0200 Subject: [PATCH 089/122] BuildRequires: s/postgresql-devel/libpq-devel/ That's because we moved libpq.so.5 into libpq package. Related: rhbz#1618698, rhbz#1623764 --- pure-ftpd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 50da87b..3dd1b75 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -29,7 +29,7 @@ Provides: ftpserver BuildRequires: pam-devel, libcap-devel %{!?_without_ldap:BuildRequires: openldap-devel} %{!?_without_mysql:BuildRequires: mariadb-connector-c-devel} -%{!?_without_pgsql:BuildRequires: postgresql-devel} +%{!?_without_pgsql:BuildRequires: libpq-devel} %{!?_without_tls:BuildRequires: openssl-devel} BuildRequires: checkpolicy, selinux-policy-devel BuildRequires: systemd-units From 1a87daeffae5fc92d0498f4660b645dd2c21acfd Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 18 Nov 2018 22:35:35 +0000 Subject: [PATCH 090/122] Drop sysv legacy bits --- pure-ftpd-with-tls-init.service | 10 ------- pure-ftpd.spec | 52 +++++++++------------------------ pure-ftpd.xinetd | 17 ----------- 3 files changed, 14 insertions(+), 65 deletions(-) delete mode 100644 pure-ftpd-with-tls-init.service delete mode 100644 pure-ftpd.xinetd diff --git a/pure-ftpd-with-tls-init.service b/pure-ftpd-with-tls-init.service deleted file mode 100644 index aab2191..0000000 --- a/pure-ftpd-with-tls-init.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=One-time configuration for pure-ftpd - -ConditionPathExists=|!/etc/pki/pure-ftpd/pure-ftpd.pem - -[Service] -Type=oneshot -RemainAfterExit=no - -ExecStart=/usr/bin/sscg --ca-file /etc/pki/pure-ftpd/ca.crt --cert-file /etc/pki/pure-ftpd/pure-ftpd.pem --cert-key-file /etc/pki/pure-ftpd/pure-ftpd.pem diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 3dd1b75..5c6c3dc 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,20 +1,17 @@ Name: pure-ftpd Version: 1.0.47 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Lightweight, fast and secure FTP server - -Group: System Environment/Daemons License: BSD URL: http://www.pureftpd.org + Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-%{version}.tar.bz2 Source1: pure-ftpd.service Source2: pure-ftpd.logrotate -Source3: pure-ftpd.xinetd Source4: pure-ftpd.pure-ftpwho.pam Source5: pure-ftpd.pure-ftpwho.consoleapp Source6: pure-ftpd.README.SELinux Source7: pure-ftpd.pureftpd.te -Source8: pure-ftpd-with-tls-init.service Source9: pure-ftpd-with-tls.service Patch0: 0001-modify-pam.patch Patch1: 0002-fedora-specific-config-file.patch @@ -32,13 +29,12 @@ BuildRequires: pam-devel, libcap-devel %{!?_without_pgsql:BuildRequires: libpq-devel} %{!?_without_tls:BuildRequires: openssl-devel} BuildRequires: checkpolicy, selinux-policy-devel -BuildRequires: systemd-units +BuildRequires: systemd BuildRequires: git BuildRequires: gcc -Requires(post): systemd-sysv -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd Requires: logrotate, usermode %{!?_without_tls:Requires: sscg} @@ -62,10 +58,9 @@ Rebuild switches: %package selinux Summary: SELinux support for Pure-FTPD -Group: System Environment/Daemons Requires: %{name} = %{version} -Requires(post): policycoreutils, initscripts, %{name} -Requires(preun): policycoreutils, initscripts, %{name} +Requires(post): policycoreutils, %{name} +Requires(preun): policycoreutils, %{name} Requires(postun): policycoreutils %description selinux @@ -142,7 +137,6 @@ install -p -m 644 man/pure-authd.8 $RPM_BUILD_ROOT%{_mandir}/man8 # Systemd services %if 0%{!?_without_tls:1} -install -p -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_unitdir}/pure-ftpd-init.service install -p -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_unitdir}/pure-ftpd.service %else install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/pure-ftpd.service @@ -156,10 +150,6 @@ install -p -m 644 pam/pure-ftpd $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/ install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} -# xinetd support -install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d -install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name} - # pure-ftpwho and non-root users install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/pure-ftpwho @@ -195,14 +185,14 @@ install -p -m 644 pureftpd.schema $RPM_BUILD_ROOT%{_docdir}/%{name} if [ "$1" -le "1" ]; then # Fist install semodule -i %{_datadir}/selinux/packages/%{name}/pureftpd.pp 2>/dev/null || : fixfiles -R pure-ftpd restore || : - /sbin/service pure-ftpd condrestart > /dev/null 2>&1 || : + /bin/systemctl condrestart pure-ftpd > /dev/null 2>&1 || : fi %preun selinux if [ "$1" -lt "1" ]; then # Final removal semodule -r pureftpd 2>/dev/null || : fixfiles -R pure-ftpd restore || : - /sbin/service pure-ftpd condrestart > /dev/null 2>&1 || : + /bin/systemctl condrestart pure-ftpd > /dev/null 2>&1 || : fi %postun selinux @@ -213,17 +203,6 @@ if [ "$1" -ge "1" ]; then # Upgrade fi -%triggerun -- pure-ftpd < 1.0.32-2 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply pure-ftpd -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save pure-ftpd >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del pure-ftpd >/dev/null 2>&1 || : -/bin/systemctl try-restart pure-ftpd.service >/dev/null 2>&1 || : - - %files %doc FAQ THANKS AUTHORS CONTACT HISTORY NEWS %doc README README.Authentication-Modules README.Configuration-File @@ -232,16 +211,10 @@ fi %doc pureftpd.schema %{_bindir}/pure-* %{_sbindir}/pure-* -%if 0%{!?_without_tls:1} - %{_unitdir}/pure-ftpd-init.service - %{_unitdir}/pure-ftpd.service -%else - %{_unitdir}/pure-ftpd.service -%endif +%{_unitdir}/pure-ftpd.service %config(noreplace) %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%config(noreplace) %{_sysconfdir}/xinetd.d/%{name} %config(noreplace) %{_sysconfdir}/pam.d/pure-ftpwho %config(noreplace) %{_sysconfdir}/security/console.apps/pure-ftpwho %{!?_without_tls:%{_sysconfdir}/pki/%{name}} @@ -255,6 +228,9 @@ fi %changelog +* Sun Nov 18 2018 Peter Robinson 1.0.47-5 +- Drop sysv legacy bits + * Fri Jul 13 2018 Fedora Release Engineering - 1.0.47-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/pure-ftpd.xinetd b/pure-ftpd.xinetd deleted file mode 100644 index f3d3015..0000000 --- a/pure-ftpd.xinetd +++ /dev/null @@ -1,17 +0,0 @@ -# default: off -# description: pure-ftpd server, xinetd version. \ -# Don't run the standalone version if you run \ -# this and remember do set "Daemonize" to "no" \ -# in /etc/pure-ftpd/pure-ftpd.conf -service ftp -{ - disable = yes - socket_type = stream - wait = no - user = root - server = /usr/sbin/pure-ftpd - server_args = /etc/pure-ftpd/pure-ftpd.conf - log_on_success += DURATION USERID - log_on_failure += USERID - nice = 10 -} From a887e6bdeb0158a22e971b49fefc6166f158e240 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 19 Nov 2018 22:27:23 +0000 Subject: [PATCH 091/122] Fix for oversight in previous change --- pure-ftpd-with-tls-init.service | 10 ++++++++++ pure-ftpd.spec | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 pure-ftpd-with-tls-init.service diff --git a/pure-ftpd-with-tls-init.service b/pure-ftpd-with-tls-init.service new file mode 100644 index 0000000..aab2191 --- /dev/null +++ b/pure-ftpd-with-tls-init.service @@ -0,0 +1,10 @@ +[Unit] +Description=One-time configuration for pure-ftpd + +ConditionPathExists=|!/etc/pki/pure-ftpd/pure-ftpd.pem + +[Service] +Type=oneshot +RemainAfterExit=no + +ExecStart=/usr/bin/sscg --ca-file /etc/pki/pure-ftpd/ca.crt --cert-file /etc/pki/pure-ftpd/pure-ftpd.pem --cert-key-file /etc/pki/pure-ftpd/pure-ftpd.pem diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 5c6c3dc..3ac34e9 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.47 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -12,6 +12,7 @@ Source4: pure-ftpd.pure-ftpwho.pam Source5: pure-ftpd.pure-ftpwho.consoleapp Source6: pure-ftpd.README.SELinux Source7: pure-ftpd.pureftpd.te +Source8: pure-ftpd-with-tls-init.service Source9: pure-ftpd-with-tls.service Patch0: 0001-modify-pam.patch Patch1: 0002-fedora-specific-config-file.patch @@ -137,6 +138,7 @@ install -p -m 644 man/pure-authd.8 $RPM_BUILD_ROOT%{_mandir}/man8 # Systemd services %if 0%{!?_without_tls:1} +install -p -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_unitdir}/pure-ftpd-init.service install -p -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_unitdir}/pure-ftpd.service %else install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/pure-ftpd.service @@ -211,7 +213,12 @@ fi %doc pureftpd.schema %{_bindir}/pure-* %{_sbindir}/pure-* +%if 0%{!?_without_tls:1} +%{_unitdir}/pure-ftpd-init.service %{_unitdir}/pure-ftpd.service +%else +%{_unitdir}/pure-ftpd.service +%endif %config(noreplace) %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} @@ -228,6 +235,9 @@ fi %changelog +* Mon Nov 19 2018 Peter Robinson 1.0.47-6 +- Fix for oversight in previous change + * Sun Nov 18 2018 Peter Robinson 1.0.47-5 - Drop sysv legacy bits From 510001054437cae71f76cef74dbc4fb053b57062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 14 Jan 2019 19:13:51 +0100 Subject: [PATCH 092/122] Rebuilt for libcrypt.so.2 (#1666033) --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 3ac34e9..8e8c219 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.47 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -235,6 +235,9 @@ fi %changelog +* Mon Jan 14 2019 Björn Esser - 1.0.47-7 +- Rebuilt for libcrypt.so.2 (#1666033) + * Mon Nov 19 2018 Peter Robinson 1.0.47-6 - Fix for oversight in previous change From f5c72017e3c4248c815b39367cf12e997560d41c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 05:00:55 +0000 Subject: [PATCH 093/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 8e8c219..c26bcb2 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.47 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -235,6 +235,9 @@ fi %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 1.0.47-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Jan 14 2019 Björn Esser - 1.0.47-7 - Rebuilt for libcrypt.so.2 (#1666033) From 926e446efe55258eec6a3a638ed4a5b1e3485120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 5 Feb 2019 16:18:56 +0100 Subject: [PATCH 094/122] Fixed TLSv1.3 support, fixed postgresql authentication Resolves: rhbz#1654838 --- 0001-Fix-postgresql-authenticate-bug.patch | 25 +++++++++++ 0001-TLS1.3-compatibility.patch | 49 ++++++++++++++++++++++ pure-ftpd.spec | 11 ++++- 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-postgresql-authenticate-bug.patch create mode 100644 0001-TLS1.3-compatibility.patch diff --git a/0001-Fix-postgresql-authenticate-bug.patch b/0001-Fix-postgresql-authenticate-bug.patch new file mode 100644 index 0000000..b6044be --- /dev/null +++ b/0001-Fix-postgresql-authenticate-bug.patch @@ -0,0 +1,25 @@ +From 6a256a21e48177e1d73d7e70b2292c76ac40ffb7 Mon Sep 17 00:00:00 2001 +From: t-asaka +Date: Mon, 28 May 2018 22:29:25 +0900 +Subject: [PATCH] Fix postgresql authenticate bug + +--- + src/log_pgsql.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/log_pgsql.c b/src/log_pgsql.c +index 4df654e..3825afb 100644 +--- a/src/log_pgsql.c ++++ b/src/log_pgsql.c +@@ -504,7 +504,7 @@ void pw_pgsql_check(AuthResult * const result, + crypto_crypt++; + crypto_md5++; + crypto_sha1++; +- } else if (strcasecmp(crypto, PASSWD_SQL_ARGON2)) { ++ } else if (strcasecmp(crypto, PASSWD_SQL_ARGON2) == 0) { + crypto_argon2++; + } else if (strcasecmp(crypto, PASSWD_SQL_SCRYPT) == 0) { + crypto_scrypt++; +-- +2.20.1 + diff --git a/0001-TLS1.3-compatibility.patch b/0001-TLS1.3-compatibility.patch new file mode 100644 index 0000000..9604c7a --- /dev/null +++ b/0001-TLS1.3-compatibility.patch @@ -0,0 +1,49 @@ +From 4a495c61ce22c893aed5ee57f6ce0b43c3be59ad Mon Sep 17 00:00:00 2001 +From: Frank Denis +Date: Wed, 19 Sep 2018 23:53:45 +0200 +Subject: [PATCH] TLS1.3 compatibility + +Fixes #94 +--- + src/tls.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/src/tls.c b/src/tls.c +index c693d3b..f383ed9 100644 +--- a/src/tls.c ++++ b/src/tls.c +@@ -228,7 +228,16 @@ static void ssl_info_cb(const SSL *cnx, int where, int ret) + if ((where & SSL_CB_HANDSHAKE_START) != 0) { + if ((cnx == tls_cnx && tls_cnx_handshook != 0) || + (cnx == tls_data_cnx && tls_data_cnx_handshook != 0)) { +- die(400, LOG_ERR, "TLS renegociation"); ++ const SSL_CIPHER *cipher; ++ const char *cipher_version; ++ if ((cipher = SSL_get_current_cipher(cnx)) == NULL || ++ (cipher_version = SSL_CIPHER_get_version(cipher)) == NULL) { ++ die(400, LOG_ERR, "No cipher"); ++ } ++ if (strcmp(cipher_version, "TLSv1.3") != 0) { ++ die(400, LOG_ERR, "TLS renegociation"); ++ return; ++ } + } + return; + } +@@ -264,10 +273,10 @@ int tls_init_library(void) + OpenSSL_add_all_algorithms(); + # else + OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | +- OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); ++ OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); + OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | +- OPENSSL_INIT_ADD_ALL_DIGESTS | +- OPENSSL_INIT_LOAD_CONFIG, NULL); ++ OPENSSL_INIT_ADD_ALL_DIGESTS | ++ OPENSSL_INIT_LOAD_CONFIG, NULL); + # endif + while (RAND_status() == 0) { + rnd = zrand(); +-- +2.20.1 + diff --git a/pure-ftpd.spec b/pure-ftpd.spec index c26bcb2..7116c1b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.47 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -22,6 +22,10 @@ Patch2: 0001-Exit-when-given-an-invalid-cmdline-option.patch Patch3: 0002-Complain-when-both-options-and-config-file-are-given.patch # Upstream patch: Patch4: 0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch +# Upstream patch: +Patch5: 0001-TLS1.3-compatibility.patch +# Upstream patch: +Patch6: 0001-Fix-postgresql-authenticate-bug.patch Provides: ftpserver BuildRequires: pam-devel, libcap-devel @@ -235,6 +239,11 @@ fi %changelog +* Tue Feb 05 2019 OndÅ™ej LysonÄ›k - 1.0.47-9 +- Fixed TLSv1.3 support +- Resolves: rhbz#1654838 +- Fixed postgresql authentication + * Sat Feb 02 2019 Fedora Release Engineering - 1.0.47-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 9911e254ecce86af8ebcec59ad2d2955d902545c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 12 Feb 2019 12:51:37 +0100 Subject: [PATCH 095/122] Temporarily disable TLSv1.3 support until it's fully fixed --- 0001-TLS1.3-compatibility.patch | 49 ------------------- ...-Temporarily-disable-TLSv1.3-support.patch | 30 ++++++++++++ pure-ftpd.spec | 11 +++-- 3 files changed, 38 insertions(+), 52 deletions(-) delete mode 100644 0001-TLS1.3-compatibility.patch create mode 100644 0001-Temporarily-disable-TLSv1.3-support.patch diff --git a/0001-TLS1.3-compatibility.patch b/0001-TLS1.3-compatibility.patch deleted file mode 100644 index 9604c7a..0000000 --- a/0001-TLS1.3-compatibility.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 4a495c61ce22c893aed5ee57f6ce0b43c3be59ad Mon Sep 17 00:00:00 2001 -From: Frank Denis -Date: Wed, 19 Sep 2018 23:53:45 +0200 -Subject: [PATCH] TLS1.3 compatibility - -Fixes #94 ---- - src/tls.c | 17 +++++++++++++---- - 1 file changed, 13 insertions(+), 4 deletions(-) - -diff --git a/src/tls.c b/src/tls.c -index c693d3b..f383ed9 100644 ---- a/src/tls.c -+++ b/src/tls.c -@@ -228,7 +228,16 @@ static void ssl_info_cb(const SSL *cnx, int where, int ret) - if ((where & SSL_CB_HANDSHAKE_START) != 0) { - if ((cnx == tls_cnx && tls_cnx_handshook != 0) || - (cnx == tls_data_cnx && tls_data_cnx_handshook != 0)) { -- die(400, LOG_ERR, "TLS renegociation"); -+ const SSL_CIPHER *cipher; -+ const char *cipher_version; -+ if ((cipher = SSL_get_current_cipher(cnx)) == NULL || -+ (cipher_version = SSL_CIPHER_get_version(cipher)) == NULL) { -+ die(400, LOG_ERR, "No cipher"); -+ } -+ if (strcmp(cipher_version, "TLSv1.3") != 0) { -+ die(400, LOG_ERR, "TLS renegociation"); -+ return; -+ } - } - return; - } -@@ -264,10 +273,10 @@ int tls_init_library(void) - OpenSSL_add_all_algorithms(); - # else - OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | -- OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); -+ OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); - OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | -- OPENSSL_INIT_ADD_ALL_DIGESTS | -- OPENSSL_INIT_LOAD_CONFIG, NULL); -+ OPENSSL_INIT_ADD_ALL_DIGESTS | -+ OPENSSL_INIT_LOAD_CONFIG, NULL); - # endif - while (RAND_status() == 0) { - rnd = zrand(); --- -2.20.1 - diff --git a/0001-Temporarily-disable-TLSv1.3-support.patch b/0001-Temporarily-disable-TLSv1.3-support.patch new file mode 100644 index 0000000..5297028 --- /dev/null +++ b/0001-Temporarily-disable-TLSv1.3-support.patch @@ -0,0 +1,30 @@ +From f9e232ffb44c96538f2a12c4bc4970f228f971cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Tue, 12 Feb 2019 11:17:16 +0100 +Subject: [PATCH] Temporarily disable TLSv1.3 support + +Disable TLSv1.3 until support for it is fixed in pure-ftpd. This is a +workaround for the following issue: +https://github.com/jedisct1/pure-ftpd/issues/102 +--- + src/tls.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/tls.c b/src/tls.c +index c4e2a1b..41d619f 100644 +--- a/src/tls.c ++++ b/src/tls.c +@@ -301,6 +301,10 @@ int tls_init_library(void) + # endif + # ifdef SSL_OP_NO_TLSv1_2 + SSL_CTX_clear_options(tls_ctx, SSL_OP_NO_TLSv1_2); ++# endif ++ /* Disable TLSv1.3 support until it works properly in pure-ftpd */ ++# ifdef SSL_OP_NO_TLSv1_3 ++ SSL_CTX_set_options(tls_ctx, SSL_OP_NO_TLSv1_3); + # endif + if (tlsciphersuite != NULL) { + if (SSL_CTX_set_cipher_list(tls_ctx, tlsciphersuite) != 1) { +-- +2.20.1 + diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 7116c1b..32416a7 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.47 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -23,10 +23,12 @@ Patch3: 0002-Complain-when-both-options-and-config-file-are-given.patch # Upstream patch: Patch4: 0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch # Upstream patch: -Patch5: 0001-TLS1.3-compatibility.patch -# Upstream patch: Patch6: 0001-Fix-postgresql-authenticate-bug.patch +# Temporarily disable TLSv1.3 to workaround +# https://github.com/jedisct1/pure-ftpd/issues/102 +Patch7: 0001-Temporarily-disable-TLSv1.3-support.patch + Provides: ftpserver BuildRequires: pam-devel, libcap-devel %{!?_without_ldap:BuildRequires: openldap-devel} @@ -239,6 +241,9 @@ fi %changelog +* Tue Feb 12 2019 OndÅ™ej LysonÄ›k - 1.0.47-10 +- Temporarily disable TLSv1.3 support until it's fully fixed + * Tue Feb 05 2019 OndÅ™ej LysonÄ›k - 1.0.47-9 - Fixed TLSv1.3 support - Resolves: rhbz#1654838 From 40501949977d87db5cf54f19ecd1bdcd88046dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Fri, 29 Mar 2019 13:22:58 +0100 Subject: [PATCH 096/122] New version Resolves: rhbz#1692539 Resolves: rhbz#1672494 Resolves: rhbz#1654838 --- .gitignore | 1 + ...when-given-an-invalid-cmdline-option.patch | 25 -- 0001-Fix-postgresql-authenticate-bug.patch | 25 -- ...TA_SIZE-due-to-Argon2id-requirements.patch | 25 -- ...-Temporarily-disable-TLSv1.3-support.patch | 30 --- ...th-options-and-config-file-are-given.patch | 237 ------------------ 0002-fedora-specific-config-file.patch | 8 +- pure-ftpd.spec | 32 +-- sources | 2 +- 9 files changed, 18 insertions(+), 367 deletions(-) delete mode 100644 0001-Exit-when-given-an-invalid-cmdline-option.patch delete mode 100644 0001-Fix-postgresql-authenticate-bug.patch delete mode 100644 0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch delete mode 100644 0001-Temporarily-disable-TLSv1.3-support.patch delete mode 100644 0002-Complain-when-both-options-and-config-file-are-given.patch diff --git a/.gitignore b/.gitignore index 3c3f0e2..da05c2a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.42.tar.bz2 /pure-ftpd-1.0.46.tar.bz2 /pure-ftpd-1.0.47.tar.bz2 +/pure-ftpd-1.0.48.tar.bz2 diff --git a/0001-Exit-when-given-an-invalid-cmdline-option.patch b/0001-Exit-when-given-an-invalid-cmdline-option.patch deleted file mode 100644 index 2e069d8..0000000 --- a/0001-Exit-when-given-an-invalid-cmdline-option.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8b6e9370ccbdff47107963c352caab24fdb0fcaa Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Wed, 7 Feb 2018 13:28:02 +0100 -Subject: [PATCH 1/2] Exit when given an invalid cmdline option - ---- - src/ftpd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/ftpd.c b/src/ftpd.c -index e19d8de..5c77410 100644 ---- a/src/ftpd.c -+++ b/src/ftpd.c -@@ -6192,7 +6192,7 @@ int pureftpd_start(int argc, char *argv[], const char *home_directory_) - exit(EXIT_SUCCESS); - } - default: -- logfile(LOG_WARNING, MSG_ILLEGAL_OPTION); -+ die(421, LOG_ERR, MSG_ILLEGAL_OPTION); - } - } - #ifdef WITH_RFC2640 --- -2.14.3 - diff --git a/0001-Fix-postgresql-authenticate-bug.patch b/0001-Fix-postgresql-authenticate-bug.patch deleted file mode 100644 index b6044be..0000000 --- a/0001-Fix-postgresql-authenticate-bug.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6a256a21e48177e1d73d7e70b2292c76ac40ffb7 Mon Sep 17 00:00:00 2001 -From: t-asaka -Date: Mon, 28 May 2018 22:29:25 +0900 -Subject: [PATCH] Fix postgresql authenticate bug - ---- - src/log_pgsql.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/log_pgsql.c b/src/log_pgsql.c -index 4df654e..3825afb 100644 ---- a/src/log_pgsql.c -+++ b/src/log_pgsql.c -@@ -504,7 +504,7 @@ void pw_pgsql_check(AuthResult * const result, - crypto_crypt++; - crypto_md5++; - crypto_sha1++; -- } else if (strcasecmp(crypto, PASSWD_SQL_ARGON2)) { -+ } else if (strcasecmp(crypto, PASSWD_SQL_ARGON2) == 0) { - crypto_argon2++; - } else if (strcasecmp(crypto, PASSWD_SQL_SCRYPT) == 0) { - crypto_scrypt++; --- -2.20.1 - diff --git a/0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch b/0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch deleted file mode 100644 index f9545bd..0000000 --- a/0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 27a5c200f9643ce907118aad169279b3a66a9e8a Mon Sep 17 00:00:00 2001 -From: Frank Denis -Date: Sat, 4 Nov 2017 20:46:16 +0100 -Subject: [PATCH] Increase MAX_DATA_SIZE due to Argon2id requirements - ---- - src/ftpd.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/ftpd.h b/src/ftpd.h -index 1beeab8..5bb1f6b 100644 ---- a/src/ftpd.h -+++ b/src/ftpd.h -@@ -557,7 +557,7 @@ Your platform has a very large PATH_MAX, we should not trust it. - - #ifndef MAX_DATA_SIZE - # ifdef HAVE_LIBSODIUM --# define MAX_DATA_SIZE (40 * 1024 * 1024) -+# define MAX_DATA_SIZE (70 * 1024 * 1024) - # elif defined(WITH_LDAP) || defined(WITH_MYSQL) || defined(WITH_PGSQL) - # define MAX_DATA_SIZE (16 * 1024 * 1024) /* Max memory usage - SQL/LDAP need more */ - # else --- -2.14.3 - diff --git a/0001-Temporarily-disable-TLSv1.3-support.patch b/0001-Temporarily-disable-TLSv1.3-support.patch deleted file mode 100644 index 5297028..0000000 --- a/0001-Temporarily-disable-TLSv1.3-support.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f9e232ffb44c96538f2a12c4bc4970f228f971cd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Tue, 12 Feb 2019 11:17:16 +0100 -Subject: [PATCH] Temporarily disable TLSv1.3 support - -Disable TLSv1.3 until support for it is fixed in pure-ftpd. This is a -workaround for the following issue: -https://github.com/jedisct1/pure-ftpd/issues/102 ---- - src/tls.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/tls.c b/src/tls.c -index c4e2a1b..41d619f 100644 ---- a/src/tls.c -+++ b/src/tls.c -@@ -301,6 +301,10 @@ int tls_init_library(void) - # endif - # ifdef SSL_OP_NO_TLSv1_2 - SSL_CTX_clear_options(tls_ctx, SSL_OP_NO_TLSv1_2); -+# endif -+ /* Disable TLSv1.3 support until it works properly in pure-ftpd */ -+# ifdef SSL_OP_NO_TLSv1_3 -+ SSL_CTX_set_options(tls_ctx, SSL_OP_NO_TLSv1_3); - # endif - if (tlsciphersuite != NULL) { - if (SSL_CTX_set_cipher_list(tls_ctx, tlsciphersuite) != 1) { --- -2.20.1 - diff --git a/0002-Complain-when-both-options-and-config-file-are-given.patch b/0002-Complain-when-both-options-and-config-file-are-given.patch deleted file mode 100644 index 12169f7..0000000 --- a/0002-Complain-when-both-options-and-config-file-are-given.patch +++ /dev/null @@ -1,237 +0,0 @@ -From 4328fd5142d0f981687a484f4be34333432d27d1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Wed, 7 Feb 2018 15:05:25 +0100 -Subject: [PATCH 2/2] Complain when both options and config file are given on - cmdline - ---- - src/ftpd.c | 3 +++ - src/messages_cs_cz.h | 1 + - src/messages_da.h | 1 + - src/messages_de.h | 1 + - src/messages_en.h | 1 + - src/messages_es.h | 1 + - src/messages_fr.h | 1 + - src/messages_fr_funny.h | 1 + - src/messages_hu.h | 1 + - src/messages_it.h | 1 + - src/messages_kr.h | 1 + - src/messages_nl.h | 1 + - src/messages_no.h | 1 + - src/messages_pl.h | 1 + - src/messages_pt_br.h | 1 + - src/messages_ro.h | 1 + - src/messages_ru.h | 1 + - src/messages_sk.h | 1 + - src/messages_sv.h | 1 + - src/messages_tr.h | 1 + - src/messages_zh_cn.h | 1 + - src/messages_zh_tw.h | 1 + - 22 files changed, 24 insertions(+) - -diff --git a/src/ftpd.c b/src/ftpd.c -index 5c77410..3f474d2 100644 ---- a/src/ftpd.c -+++ b/src/ftpd.c -@@ -6195,6 +6195,9 @@ int pureftpd_start(int argc, char *argv[], const char *home_directory_) - die(421, LOG_ERR, MSG_ILLEGAL_OPTION); - } - } -+ if (optind < argc) { -+ die(421, LOG_ERR, MSG_INVALID_ARGUMENT, argv[optind]); -+ } - #ifdef WITH_RFC2640 - if (charset_fs == NULL) { - charset_fs = (char *) "utf-8"; -diff --git a/src/messages_cs_cz.h b/src/messages_cs_cz.h -index ef225ba..e103b37 100644 ---- a/src/messages_cs_cz.h -+++ b/src/messages_cs_cz.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Neplatný argument: \"%s\"" -diff --git a/src/messages_da.h b/src/messages_da.h -index ed6f77c..c79ad5a 100644 ---- a/src/messages_da.h -+++ b/src/messages_da.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_de.h b/src/messages_de.h -index e7ae9a9..cd6bc08 100644 ---- a/src/messages_de.h -+++ b/src/messages_de.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_en.h b/src/messages_en.h -index e980131..cb9abf3 100644 ---- a/src/messages_en.h -+++ b/src/messages_en.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_es.h b/src/messages_es.h -index 0c27d4f..60ed849 100644 ---- a/src/messages_es.h -+++ b/src/messages_es.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_fr.h b/src/messages_fr.h -index 7f41dae..a012c05 100644 ---- a/src/messages_fr.h -+++ b/src/messages_fr.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT doit etre precede d'une commande PBSZ reussie" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP n'a pas retourne d'attribut userPassword, verifiez les droits d'acces LDAP." - #define MSG_LDAP_INVALID_AUTH_METHOD "Methode LDAPAuthMethod invalide dans le fichier de configuration. Ce doit etre 'bind' ou 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_fr_funny.h b/src/messages_fr_funny.h -index c77e5bc..dff760b 100644 ---- a/src/messages_fr_funny.h -+++ b/src/messages_fr_funny.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT ca marche qu'apres un PBSZ reussi" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP n'a pas retourne d'attribut userPassword, ptet que les droits d'acces LDAP chient." - #define MSG_LDAP_INVALID_AUTH_METHOD "LDAPAuthMethod dans le fichier de conf, ca doit etre 'bind' ou 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_hu.h b/src/messages_hu.h -index b3beead..7c5a101 100644 ---- a/src/messages_hu.h -+++ b/src/messages_hu.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_it.h b/src/messages_it.h -index 4e6e984..e30f517 100644 ---- a/src/messages_it.h -+++ b/src/messages_it.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_kr.h b/src/messages_kr.h -index 14d8300..c9faead 100644 ---- a/src/messages_kr.h -+++ b/src/messages_kr.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_nl.h b/src/messages_nl.h -index 77efbb4..5a60d9e 100644 ---- a/src/messages_nl.h -+++ b/src/messages_nl.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "Geen userPassword attribuut aangetroffen. Controleer de toegangsrechten." - #define MSG_LDAP_INVALID_AUTH_METHOD "Onjuiste LDAPAuthMethod in de configuratie. Moet 'bind' of 'password' zijn." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_no.h b/src/messages_no.h -index f0be1b4..4c84405 100644 ---- a/src/messages_no.h -+++ b/src/messages_no.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_pl.h b/src/messages_pl.h -index c0be4d8..89d5af1 100644 ---- a/src/messages_pl.h -+++ b/src/messages_pl.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_pt_br.h b/src/messages_pt_br.h -index e5557b9..1dcfb64 100644 ---- a/src/messages_pt_br.h -+++ b/src/messages_pt_br.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_ro.h b/src/messages_ro.h -index 7bbcefe..da16a49 100644 ---- a/src/messages_ro.h -+++ b/src/messages_ro.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_ru.h b/src/messages_ru.h -index e0c1842..f0e4031 100644 ---- a/src/messages_ru.h -+++ b/src/messages_ru.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_sk.h b/src/messages_sk.h -index 24eca1b..e0ddd2a 100644 ---- a/src/messages_sk.h -+++ b/src/messages_sk.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_sv.h b/src/messages_sv.h -index b55c474..be4bbc1 100644 ---- a/src/messages_sv.h -+++ b/src/messages_sv.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_tr.h b/src/messages_tr.h -index 7d6db57..3ee84d2 100644 ---- a/src/messages_tr.h -+++ b/src/messages_tr.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_zh_cn.h b/src/messages_zh_cn.h -index a8bfc6c..93844fd 100644 ---- a/src/messages_zh_cn.h -+++ b/src/messages_zh_cn.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" -diff --git a/src/messages_zh_tw.h b/src/messages_zh_tw.h -index db99719..05581bb 100644 ---- a/src/messages_zh_tw.h -+++ b/src/messages_zh_tw.h -@@ -227,3 +227,4 @@ - #define MSG_PROT_BEFORE_PBSZ "PROT must be preceded by a successful PBSZ command" - #define MSG_WARN_LDAP_USERPASS_EMPTY "LDAP returned no userPassword attribute, check LDAP access rights." - #define MSG_LDAP_INVALID_AUTH_METHOD "Invalid LDAPAuthMethod in the configuration file. Should be 'bind' or 'password'." -+#define MSG_INVALID_ARGUMENT "Invalid argument: \"%s\"" --- -2.14.3 - diff --git a/0002-fedora-specific-config-file.patch b/0002-fedora-specific-config-file.patch index e50a695..afa6fcf 100644 --- a/0002-fedora-specific-config-file.patch +++ b/0002-fedora-specific-config-file.patch @@ -1,4 +1,4 @@ -From 23e169081a6cff2b73e521991fd9e260b49e80fa Mon Sep 17 00:00:00 2001 +From 5dbbb2948bee45ec0115146efb4a090df00f5530 Mon Sep 17 00:00:00 2001 From: rpm-build Date: Thu, 14 Sep 2017 16:41:12 +0200 Subject: [PATCH] fedora specific config file @@ -8,14 +8,14 @@ Subject: [PATCH] fedora specific config file 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/pure-ftpd.conf.in b/pure-ftpd.conf.in -index a327844..597ed59 100644 +index aeb093a..e93053a 100644 --- a/pure-ftpd.conf.in +++ b/pure-ftpd.conf.in @@ -9,7 +9,7 @@ # instead of command-line options, please run the # following command : # --# @prefix@/sbin/pure-ftpd @sysconfdir@/etc/pure-ftpd.conf +-# @sbindir@/sbin/pure-ftpd @sysconfdir@/pure-ftpd.conf +# @sbindir@/pure-ftpd @sysconfdir@/pure-ftpd.conf # # Online documentation: @@ -127,5 +127,5 @@ index a327844..597ed59 100644 -- -2.14.3 +2.20.1 diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 32416a7..4466de9 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.47 -Release: 10%{?dist} +Version: 1.0.48 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -16,18 +16,6 @@ Source8: pure-ftpd-with-tls-init.service Source9: pure-ftpd-with-tls.service Patch0: 0001-modify-pam.patch Patch1: 0002-fedora-specific-config-file.patch -# Upstream patch: -Patch2: 0001-Exit-when-given-an-invalid-cmdline-option.patch -# Upstream patch: -Patch3: 0002-Complain-when-both-options-and-config-file-are-given.patch -# Upstream patch: -Patch4: 0001-Increase-MAX_DATA_SIZE-due-to-Argon2id-requirements.patch -# Upstream patch: -Patch6: 0001-Fix-postgresql-authenticate-bug.patch - -# Temporarily disable TLSv1.3 to workaround -# https://github.com/jedisct1/pure-ftpd/issues/102 -Patch7: 0001-Temporarily-disable-TLSv1.3-support.patch Provides: ftpserver BuildRequires: pam-devel, libcap-devel @@ -173,11 +161,8 @@ make -f %{_datadir}/selinux/devel/Makefile install -p -m 644 -D pureftpd.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/pureftpd.pp popd -# Docs -install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name} -rm -f README.{MacOS-X,Windows} -install -p -m 644 README.* $RPM_BUILD_ROOT%{_docdir}/%{name} -install -p -m 644 pureftpd.schema $RPM_BUILD_ROOT%{_docdir}/%{name} +# Remove unnecessary docs +rm $RPM_BUILD_ROOT%{_docdir}/%{name}/README.MacOS-X %post %systemd_post pure-ftpd.service @@ -212,11 +197,12 @@ fi %files -%doc FAQ THANKS AUTHORS CONTACT HISTORY NEWS +%doc FAQ THANKS AUTHORS HISTORY NEWS %doc README README.Authentication-Modules README.Configuration-File %doc README.Donations README.LDAP README.MySQL README.SELinux %doc README.PGSQL README.TLS README.Virtual-Users %doc pureftpd.schema +%doc %{_docdir}/%{name}/*.conf %{_bindir}/pure-* %{_sbindir}/pure-* %if 0%{!?_without_tls:1} @@ -241,6 +227,12 @@ fi %changelog +* Fri Mar 29 2019 OndÅ™ej LysonÄ›k - 1.0.48-1 +- New version +- Resolves: rhbz#1692539 +- Resolves: rhbz#1672494 +- Resolves: rhbz#1654838 + * Tue Feb 12 2019 OndÅ™ej LysonÄ›k - 1.0.47-10 - Temporarily disable TLSv1.3 support until it's fully fixed diff --git a/sources b/sources index a5bbab1..da9075a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pure-ftpd-1.0.47.tar.bz2) = c1920a3f67f04635fde600fe226a7730b801e7e64658b25f1d9f9c0b35a704664be4adfb0b291594f7e0f10beade25eae9a5e6cc3b6777a3b413f3c2d9574e63 +SHA512 (pure-ftpd-1.0.48.tar.bz2) = eabcc8ba6d37e3aceb57871e80129a1db1a3ea7d2b9f57626a21f42b4978570a84006a941fe254b6af50b2432d1d391725ea512f7569fcaecfa7eb77179c2f54 From 8e6120de593a1b76a71b9fe34ae27cb38460dd29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Wed, 3 Apr 2019 13:31:27 +0200 Subject: [PATCH 097/122] New version Resolves: rhbz#1695561 --- .gitignore | 1 + pure-ftpd.spec | 6 +++++- sources | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index da05c2a..5710765 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.46.tar.bz2 /pure-ftpd-1.0.47.tar.bz2 /pure-ftpd-1.0.48.tar.bz2 +/pure-ftpd-1.0.49.tar.bz2 diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 4466de9..94c7dfd 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,5 +1,5 @@ Name: pure-ftpd -Version: 1.0.48 +Version: 1.0.49 Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD @@ -227,6 +227,10 @@ fi %changelog +* Wed Apr 03 2019 OndÅ™ej LysonÄ›k - 1.0.49-1 +- New version +- Resolves: rhbz#1695561 + * Fri Mar 29 2019 OndÅ™ej LysonÄ›k - 1.0.48-1 - New version - Resolves: rhbz#1692539 diff --git a/sources b/sources index da9075a..0709f30 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pure-ftpd-1.0.48.tar.bz2) = eabcc8ba6d37e3aceb57871e80129a1db1a3ea7d2b9f57626a21f42b4978570a84006a941fe254b6af50b2432d1d391725ea512f7569fcaecfa7eb77179c2f54 +SHA512 (pure-ftpd-1.0.49.tar.bz2) = b44896d6fe2cda9169b1db93c5260bb892af14a173f2d25e60dd6530afe85d8e9156985609e35da7e5550dc123afb42bc5012beb9fca9011054cf0ed8b2eddef From b80572389b2e7548f93c5babfd431e1bab64cefd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 11:31:26 +0000 Subject: [PATCH 098/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 94c7dfd..24d2838 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -227,6 +227,9 @@ fi %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 1.0.49-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Wed Apr 03 2019 OndÅ™ej LysonÄ›k - 1.0.49-1 - New version - Resolves: rhbz#1695561 From 9073da9177afbab893880c355266cf282fd6836c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Mon, 27 Jan 2020 13:54:59 +0100 Subject: [PATCH 099/122] Fix potential stack exhaustion in function listdir (CVE-2019-20176) Resolves: rhbz#1795152 --- ...single-buffer-to-store-every-file-na.patch | 70 +++++++++++++++++++ pure-ftpd.spec | 8 ++- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch diff --git a/0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch b/0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch new file mode 100644 index 0000000..efed2f3 --- /dev/null +++ b/0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch @@ -0,0 +1,70 @@ +From aea56f4bcb9948d456f3fae4d044fd3fa2e19706 Mon Sep 17 00:00:00 2001 +From: Frank Denis +Date: Mon, 30 Dec 2019 17:40:04 +0100 +Subject: [PATCH] listdir(): reuse a single buffer to store every file name to + display + +Allocating a new buffer for each entry is useless. + +And as these buffers are allocated on the stack, on systems with a +small stack size, with many entries, the limit can easily be reached, +causing a stack exhaustion and aborting the user session. + +Reported by Antonio Morales from the GitHub Security Lab team, thanks! +--- + src/ls.c | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/src/ls.c b/src/ls.c +index cf804c7..f8a588f 100644 +--- a/src/ls.c ++++ b/src/ls.c +@@ -661,6 +661,8 @@ static void listdir(unsigned int depth, int f, void * const tls_fd, + char *names; + PureFileInfo *s; + PureFileInfo *r; ++ char *alloca_subdir; ++ size_t sizeof_subdir; + int d; + + if (depth >= max_ls_depth || matches >= max_ls_files) { +@@ -690,14 +692,12 @@ static void listdir(unsigned int depth, int f, void * const tls_fd, + } + outputfiles(f, tls_fd); + r = dir; ++ sizeof_subdir = PATH_MAX + 1U; ++ if ((alloca_subdir = ALLOCA(sizeof_subdir)) == NULL) { ++ goto toomany; ++ } + while (opt_R && r != s) { + if (r->name_offset != (size_t) -1 && !chdir(FI_NAME(r))) { +- char *alloca_subdir; +- const size_t sizeof_subdir = PATH_MAX + 1U; +- +- if ((alloca_subdir = ALLOCA(sizeof_subdir)) == NULL) { +- goto toomany; +- } + if (SNCHECK(snprintf(alloca_subdir, sizeof_subdir, "%s/%s", + name, FI_NAME(r)), sizeof_subdir)) { + goto nolist; +@@ -706,8 +706,8 @@ static void listdir(unsigned int depth, int f, void * const tls_fd, + wrstr(f, tls_fd, alloca_subdir); + wrstr(f, tls_fd, ":\r\n\r\n"); + listdir(depth + 1U, f, tls_fd, alloca_subdir); ++ + nolist: +- ALLOCA_FREE(alloca_subdir); + if (matches >= max_ls_files) { + goto toomany; + } +@@ -720,6 +720,7 @@ static void listdir(unsigned int depth, int f, void * const tls_fd, + r++; + } + toomany: ++ ALLOCA_FREE(alloca_subdir); + free(names); + free(dir); + names = NULL; +-- +2.20.1 + diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 24d2838..afc2ef3 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -16,6 +16,8 @@ Source8: pure-ftpd-with-tls-init.service Source9: pure-ftpd-with-tls.service Patch0: 0001-modify-pam.patch Patch1: 0002-fedora-specific-config-file.patch +# Upstream patch: +Patch2: 0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch Provides: ftpserver BuildRequires: pam-devel, libcap-devel @@ -227,6 +229,10 @@ fi %changelog +* Mon Jan 27 2020 OndÅ™ej LysonÄ›k - 1.0.49-3 +- Fix potential stack exhaustion in function listdir (CVE-2019-20176) +- Resolves: rhbz#1795152 + * Fri Jul 26 2019 Fedora Release Engineering - 1.0.49-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 07656be37eb46816a406dcde0506dda3f80150d0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 09:59:24 +0000 Subject: [PATCH 100/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index afc2ef3..d266ea4 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -229,6 +229,9 @@ fi %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 1.0.49-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Mon Jan 27 2020 OndÅ™ej LysonÄ›k - 1.0.49-3 - Fix potential stack exhaustion in function listdir (CVE-2019-20176) - Resolves: rhbz#1795152 From a8e246895844b624a0b71b14aaed20bda5702ef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Wed, 6 May 2020 18:27:45 +0200 Subject: [PATCH 101/122] Fix CVE-2020-9365 and CVE-2020-9274 Resolves: rhbz#1828688 Resolves: rhbz#1831059 --- ...ays-set-the-tail-of-the-list-to-NULL.patch | 34 +++++++++++++++++++ 0001-pure_strcmp-len-s2-can-be-len-s1.patch | 28 +++++++++++++++ pure-ftpd.spec | 11 +++++- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch create mode 100644 0001-pure_strcmp-len-s2-can-be-len-s1.patch diff --git a/0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch b/0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch new file mode 100644 index 0000000..d5b2523 --- /dev/null +++ b/0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch @@ -0,0 +1,34 @@ +From 8d0d42542e2cb7a56d645fbe4d0ef436e38bcefa Mon Sep 17 00:00:00 2001 +From: Frank Denis +Date: Tue, 18 Feb 2020 18:36:58 +0100 +Subject: [PATCH] diraliases: always set the tail of the list to NULL + +Spotted and reported by Antonio Norales from GitHub Security Labs. +Thanks! +--- + src/diraliases.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/diraliases.c b/src/diraliases.c +index 4002a36..fb70273 100644 +--- a/src/diraliases.c ++++ b/src/diraliases.c +@@ -93,7 +93,6 @@ int init_aliases(void) + (tail->dir = strdup(dir)) == NULL) { + die_mem(); + } +- tail->next = NULL; + } else { + DirAlias *curr; + +@@ -105,6 +104,7 @@ int init_aliases(void) + tail->next = curr; + tail = curr; + } ++ tail->next = NULL; + } + fclose(fp); + aliases_up++; +-- +2.25.4 + diff --git a/0001-pure_strcmp-len-s2-can-be-len-s1.patch b/0001-pure_strcmp-len-s2-can-be-len-s1.patch new file mode 100644 index 0000000..375b970 --- /dev/null +++ b/0001-pure_strcmp-len-s2-can-be-len-s1.patch @@ -0,0 +1,28 @@ +From bf6fcd4935e95128cf22af5924cdc8fe5c0579da Mon Sep 17 00:00:00 2001 +From: Frank Denis +Date: Mon, 24 Feb 2020 15:19:43 +0100 +Subject: [PATCH] pure_strcmp(): len(s2) can be > len(s1) + +Reported by Antonio Morales from GitHub Security Labs, thanks! +--- + src/utils.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/utils.c b/src/utils.c +index f41492d..5e88104 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -45,5 +45,9 @@ int pure_memcmp(const void * const b1_, const void * const b2_, size_t len) + + int pure_strcmp(const char * const s1, const char * const s2) + { +- return pure_memcmp(s1, s2, strlen(s1) + 1U); ++ const size_t s1_len = strlen(s1); ++ const size_t s2_len = strlen(s2); ++ const size_t len = (s1_len < s2_len) ? s1_len : s2_len; ++ ++ return pure_memcmp(s1, s2, len + 1); + } +-- +2.25.4 + diff --git a/pure-ftpd.spec b/pure-ftpd.spec index d266ea4..6fa83bb 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -18,6 +18,10 @@ Patch0: 0001-modify-pam.patch Patch1: 0002-fedora-specific-config-file.patch # Upstream patch: Patch2: 0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch +# Upstream patch: +Patch3: 0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch +# Upstream patch: +Patch4: 0001-pure_strcmp-len-s2-can-be-len-s1.patch Provides: ftpserver BuildRequires: pam-devel, libcap-devel @@ -229,6 +233,11 @@ fi %changelog +* Wed May 06 2020 OndÅ™ej LysonÄ›k - 1.0.49-5 +- Fix CVE-2020-9365 and CVE-2020-9274 +- Resolves: rhbz#1828688 +- Resolves: rhbz#1831059 + * Thu Jan 30 2020 Fedora Release Engineering - 1.0.49-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 9b9a61bcc6dbb98bf7c2d9f6c46b90ac9781139e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 23:11:18 +0000 Subject: [PATCH 102/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 6fa83bb..a821cb0 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -233,6 +233,9 @@ fi %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.0.49-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed May 06 2020 OndÅ™ej LysonÄ›k - 1.0.49-5 - Fix CVE-2020-9365 and CVE-2020-9274 - Resolves: rhbz#1828688 From 31773595729d16ea14571ffc2f5d2be1519e67d2 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 8 Jan 2021 19:38:28 +0000 Subject: [PATCH 103/122] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- pure-ftpd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index a821cb0..68d0d37 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -24,6 +24,7 @@ Patch3: 0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch Patch4: 0001-pure_strcmp-len-s2-can-be-len-s1.patch Provides: ftpserver +BuildRequires: make BuildRequires: pam-devel, libcap-devel %{!?_without_ldap:BuildRequires: openldap-devel} %{!?_without_mysql:BuildRequires: mariadb-connector-c-devel} From 413183aa914be26711498bb775da712436787c60 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 08:45:39 +0000 Subject: [PATCH 104/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 68d0d37..49f15bc 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -234,6 +234,9 @@ fi %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.0.49-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jul 28 2020 Fedora Release Engineering - 1.0.49-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From bda0bb39680cedc80e779658f9873a4766c5cfde Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mon, 8 Feb 2021 10:26:30 +0100 Subject: [PATCH 105/122] rebuild for libpq ABI fix Related: rhbz#1908268 --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 49f15bc..42fd2e5 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -234,6 +234,9 @@ fi %changelog +* Mon Feb 08 2021 Pavel Raiskup - 1.0.49-8 +- rebuild for libpq ABI fix rhbz#1908268 + * Wed Jan 27 2021 Fedora Release Engineering - 1.0.49-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From ef5dfb65053980833efa57e8c63861df0de816c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:13:00 +0100 Subject: [PATCH 106/122] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- pure-ftpd.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 42fd2e5..803b3a0 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -234,6 +234,10 @@ fi %changelog +* Tue Mar 02 2021 Zbigniew JÄ™drzejewski-Szmek - 1.0.49-9 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Mon Feb 08 2021 Pavel Raiskup - 1.0.49-8 - rebuild for libpq ABI fix rhbz#1908268 From 5ac4cfdf6a8ccf3feedc6b55ac9a9926d64188b2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 04:16:34 +0000 Subject: [PATCH 107/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 803b3a0..25e985b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -234,6 +234,9 @@ fi %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1.0.49-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Mar 02 2021 Zbigniew JÄ™drzejewski-Szmek - 1.0.49-9 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. From e7c6a52ff46509364852cb2f91e6bf8000bf7b05 Mon Sep 17 00:00:00 2001 From: Sahana Prasad Date: Tue, 14 Sep 2021 19:12:20 +0200 Subject: [PATCH 108/122] Rebuilt with OpenSSL 3.0.0 --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 25e985b..1e50c8b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -234,6 +234,9 @@ fi %changelog +* Tue Sep 14 2021 Sahana Prasad - 1.0.49-11 +- Rebuilt with OpenSSL 3.0.0 + * Fri Jul 23 2021 Fedora Release Engineering - 1.0.49-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 9f2939929d7336b928682af0181071b218b2f411 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 09:39:46 +0000 Subject: [PATCH 109/122] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 1e50c8b..f680985 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.49 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -234,6 +234,9 @@ fi %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 1.0.49-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Tue Sep 14 2021 Sahana Prasad - 1.0.49-11 - Rebuilt with OpenSSL 3.0.0 From 0afeb1b790e6a3005500ca605859cd53f8606182 Mon Sep 17 00:00:00 2001 From: jonathanspw Date: Thu, 21 Jul 2022 11:19:13 -0500 Subject: [PATCH 110/122] New version 1.0.51 --- .gitignore | 1 + ...ays-set-the-tail-of-the-list-to-NULL.patch | 34 --------- ...single-buffer-to-store-every-file-na.patch | 70 ------------------- 0001-pure_strcmp-len-s2-can-be-len-s1.patch | 28 -------- pure-ftpd.spec | 14 ++-- 5 files changed, 7 insertions(+), 140 deletions(-) delete mode 100644 0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch delete mode 100644 0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch delete mode 100644 0001-pure_strcmp-len-s2-can-be-len-s1.patch diff --git a/.gitignore b/.gitignore index 5710765..f418bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.47.tar.bz2 /pure-ftpd-1.0.48.tar.bz2 /pure-ftpd-1.0.49.tar.bz2 +/pure-ftpd-1.0.51.tar.bz2 diff --git a/0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch b/0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch deleted file mode 100644 index d5b2523..0000000 --- a/0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 8d0d42542e2cb7a56d645fbe4d0ef436e38bcefa Mon Sep 17 00:00:00 2001 -From: Frank Denis -Date: Tue, 18 Feb 2020 18:36:58 +0100 -Subject: [PATCH] diraliases: always set the tail of the list to NULL - -Spotted and reported by Antonio Norales from GitHub Security Labs. -Thanks! ---- - src/diraliases.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/diraliases.c b/src/diraliases.c -index 4002a36..fb70273 100644 ---- a/src/diraliases.c -+++ b/src/diraliases.c -@@ -93,7 +93,6 @@ int init_aliases(void) - (tail->dir = strdup(dir)) == NULL) { - die_mem(); - } -- tail->next = NULL; - } else { - DirAlias *curr; - -@@ -105,6 +104,7 @@ int init_aliases(void) - tail->next = curr; - tail = curr; - } -+ tail->next = NULL; - } - fclose(fp); - aliases_up++; --- -2.25.4 - diff --git a/0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch b/0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch deleted file mode 100644 index efed2f3..0000000 --- a/0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch +++ /dev/null @@ -1,70 +0,0 @@ -From aea56f4bcb9948d456f3fae4d044fd3fa2e19706 Mon Sep 17 00:00:00 2001 -From: Frank Denis -Date: Mon, 30 Dec 2019 17:40:04 +0100 -Subject: [PATCH] listdir(): reuse a single buffer to store every file name to - display - -Allocating a new buffer for each entry is useless. - -And as these buffers are allocated on the stack, on systems with a -small stack size, with many entries, the limit can easily be reached, -causing a stack exhaustion and aborting the user session. - -Reported by Antonio Morales from the GitHub Security Lab team, thanks! ---- - src/ls.c | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/src/ls.c b/src/ls.c -index cf804c7..f8a588f 100644 ---- a/src/ls.c -+++ b/src/ls.c -@@ -661,6 +661,8 @@ static void listdir(unsigned int depth, int f, void * const tls_fd, - char *names; - PureFileInfo *s; - PureFileInfo *r; -+ char *alloca_subdir; -+ size_t sizeof_subdir; - int d; - - if (depth >= max_ls_depth || matches >= max_ls_files) { -@@ -690,14 +692,12 @@ static void listdir(unsigned int depth, int f, void * const tls_fd, - } - outputfiles(f, tls_fd); - r = dir; -+ sizeof_subdir = PATH_MAX + 1U; -+ if ((alloca_subdir = ALLOCA(sizeof_subdir)) == NULL) { -+ goto toomany; -+ } - while (opt_R && r != s) { - if (r->name_offset != (size_t) -1 && !chdir(FI_NAME(r))) { -- char *alloca_subdir; -- const size_t sizeof_subdir = PATH_MAX + 1U; -- -- if ((alloca_subdir = ALLOCA(sizeof_subdir)) == NULL) { -- goto toomany; -- } - if (SNCHECK(snprintf(alloca_subdir, sizeof_subdir, "%s/%s", - name, FI_NAME(r)), sizeof_subdir)) { - goto nolist; -@@ -706,8 +706,8 @@ static void listdir(unsigned int depth, int f, void * const tls_fd, - wrstr(f, tls_fd, alloca_subdir); - wrstr(f, tls_fd, ":\r\n\r\n"); - listdir(depth + 1U, f, tls_fd, alloca_subdir); -+ - nolist: -- ALLOCA_FREE(alloca_subdir); - if (matches >= max_ls_files) { - goto toomany; - } -@@ -720,6 +720,7 @@ static void listdir(unsigned int depth, int f, void * const tls_fd, - r++; - } - toomany: -+ ALLOCA_FREE(alloca_subdir); - free(names); - free(dir); - names = NULL; --- -2.20.1 - diff --git a/0001-pure_strcmp-len-s2-can-be-len-s1.patch b/0001-pure_strcmp-len-s2-can-be-len-s1.patch deleted file mode 100644 index 375b970..0000000 --- a/0001-pure_strcmp-len-s2-can-be-len-s1.patch +++ /dev/null @@ -1,28 +0,0 @@ -From bf6fcd4935e95128cf22af5924cdc8fe5c0579da Mon Sep 17 00:00:00 2001 -From: Frank Denis -Date: Mon, 24 Feb 2020 15:19:43 +0100 -Subject: [PATCH] pure_strcmp(): len(s2) can be > len(s1) - -Reported by Antonio Morales from GitHub Security Labs, thanks! ---- - src/utils.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/utils.c b/src/utils.c -index f41492d..5e88104 100644 ---- a/src/utils.c -+++ b/src/utils.c -@@ -45,5 +45,9 @@ int pure_memcmp(const void * const b1_, const void * const b2_, size_t len) - - int pure_strcmp(const char * const s1, const char * const s2) - { -- return pure_memcmp(s1, s2, strlen(s1) + 1U); -+ const size_t s1_len = strlen(s1); -+ const size_t s2_len = strlen(s2); -+ const size_t len = (s1_len < s2_len) ? s1_len : s2_len; -+ -+ return pure_memcmp(s1, s2, len + 1); - } --- -2.25.4 - diff --git a/pure-ftpd.spec b/pure-ftpd.spec index f680985..6fe714f 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.49 -Release: 12%{?dist} +Version: 1.0.51 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -16,12 +16,6 @@ Source8: pure-ftpd-with-tls-init.service Source9: pure-ftpd-with-tls.service Patch0: 0001-modify-pam.patch Patch1: 0002-fedora-specific-config-file.patch -# Upstream patch: -Patch2: 0001-listdir-reuse-a-single-buffer-to-store-every-file-na.patch -# Upstream patch: -Patch3: 0001-diraliases-always-set-the-tail-of-the-list-to-NULL.patch -# Upstream patch: -Patch4: 0001-pure_strcmp-len-s2-can-be-len-s1.patch Provides: ftpserver BuildRequires: make @@ -234,6 +228,10 @@ fi %changelog +* Thu Jul 21 2022 Jonathan Wright - 1.0.51-1 +- New version +- Resolves: rhbz#2026153 + * Fri Jan 21 2022 Fedora Release Engineering - 1.0.49-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From c0f1b9f8469391349dd73e6169c257aee55ad84d Mon Sep 17 00:00:00 2001 From: jonathanspw Date: Thu, 21 Jul 2022 11:54:40 -0500 Subject: [PATCH 111/122] remove usermode/consolehelper --- pure-ftpd.pure-ftpwho.consoleapp | 3 --- pure-ftpd.pure-ftpwho.pam | 4 ---- pure-ftpd.spec | 14 +++----------- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 pure-ftpd.pure-ftpwho.consoleapp delete mode 100644 pure-ftpd.pure-ftpwho.pam diff --git a/pure-ftpd.pure-ftpwho.consoleapp b/pure-ftpd.pure-ftpwho.consoleapp deleted file mode 100644 index 8452f88..0000000 --- a/pure-ftpd.pure-ftpwho.consoleapp +++ /dev/null @@ -1,3 +0,0 @@ -USER=root -PROGRAM=/usr/sbin/pure-ftpwho -GUI=no diff --git a/pure-ftpd.pure-ftpwho.pam b/pure-ftpd.pure-ftpwho.pam deleted file mode 100644 index 268cc92..0000000 --- a/pure-ftpd.pure-ftpwho.pam +++ /dev/null @@ -1,4 +0,0 @@ -#%PAM-1.0 -auth sufficient pam_rootok.so -auth required pam_localuser.so -account required pam_permit.so diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 6fe714f..b02106c 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -8,8 +8,6 @@ URL: http://www.pureftpd.org Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-%{version}.tar.bz2 Source1: pure-ftpd.service Source2: pure-ftpd.logrotate -Source4: pure-ftpd.pure-ftpwho.pam -Source5: pure-ftpd.pure-ftpwho.consoleapp Source6: pure-ftpd.README.SELinux Source7: pure-ftpd.pureftpd.te Source8: pure-ftpd-with-tls-init.service @@ -31,7 +29,7 @@ BuildRequires: gcc Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -Requires: logrotate, usermode +Requires: logrotate %{!?_without_tls:Requires: sscg} @@ -147,12 +145,6 @@ install -p -m 644 pam/pure-ftpd $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/ install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} -# pure-ftpwho and non-root users -install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps -install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/pure-ftpwho -install -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/pure-ftpwho -ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/pure-ftpwho - # SELinux support pushd selinux echo "%{_sbindir}/pure-ftpd system_u:object_r:ftpd_exec_t:s0" > pureftpd.fc @@ -215,8 +207,6 @@ fi %config(noreplace) %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%config(noreplace) %{_sysconfdir}/pam.d/pure-ftpwho -%config(noreplace) %{_sysconfdir}/security/console.apps/pure-ftpwho %{!?_without_tls:%{_sysconfdir}/pki/%{name}} %{_mandir}/man8/* %dir /var/ftp/ @@ -231,6 +221,8 @@ fi * Thu Jul 21 2022 Jonathan Wright - 1.0.51-1 - New version - Resolves: rhbz#2026153 +- Remove usermode dependency and non-root "ftpwho" +- Resolves: rhbz#502754 * Fri Jan 21 2022 Fedora Release Engineering - 1.0.49-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From f430a125ef87f22dafe60b2d624de7922c46cb59 Mon Sep 17 00:00:00 2001 From: jonathanspw Date: Thu, 21 Jul 2022 12:32:06 -0500 Subject: [PATCH 112/122] Update sources for 1.0.51 --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 0709f30..37f9178 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pure-ftpd-1.0.49.tar.bz2) = b44896d6fe2cda9169b1db93c5260bb892af14a173f2d25e60dd6530afe85d8e9156985609e35da7e5550dc123afb42bc5012beb9fca9011054cf0ed8b2eddef +SHA512 (pure-ftpd-1.0.51.tar.bz2) = 3615ac1ec42813855f3328dde200f60025e1f2ca7d1e17ea042967fd4164079260d058f3e2586acd778334660f387a280b35850a9e2091dd913fb84ef929bdca From 7f021a55262c2951a002d81e5bc65212bd505932 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 10:30:05 +0000 Subject: [PATCH 113/122] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index b02106c..d0fefc6 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.51 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -218,6 +218,9 @@ fi %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 1.0.51-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Jonathan Wright - 1.0.51-1 - New version - Resolves: rhbz#2026153 From bc7a24037ec1eb9c0b7c90aa350d8b87db1c532d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 06:31:42 +0000 Subject: [PATCH 114/122] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index d0fefc6..d35a4aa 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.51 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -218,6 +218,9 @@ fi %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 1.0.51-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jan 20 2023 Fedora Release Engineering - 1.0.51-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From c205926cb97ee590f76f7ac6ece24f10594a4b19 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 22:36:02 +0000 Subject: [PATCH 115/122] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index d35a4aa..80b5fb0 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.51 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -218,6 +218,9 @@ fi %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 1.0.51-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jul 21 2023 Fedora Release Engineering - 1.0.51-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From c7a2892b46ee2212fd460e36a7b55e4d5a90932a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 00:22:09 +0000 Subject: [PATCH 116/122] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 80b5fb0..1067166 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.51 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -218,6 +218,9 @@ fi %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 1.0.51-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 1.0.51-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From ce04bd4e302cbd2f3bdf0a006357dc41a11cc5a7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 08:44:33 +0000 Subject: [PATCH 117/122] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 1067166..339dc80 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.51 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Lightweight, fast and secure FTP server License: BSD URL: http://www.pureftpd.org @@ -218,6 +218,9 @@ fi %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 1.0.51-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jan 26 2024 Fedora Release Engineering - 1.0.51-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 6bf60785e9bf5c882ce5c5e1ea8a6298c1cd9bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Wed, 4 Sep 2024 19:20:19 +0200 Subject: [PATCH 118/122] convert license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- pure-ftpd.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 339dc80..f2d62ee 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,8 +1,9 @@ Name: pure-ftpd Version: 1.0.51 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Lightweight, fast and secure FTP server -License: BSD +# Automatically converted from old format: BSD - review is highly recommended. +License: LicenseRef-Callaway-BSD URL: http://www.pureftpd.org Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-%{version}.tar.bz2 @@ -218,6 +219,9 @@ fi %changelog +* Wed Sep 04 2024 Miroslav Suchý - 1.0.51-7 +- convert license to SPDX + * Fri Jul 19 2024 Fedora Release Engineering - 1.0.51-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From e8cfc944a0223f648925708e1f3dd0939b680ec8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 11:05:16 +0000 Subject: [PATCH 119/122] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index f2d62ee..014c803 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.51 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Lightweight, fast and secure FTP server # Automatically converted from old format: BSD - review is highly recommended. License: LicenseRef-Callaway-BSD @@ -219,6 +219,9 @@ fi %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 1.0.51-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Sep 04 2024 Miroslav Suchý - 1.0.51-7 - convert license to SPDX From 3c73e2bc6fcae9b66141db52811a93b1fbb429df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 1 Feb 2025 19:56:51 +0100 Subject: [PATCH 120/122] Add explicit BR: libxcrypt-devel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Esser --- pure-ftpd.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 014c803..7a1f6df 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.51 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Lightweight, fast and secure FTP server # Automatically converted from old format: BSD - review is highly recommended. License: LicenseRef-Callaway-BSD @@ -19,6 +19,7 @@ Patch1: 0002-fedora-specific-config-file.patch Provides: ftpserver BuildRequires: make BuildRequires: pam-devel, libcap-devel +BuildRequires: libxcrypt-devel %{!?_without_ldap:BuildRequires: openldap-devel} %{!?_without_mysql:BuildRequires: mariadb-connector-c-devel} %{!?_without_pgsql:BuildRequires: libpq-devel} @@ -219,6 +220,9 @@ fi %changelog +* Sat Feb 01 2025 Björn Esser - 1.0.51-9 +- Add explicit BR: libxcrypt-devel + * Sat Jan 18 2025 Fedora Release Engineering - 1.0.51-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 5104a55ce6835e72e5c4dcc11c3caf0504675bcb Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Mon, 19 May 2025 19:36:21 -0500 Subject: [PATCH 121/122] update to 1.0.52 --- .gitignore | 1 + pure-ftpd.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f418bc6..1b740aa 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ pure-ftpd-1.0.29.tar.bz2 /pure-ftpd-1.0.48.tar.bz2 /pure-ftpd-1.0.49.tar.bz2 /pure-ftpd-1.0.51.tar.bz2 +/pure-ftpd-1.0.52.tar.bz2 diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 7a1f6df..21e8abb 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd -Version: 1.0.51 -Release: 9%{?dist} +Version: 1.0.52 +Release: 1%{?dist} Summary: Lightweight, fast and secure FTP server # Automatically converted from old format: BSD - review is highly recommended. License: LicenseRef-Callaway-BSD @@ -220,6 +220,10 @@ fi %changelog +* Tue May 20 2025 Jonathan Wright - 1.0.52-1 +- update to 1.0.52 rhbz#2313435 +- Fixes CVE-2024-48208 rhbz#2343476 + * Sat Feb 01 2025 Björn Esser - 1.0.51-9 - Add explicit BR: libxcrypt-devel diff --git a/sources b/sources index 37f9178..920b4eb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pure-ftpd-1.0.51.tar.bz2) = 3615ac1ec42813855f3328dde200f60025e1f2ca7d1e17ea042967fd4164079260d058f3e2586acd778334660f387a280b35850a9e2091dd913fb84ef929bdca +SHA512 (pure-ftpd-1.0.52.tar.bz2) = c7b6f76c1429d2cbf9d740c3408464564e023716ebf8361231ba5021f81804575049910c9874970c83c98f927cd496899e5c30625e4dee6538497f9179632c23 From 6712c15acc5950c705d6b7bde3376c478222e7bf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 06:17:07 +0000 Subject: [PATCH 122/122] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- pure-ftpd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pure-ftpd.spec b/pure-ftpd.spec index 21e8abb..9159c7b 100644 --- a/pure-ftpd.spec +++ b/pure-ftpd.spec @@ -1,6 +1,6 @@ Name: pure-ftpd Version: 1.0.52 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight, fast and secure FTP server # Automatically converted from old format: BSD - review is highly recommended. License: LicenseRef-Callaway-BSD @@ -220,6 +220,9 @@ fi %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1.0.52-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Tue May 20 2025 Jonathan Wright - 1.0.52-1 - update to 1.0.52 rhbz#2313435 - Fixes CVE-2024-48208 rhbz#2343476