diff options
author | beech <beech@FreeBSD.org> | 2008-03-04 06:12:52 +0800 |
---|---|---|
committer | beech <beech@FreeBSD.org> | 2008-03-04 06:12:52 +0800 |
commit | a9c92391b8576c9c70f81cfcaac9c050d6f70be3 (patch) | |
tree | dc4c469a9da2adbbdb8d1e00a7074ba36c17cde9 /ftp | |
parent | b779f4d8d1015ed4289c83cdb58566dd3c5d955f (diff) | |
download | freebsd-ports-gnome-a9c92391b8576c9c70f81cfcaac9c050d6f70be3.tar.gz freebsd-ports-gnome-a9c92391b8576c9c70f81cfcaac9c050d6f70be3.tar.zst freebsd-ports-gnome-a9c92391b8576c9c70f81cfcaac9c050d6f70be3.zip |
- Add vendor patch
- Bump portrevision
- The mod_wrap2_file module does not
support comma-delimited lists of clients in the allow/deny files, unlike the
standard libwrap library.
Obtained from: TJ Saunders <tj@castaglia.org> (vendor)
Diffstat (limited to 'ftp')
-rw-r--r-- | ftp/proftpd-devel/Makefile | 2 | ||||
-rw-r--r-- | ftp/proftpd-devel/files/patch-contrib_mod_wrap2_file.c | 72 | ||||
-rw-r--r-- | ftp/proftpd/Makefile | 2 | ||||
-rw-r--r-- | ftp/proftpd/files/patch-contrib_mod_wrap2_file.c | 72 |
4 files changed, 146 insertions, 2 deletions
diff --git a/ftp/proftpd-devel/Makefile b/ftp/proftpd-devel/Makefile index 185aecc6d91d..60ca1ce29d46 100644 --- a/ftp/proftpd-devel/Makefile +++ b/ftp/proftpd-devel/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-devel/files/patch-contrib_mod_wrap2_file.c b/ftp/proftpd-devel/files/patch-contrib_mod_wrap2_file.c new file mode 100644 index 000000000000..68a46bb616ef --- /dev/null +++ b/ftp/proftpd-devel/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) 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) |