aboutsummaryrefslogtreecommitdiff
path: root/ftp
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2008-03-27 03:37:53 +0000
committerBeech Rintoul <beech@FreeBSD.org>2008-03-27 03:37:53 +0000
commit925627b8e3c7185c19a99b34821ccff294671752 (patch)
tree23d7cce2179c35a4f131ecdaee86c31138f24502 /ftp
parent1b0bc053f2d2bb9e4e3d21ca12b9c378a7b09294 (diff)
downloadports-925627b8e3c7185c19a99b34821ccff294671752.tar.gz
ports-925627b8e3c7185c19a99b34821ccff294671752.zip
Notes
Diffstat (limited to 'ftp')
-rw-r--r--ftp/proftpd-devel/Makefile2
-rw-r--r--ftp/proftpd-devel/files/patch-contrib_mod_quotatab_sql.c92
-rw-r--r--ftp/proftpd/Makefile2
-rw-r--r--ftp/proftpd/files/patch-contrib_mod_quotatab_sql.c92
4 files changed, 186 insertions, 2 deletions
diff --git a/ftp/proftpd-devel/Makefile b/ftp/proftpd-devel/Makefile
index 60ca1ce29d46..a57676ce9957 100644
--- a/ftp/proftpd-devel/Makefile
+++ b/ftp/proftpd-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= proftpd
DISTVERSION= 1.3.1
-PORTREVISION= 9
+PORTREVISION= 10
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_quotatab_sql.c b/ftp/proftpd-devel/files/patch-contrib_mod_quotatab_sql.c
new file mode 100644
index 000000000000..509a621463c5
--- /dev/null
+++ b/ftp/proftpd-devel/files/patch-contrib_mod_quotatab_sql.c
@@ -0,0 +1,92 @@
+diff -u -r1.7 mod_quotatab_sql.c
+--- contrib/mod_quotatab_sql.c 23 Jun 2005 23:23:30 -0000 1.7
++++ contrib/mod_quotatab_sql.c 27 Mar 2008 01:42:58 -0000
+@@ -2,7 +2,7 @@
+ * ProFTPD: mod_quotatab_sql -- a mod_quotatab sub-module for managing quota
+ * data via SQL-based tables
+ *
+- * Copyright (c) 2002-2003 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
+@@ -289,17 +289,36 @@
+
+ /* Match names if need be */
+ if (quota_type != ALL_QUOTA &&
+- values[0] && strlen(values[0]) && strcmp(name, quotatab_tally.name)) {
++ values[0] &&
++ strlen(values[0]) > 0 &&
++ strcmp(name, quotatab_tally.name) != 0) {
+ destroy_pool(tmp_pool);
+ return FALSE;
+ }
+
+- quotatab_tally.bytes_in_used = atof(values[2]);
+- quotatab_tally.bytes_out_used = atof(values[3]);
+- quotatab_tally.bytes_xfer_used = atof(values[4]);
+- quotatab_tally.files_in_used = atoi(values[5]);
+- quotatab_tally.files_out_used = atoi(values[6]);
+- quotatab_tally.files_xfer_used = atoi(values[7]);
++ quotatab_tally.bytes_in_used = -1.0;
++ if (values[2])
++ quotatab_tally.bytes_in_used = atof(values[2]);
++
++ quotatab_tally.bytes_out_used = -1.0;
++ if (values[3])
++ quotatab_tally.bytes_out_used = atof(values[3]);
++
++ quotatab_tally.bytes_xfer_used = -1.0;
++ if (values[4])
++ quotatab_tally.bytes_xfer_used = atof(values[4]);
++
++ quotatab_tally.files_in_used = 0;
++ if (values[5])
++ quotatab_tally.files_in_used = atol(values[5]);
++
++ quotatab_tally.files_out_used = 0;
++ if (values[6])
++ quotatab_tally.files_out_used = atol(values[6]);
++
++ quotatab_tally.files_xfer_used = 0;
++ if (values[7])
++ quotatab_tally.files_xfer_used = atol(values[7]);
+
+ destroy_pool(tmp_pool);
+ return TRUE;
+@@ -368,12 +387,29 @@
+ else if (strcasecmp(values[3], "hard") == 0)
+ quotatab_limit.quota_limit_type = HARD_LIMIT;
+
+- quotatab_limit.bytes_in_avail = atof(values[4]);
+- quotatab_limit.bytes_out_avail = atof(values[5]);
+- quotatab_limit.bytes_xfer_avail = atof(values[6]);
+- quotatab_limit.files_in_avail = atol(values[7]);
+- quotatab_limit.files_out_avail = atol(values[8]);
+- quotatab_limit.files_xfer_avail = atol(values[9]);
++ quotatab_limit.bytes_in_avail = -1.0;
++ if (values[4])
++ quotatab_limit.bytes_in_avail = atof(values[4]);
++
++ quotatab_limit.bytes_out_avail = -1.0;
++ if (values[5])
++ quotatab_limit.bytes_out_avail = atof(values[5]);
++
++ quotatab_limit.bytes_xfer_avail = -1.0;
++ if (values[6])
++ quotatab_limit.bytes_xfer_avail = atof(values[6]);
++
++ quotatab_limit.files_in_avail = 0;
++ if (values[7])
++ quotatab_limit.files_in_avail = atol(values[7]);
++
++ quotatab_limit.files_out_avail = 0;
++ if (values[8])
++ quotatab_limit.files_out_avail = atol(values[8]);
++
++ quotatab_limit.files_xfer_avail = 0;
++ if (values[9])
++ quotatab_limit.files_xfer_avail = atol(values[9]);
+
+ destroy_pool(tmp_pool);
+ return TRUE;
diff --git a/ftp/proftpd/Makefile b/ftp/proftpd/Makefile
index 60ca1ce29d46..a57676ce9957 100644
--- a/ftp/proftpd/Makefile
+++ b/ftp/proftpd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= proftpd
DISTVERSION= 1.3.1
-PORTREVISION= 9
+PORTREVISION= 10
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_quotatab_sql.c b/ftp/proftpd/files/patch-contrib_mod_quotatab_sql.c
new file mode 100644
index 000000000000..509a621463c5
--- /dev/null
+++ b/ftp/proftpd/files/patch-contrib_mod_quotatab_sql.c
@@ -0,0 +1,92 @@
+diff -u -r1.7 mod_quotatab_sql.c
+--- contrib/mod_quotatab_sql.c 23 Jun 2005 23:23:30 -0000 1.7
++++ contrib/mod_quotatab_sql.c 27 Mar 2008 01:42:58 -0000
+@@ -2,7 +2,7 @@
+ * ProFTPD: mod_quotatab_sql -- a mod_quotatab sub-module for managing quota
+ * data via SQL-based tables
+ *
+- * Copyright (c) 2002-2003 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
+@@ -289,17 +289,36 @@
+
+ /* Match names if need be */
+ if (quota_type != ALL_QUOTA &&
+- values[0] && strlen(values[0]) && strcmp(name, quotatab_tally.name)) {
++ values[0] &&
++ strlen(values[0]) > 0 &&
++ strcmp(name, quotatab_tally.name) != 0) {
+ destroy_pool(tmp_pool);
+ return FALSE;
+ }
+
+- quotatab_tally.bytes_in_used = atof(values[2]);
+- quotatab_tally.bytes_out_used = atof(values[3]);
+- quotatab_tally.bytes_xfer_used = atof(values[4]);
+- quotatab_tally.files_in_used = atoi(values[5]);
+- quotatab_tally.files_out_used = atoi(values[6]);
+- quotatab_tally.files_xfer_used = atoi(values[7]);
++ quotatab_tally.bytes_in_used = -1.0;
++ if (values[2])
++ quotatab_tally.bytes_in_used = atof(values[2]);
++
++ quotatab_tally.bytes_out_used = -1.0;
++ if (values[3])
++ quotatab_tally.bytes_out_used = atof(values[3]);
++
++ quotatab_tally.bytes_xfer_used = -1.0;
++ if (values[4])
++ quotatab_tally.bytes_xfer_used = atof(values[4]);
++
++ quotatab_tally.files_in_used = 0;
++ if (values[5])
++ quotatab_tally.files_in_used = atol(values[5]);
++
++ quotatab_tally.files_out_used = 0;
++ if (values[6])
++ quotatab_tally.files_out_used = atol(values[6]);
++
++ quotatab_tally.files_xfer_used = 0;
++ if (values[7])
++ quotatab_tally.files_xfer_used = atol(values[7]);
+
+ destroy_pool(tmp_pool);
+ return TRUE;
+@@ -368,12 +387,29 @@
+ else if (strcasecmp(values[3], "hard") == 0)
+ quotatab_limit.quota_limit_type = HARD_LIMIT;
+
+- quotatab_limit.bytes_in_avail = atof(values[4]);
+- quotatab_limit.bytes_out_avail = atof(values[5]);
+- quotatab_limit.bytes_xfer_avail = atof(values[6]);
+- quotatab_limit.files_in_avail = atol(values[7]);
+- quotatab_limit.files_out_avail = atol(values[8]);
+- quotatab_limit.files_xfer_avail = atol(values[9]);
++ quotatab_limit.bytes_in_avail = -1.0;
++ if (values[4])
++ quotatab_limit.bytes_in_avail = atof(values[4]);
++
++ quotatab_limit.bytes_out_avail = -1.0;
++ if (values[5])
++ quotatab_limit.bytes_out_avail = atof(values[5]);
++
++ quotatab_limit.bytes_xfer_avail = -1.0;
++ if (values[6])
++ quotatab_limit.bytes_xfer_avail = atof(values[6]);
++
++ quotatab_limit.files_in_avail = 0;
++ if (values[7])
++ quotatab_limit.files_in_avail = atol(values[7]);
++
++ quotatab_limit.files_out_avail = 0;
++ if (values[8])
++ quotatab_limit.files_out_avail = atol(values[8]);
++
++ quotatab_limit.files_xfer_avail = 0;
++ if (values[9])
++ quotatab_limit.files_xfer_avail = atol(values[9]);
+
+ destroy_pool(tmp_pool);
+ return TRUE;