[proftpd] Update mod_vroot to 0.9.1

Paul Howarth pghmcfc at fedoraproject.org
Wed Jan 5 11:57:31 UTC 2011


commit fbfebe84252b9a13ebf9d088e825fb90d2c59f44
Author: Paul Howarth <paul at city-fan.org>
Date:   Wed Jan 5 11:55:31 2011 +0000

    Update mod_vroot to 0.9.1
    
    New upstream release 0.9.1 of mod_vroot
    
    Add upstream patch making netacl unit test work on systems where
    127.0.0.1 maps to localhost.localdomain rather than just localhost

 .gitignore                              |    2 +-
 proftpd-1.3.4rc1-netacl-localhost.patch |  103 +++++++++++++++++++++++++++++++
 proftpd.spec                            |   20 +++++-
 sources                                 |    2 +-
 4 files changed, 122 insertions(+), 5 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 96137a1..a3be245 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
 /proftpd-1.3.4rc1.tar.bz2
 /proftpd-mod-geoip-0.2.tar.gz
-/proftpd-mod-vroot-0.9.tar.gz
+/proftpd-mod-vroot-0.9.1.tar.gz
 /Test-Unit-0.14.tar.gz
diff --git a/proftpd-1.3.4rc1-netacl-localhost.patch b/proftpd-1.3.4rc1-netacl-localhost.patch
new file mode 100644
index 0000000..33f7610
--- /dev/null
+++ b/proftpd-1.3.4rc1-netacl-localhost.patch
@@ -0,0 +1,103 @@
+--- proftpd-1.3.4rc1/tests/api/netacl.c	2010/10/23 19:39:46	1.2
++++ proftpd-1.3.4rc1/tests/api/netacl.c	2010/12/27 05:23:48	1.3
+@@ -1,6 +1,6 @@
+ /*
+  * ProFTPD - FTP server testsuite
+- * Copyright (c) 2008 The ProFTPD Project team
++ * Copyright (c) 2008-2010 The ProFTPD Project team
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published by
+@@ -24,7 +24,7 @@
+ 
+ /*
+  * NetACL API tests
+- * $Id: netacl.c,v 1.2 2010/10/23 19:39:46 castaglia Exp $
++ * $Id: netacl.c,v 1.3 2010/12/27 05:23:48 castaglia Exp $
+  */
+ 
+ #include "tests.h"
+@@ -404,7 +404,7 @@
+   pr_netacl_t *acl;
+   pr_netaddr_t *addr;
+   char *acl_str;
+-  int res;
++  int have_localdomain = FALSE, res;
+ 
+   res = pr_netacl_match(NULL, NULL);
+   fail_unless(res == -2, "Failed to handle NULL arguments");
+@@ -423,6 +423,14 @@
+   fail_unless(addr != NULL, "Failed to get addr for '%s': %s", "localhost",
+     strerror(errno));
+ 
++  /* It's possible that the DNS name for 'localhost' that is used will
++   * actually be 'localhost.localdomain', depending on the contents of
++   * the host's /etc/hosts file.
++   */
++  if (strcmp(pr_netaddr_get_dnsstr(addr), "localhost.localdomain") == 0) {
++    have_localdomain = TRUE;
++  }
++
+   res = pr_netacl_match(NULL, addr);
+   fail_unless(res == -2, "Failed to handle NULL ACL");
+   fail_unless(errno == EINVAL, "Failed to set errno to EINVAL");
+@@ -511,7 +519,13 @@
+   fail_unless(res == -1, "Failed to negatively match ACL to addr: %s",
+     strerror(errno));
+ 
+-  acl_str = pstrdup(p, "localhost");
++  if (!have_localdomain) {
++    acl_str = pstrdup(p, "localhost");
++
++  } else {
++    acl_str = pstrdup(p, "localhost.localdomain");
++  }
++
+   acl = pr_netacl_create(p, acl_str);
+   fail_unless(acl != NULL, "Failed to handle ACL string '%s': %s", acl_str,
+     strerror(errno));
+@@ -520,7 +534,13 @@
+   fail_unless(res == 1, "Failed to positively match ACL to addr: %s",
+     strerror(errno));
+ 
+-  acl_str = pstrdup(p, "!localhost");
++  if (!have_localdomain) {
++    acl_str = pstrdup(p, "!localhost");
++
++  } else {
++    acl_str = pstrdup(p, "!localhost.localdomain");
++  }
++
+   acl = pr_netacl_create(p, acl_str);
+   fail_unless(acl != NULL, "Failed to handle ACL string '%s': %s", acl_str,
+     strerror(errno));
+@@ -529,7 +549,13 @@
+   fail_unless(res == -1, "Failed to negatively match ACL to addr: %s",
+     strerror(errno));
+ 
+-  acl_str = pstrdup(p, "loc*st");
++  if (!have_localdomain) {
++    acl_str = pstrdup(p, "loc*st");
++
++  } else {
++    acl_str = pstrdup(p, "loc*st.loc*in");
++  }
++
+   acl = pr_netacl_create(p, acl_str);
+   fail_unless(acl != NULL, "Failed to handle ACL string '%s': %s", acl_str,
+     strerror(errno));
+@@ -538,7 +564,13 @@
+   fail_unless(res == 1, "Failed to positively match ACL to addr: %s",
+     strerror(errno));
+ 
+-  acl_str = pstrdup(p, "!loc*st");
++  if (!have_localdomain) {
++    acl_str = pstrdup(p, "!loc*st");
++
++  } else {
++    acl_str = pstrdup(p, "!loc*st.loc*in");
++  }
++
+   acl = pr_netacl_create(p, acl_str);
+   fail_unless(acl != NULL, "Failed to handle ACL string '%s': %s", acl_str,
+     strerror(errno));
diff --git a/proftpd.spec b/proftpd.spec
index 8361a9e..c33eb4b 100644
--- a/proftpd.spec
+++ b/proftpd.spec
@@ -12,7 +12,7 @@
 %endif
 
 %global prever rc1
