[proftpd/f21] Fix anonymous upload with mod_vroot (#1045922)
Paul Howarth
pghmcfc at fedoraproject.org
Tue Feb 10 18:02:29 UTC 2015
commit b4239c26b87f3df7b1511fdf8b1a3424e8473a56
Author: Paul Howarth <paul at city-fan.org>
Date: Thu Feb 5 16:33:02 2015 +0000
Fix anonymous upload with mod_vroot (#1045922)
- Anonymous upload directory specification needs to be slightly different if
mod_vroot is in use (#1045922)
http://sourceforge.net/p/proftp/mailman/message/31728570/
- Use %license where possible
.gitignore | 8 ++++++--
proftpd.conf | 38 ++++++++++++++++++++++++++++----------
proftpd.spec | 19 +++++++++++++++----
3 files changed, 49 insertions(+), 16 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9273359..37692fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,9 @@
-# master/el7
+# master
+/proftpd-1.3.5.tar.gz
+/proftpd-mod-geoip-0.3.tar.gz
+/mod_vroot-0.9.3.tar.gz
+/Test-Unit-0.14.tar.gz
+# f21/el7
/proftpd-1.3.5.tar.gz
/proftpd-mod-geoip-0.3.tar.gz
/proftpd-mod-vroot-0.9.2.tar.gz
@@ -16,4 +21,3 @@
/proftpd-1.3.3g.tar.bz2
/proftpd-mod-geoip-0.2.tar.gz
/proftpd-mod-vroot-0.8.5.tar.gz
-/proftpd-1.3.5.tar.gz
diff --git a/proftpd.conf b/proftpd.conf
index 357def8..6741ab0 100644
--- a/proftpd.conf
+++ b/proftpd.conf
@@ -385,16 +385,34 @@ ControlsLog /var/log/proftpd/controls.log
# An upload directory that allows storing files but not retrieving
# or creating directories.
- <Directory uploads/*>
- AllowOverwrite no
- <Limit READ>
- DenyAll
- </Limit>
-
- <Limit STOR>
- AllowAll
- </Limit>
- </Directory>
+ #
+ # Directory specification is slightly different if mod_vroot is in
+ # use: see http://sourceforge.net/p/proftp/mailman/message/31728570/
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1045922
+ <IfModule mod_vroot.c>
+ <Directory /uploads/*>
+ AllowOverwrite no
+ <Limit READ>
+ DenyAll
+ </Limit>
+
+ <Limit STOR>
+ AllowAll
+ </Limit>
+ </Directory>
+ </IfModule>
+ <IfModule !mod_vroot.c>
+ <Directory uploads/*>
+ AllowOverwrite no
+ <Limit READ>
+ DenyAll
+ </Limit>
+
+ <Limit STOR>
+ AllowAll
+ </Limit>
+ </Directory>
+ </IfModule>
# Don't write anonymous accesses to the system wtmp file (good idea!)
WtmpLog off
diff --git a/proftpd.spec b/proftpd.spec
index 637459c..d77eb90 100644
--- a/proftpd.spec
+++ b/proftpd.spec
@@ -41,12 +41,12 @@
%define _hardened_build 1
#global prever rc3
-%global rpmrel 3
+%global rpmrel 4
Summary: Flexible, stable and highly-configurable FTP server
Name: proftpd
Version: 1.3.5
-Release: %{?prever:0.}%{rpmrel}%{?prever:.%{prever}}%{?dist}.1
+Release: %{?prever:0.}%{rpmrel}%{?prever:.%{prever}}%{?dist}
License: GPLv2+
Group: System Environment/Daemons
URL: http://www.proftpd.org/
@@ -223,7 +223,7 @@ mv contrib/README contrib/README.contrib
# If we don't have libmemcached support, remove the mod_tls_memcache
# snippet from the config file
%if 0%{!?have_libmemcached:1}
-%patch2 -p0
+%patch2
%endif
# Tweak logrotate script for systemd compatibility (#802178)
@@ -388,7 +388,12 @@ else
fi
%files -f proftpd.lang
-%doc COPYING CREDITS ChangeLog NEWS README
+%if 0%{?_licensedir:1}
+%license COPYING
+%else
+%doc COPYING
+%endif
+%doc CREDITS ChangeLog NEWS README
%doc README.DSO README.modules README.IPv6 README.PAM
%doc README.capabilities README.classes README.controls README.facl
%doc contrib/README.contrib contrib/README.ratio
@@ -494,6 +499,12 @@ fi
%{_mandir}/man1/ftpwho.1*
%changelog
+* Tue Feb 10 2015 Paul Howarth <paul at city-fan.org> - 1.3.5-4
+- Anonymous upload directory specification needs to be slightly different if
+ mod_vroot is in use (#1045922)
+ http://sourceforge.net/p/proftp/mailman/message/31728570/
+- Use %%license where possible
+
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.5-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
More information about the scm-commits
mailing list