aboutsummaryrefslogtreecommitdiff
path: root/ftp/proftpd
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2008-03-03 22:12:52 +0000
committerBeech Rintoul <beech@FreeBSD.org>2008-03-03 22:12:52 +0000
commit5ce718fa2c2b21ca094201fe812060542bcca9b4 (patch)
treea14dafca6fe7eaa96fe46e761761fb578d876ab9 /ftp/proftpd
parent7391f280cd301403cebd84ad47951c7bc755d785 (diff)
downloadports-5ce718fa2c2b21ca094201fe812060542bcca9b4.tar.gz
ports-5ce718fa2c2b21ca094201fe812060542bcca9b4.zip
Notes
Diffstat (limited to 'ftp/proftpd')
-rw-r--r--ftp/proftpd/Makefile2
-rw-r--r--ftp/proftpd/files/patch-contrib_mod_wrap2_file.c72
2 files changed, 73 insertions, 1 deletions
diff --git a/ftp/proftpd/Makefile b/ftp/proftpd/Makefile
index 185aecc6d91d..60ca1ce29d46 100644
--- a/ftp/proftpd/Makefile
+++ b/ftp/proftpd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= proftpd
DISTVERSION= 1.3.1
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= ftp
MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
ftp://ftp.fastorama.com/mirrors/ftp.proftpd.org/distrib/source/ \
diff --git a/ftp/proftpd/files/patch-contrib_mod_wrap2_file.c b/ftp/proftpd/files/patch-contrib_mod_wrap2_file.c
new file mode 100644
index 000000000000..68a46bb616ef
--- /dev/null
+++ b/ftp/proftpd/files/patch-contrib_mod_wrap2_file.c
@@ -0,0 +1,72 @@
+--- contrib/mod_wrap2_file.c.orig 2007-08-03 06:52:06.000000000 -0800
++++ contrib/mod_wrap2_file.c 2008-03-03 12:33:19.000000000 -0900
+@@ -2,7 +2,7 @@
+ * ProFTPD: mod_wrap2_file -- a mod_wrap2 sub-module for supplying IP-based
+ * access control data via file-based tables
+ *
+- * Copyright (c) 2002-2007 TJ Saunders
++ * Copyright (c) 2002-2008 TJ Saunders
+ *
+ * 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
+@@ -22,12 +22,12 @@
+ * with OpenSSL, and distribute the resulting executable, without including
+ * the source code for OpenSSL in the source distribution.
+ *
+- * $Id: mod_wrap2_file.c,v 1.4 2007/08/03 14:52:06 castaglia Exp $
++ * $Id: mod_wrap2_file.c,v 1.6 2008/03/03 16:26:28 castaglia Exp $
+ */
+
+ #include "mod_wrap2.h"
+
+-#define MOD_WRAP2_FILE_VERSION "mod_wrap2_file/1.1"
++#define MOD_WRAP2_FILE_VERSION "mod_wrap2_file/1.2"
+
+ static const char *filetab_service_name = NULL;
+
+@@ -74,7 +74,9 @@
+ service = pstrndup(filetab->tab_pool, buf, (res - buf));
+
+ if (filetab_service_name &&
+- strcasecmp(filetab_service_name, service) == 0) {
++ (strcasecmp(filetab_service_name, service) == 0 ||
++ strcasecmp("ALL", service) == 0)) {
++ char *tmp = NULL;
+
+ if (filetab_daemons_list == NULL)
+ filetab_daemons_list = make_array(filetab->tab_pool, 0, sizeof(char *));
+@@ -91,9 +93,31 @@
+ if (filetab_clients_list == NULL)
+ filetab_clients_list = make_array(filetab->tab_pool, 0, sizeof(char *));
+
+- *((char **) push_array(filetab_clients_list)) =
+- pstrdup(filetab->tab_pool, res);
+-
++ /* If there are commas in the line, parse them as separate client
++ * names. Otherwise, a comma-delimited list of names will be treated
++ * as a single name, and violate the principal of least surprise
++ * for the site admin.
++ */
++ tmp = strchr(res, ',');
++ if (tmp != NULL) {
++ char *dup = pstrdup(filetab->tab_pool, res);
++ char *word;
++
++ while ((word = pr_str_get_word(&dup, 0)) != NULL) {
++ size_t wordlen = strlen(word);
++
++ /* Remove any trailing comma */
++ if (word[wordlen-1] == ',')
++ word[wordlen-1] = '\0';
++
++ *((char **) push_array(filetab_clients_list)) = word;
++ }
++
++ } else {
++ *((char **) push_array(filetab_clients_list)) =
++ pstrdup(filetab->tab_pool, res);
++ }
++
+ res = wrap2_strsplit(res, ':');
+ if (res) {
+ if (filetab_options_list == NULL)