-%global rpmrel 1
+%global rpmrel 2
 
 Summary:		Flexible, stable and highly-configurable FTP server
 Name:			proftpd
@@ -31,7 +31,7 @@ Source6:		proftpd.pam
 Source7:		proftpd-mod_quotatab_ldap.ldif
 Source8:		proftpd-mod_quotatab_ldap.schema
 Source9:		proftpd.sysconfig
-Source10:		http://www.castaglia.org/proftpd/modules/proftpd-mod-vroot-0.9.tar.gz
+Source10:		http://www.castaglia.org/proftpd/modules/proftpd-mod-vroot-0.9.1.tar.gz
 Source11:		http://www.castaglia.org/proftpd/modules/proftpd-mod-geoip-0.2.tar.gz
 Source12:		proftpd-tmpfs.conf
 # The integration tests require perl(Test::Unit) 0.14, which is the latest release on CPAN
@@ -42,6 +42,7 @@ Source12:		proftpd-tmpfs.conf
 Source13:		http://search.cpan.org/CPAN/authors/id/C/CL/CLEMBURG/Test-Unit-0.14.tar.gz
 Patch0:			proftpd-1.3.2rc3-nostrip.patch
 Patch1:			proftpd-1.3.4rc1-tests.patch
+Patch2:			proftpd-1.3.4rc1-netacl-localhost.patch
 BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root
 Requires(post):		/sbin/chkconfig
 Requires(preun):	/sbin/service, /sbin/chkconfig, coreutils, findutils
@@ -105,9 +106,12 @@ Module to add PostgreSQL support to the ProFTPD FTP server.
 %prep
 %setup -q -n %{name}-%{version}%{?prever} -a 10 -a 11 -a 13
 
-# Copy mod_vroot source and documentation into place
+# Copy mod_vroot source, documentation and tests into place
 %{__cp} -p mod_vroot/mod_vroot.c contrib/
 %{__cp} -p mod_vroot/mod_vroot.html doc/contrib/
+%{__cp} -p mod_vroot/t/lib/ProFTPD/Tests/Modules/mod_vroot.pm \
+	tests/t/lib/ProFTPD/Tests/Modules/
+%{__cp} -p mod_vroot/t/modules/mod_vroot.t tests/t/modules/
 
 # Copy mod_geoip source and documentation into place
 %{__cp} -p mod_geoip/mod_geoip.c contrib/
@@ -119,6 +123,11 @@ Module to add PostgreSQL support to the ProFTPD FTP server.
 # Upstream patch (http://bugs.proftpd.org/3568), modified slightly, to fix the API tests
 %patch1 -p1 -b .tests
 
+# Upstream patch handling localhost.localdomain as alternative to just localhost
+# when looking up name of 127.0.0.1 for testing purposes
+# http://proftp.cvs.sourceforge.net/viewvc/proftp/proftpd/tests/api/netacl.c?r1=1.2&r2=1.3
+%patch2 -p1 -b .localdomain
+
 # Avoid documentation name conflicts
 %{__mv} contrib/README contrib/README.contrib
 
@@ -349,6 +358,11 @@ fi
 %{_libexecdir}/proftpd/mod_sql_postgres.so
 
 %changelog
+* Wed Jan  5 2011 Paul Howarth <paul at city-fan.org> 1.3.4-0.2.rc1
+- Update mod_vroot to 0.9.1
+- Add upstream patch making netacl unit test work on systems where 127.0.0.1
+  maps to localhost.localdomain rather than just localhost
+
 * Fri Dec 24 2010 Paul Howarth <paul at city-fan.org> 1.3.4-0.1.rc1
 - Update to 1.3.4rc1 (see RELEASE_NOTES for full details)
   - Added Japanese translation
diff --git a/sources b/sources
index a9e2c08..9bc2325 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
 3472f7a8fb760f549daf485642277024  proftpd-1.3.4rc1.tar.bz2
 6242218c0c98efbab8076ec3bc9fd4d5  proftpd-mod-geoip-0.2.tar.gz
-181669582a2cf5d54f0df15a4d83eae6  proftpd-mod-vroot-0.9.tar.gz
+03d114027397d62b0e3bd53337886952  proftpd-mod-vroot-0.9.1.tar.gz
 ad574713bcd00f62883ff2f9a84eec1f  Test-Unit-0.14.tar.gz


More information about the scm-commits mailing list