summaryrefslogtreecommitdiff
path: root/net/proftpd
diff options
context:
space:
mode:
authormartti <martti@pkgsrc.org>2008-10-03 06:52:03 +0000
committermartti <martti@pkgsrc.org>2008-10-03 06:52:03 +0000
commit81ac11e5f374e338eb08b0abb89c6b8a947ffc57 (patch)
treede9370e88d513b9bc17ba3220b224241d2522090 /net/proftpd
parenta17d4908f83c367a7f13841f8cb61d0e8a218558 (diff)
downloadpkgsrc-81ac11e5f374e338eb08b0abb89c6b8a947ffc57.tar.gz
Updated net/proftpd to 1.3.2rc2
Fix for http://bugs.proftpd.org/show_bug.cgi?id=3115
Diffstat (limited to 'net/proftpd')
-rw-r--r--net/proftpd/Makefile14
-rw-r--r--net/proftpd/PLIST16
-rw-r--r--net/proftpd/distinfo16
-rw-r--r--net/proftpd/patches/patch-aa14
-rw-r--r--net/proftpd/patches/patch-ab14
-rw-r--r--net/proftpd/patches/patch-ac16
-rw-r--r--net/proftpd/patches/patch-ad80
-rw-r--r--net/proftpd/patches/patch-ae117
8 files changed, 250 insertions, 37 deletions
diff --git a/net/proftpd/Makefile b/net/proftpd/Makefile
index 6fabe523b18..925f730fd86 100644
--- a/net/proftpd/Makefile
+++ b/net/proftpd/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.47 2008/06/12 02:14:41 joerg Exp $
+# $NetBSD: Makefile,v 1.48 2008/10/03 06:52:03 martti Exp $
-DISTNAME= proftpd-1.3.1
+DISTNAME= proftpd-1.3.2rc2
#PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
@@ -20,8 +20,8 @@ WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
GNU_CONFIGURE= yes
USE_TOOLS+= gmake intltool
-CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
-CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= --localstatedir=${VARBASE}
CONFIGURE_ARGS+= --disable-sendfile
CONFIGURE_ARGS+= --enable-ctrls
CONFIGURE_ARGS+= --enable-nls
@@ -32,14 +32,14 @@ BUILD_DEFS+= VARBASE
RCD_SCRIPTS= proftpd
-CONF_FILES= ${PREFIX:Q}/share/examples/proftpd/basic.conf \
- ${PKG_SYSCONFDIR:Q}/proftpd.conf
+CONF_FILES= ${PREFIX}/share/examples/proftpd/basic.conf \
+ ${PKG_SYSCONFDIR}/proftpd.conf
SUBST_CLASSES+= man
SUBST_MESSAGE.man= Fixing paths in manual pages.
SUBST_STAGE.man= pre-configure
SUBST_FILES.man= utils/ftpcount.1.in utils/ftptop.1.in utils/ftpwho.1.in
-SUBST_SED.man= -e s,@LOCALSTATEDIR@/run/proftpd,${VARBASE:Q}/run,
+SUBST_SED.man= -e s,@LOCALSTATEDIR@/run/proftpd,${VARBASE}/run,
INSTALLATION_DIRS+= share/doc/proftpd
INSTALLATION_DIRS+= share/examples/proftpd
diff --git a/net/proftpd/PLIST b/net/proftpd/PLIST
index b91f21a0faa..e4bcfe77bfc 100644
--- a/net/proftpd/PLIST
+++ b/net/proftpd/PLIST
@@ -1,8 +1,9 @@
-@comment $NetBSD: PLIST,v 1.13 2007/07/06 11:04:40 martti Exp $
+@comment $NetBSD: PLIST,v 1.14 2008/10/03 06:52:03 martti Exp $
bin/ftpcount
bin/ftpdctl
bin/ftptop
bin/ftpwho
+bin/prxs
include/proftpd/auth.h
include/proftpd/bindings.h
include/proftpd/buildstamp.h
@@ -16,14 +17,15 @@ include/proftpd/data.h
include/proftpd/default_paths.h
include/proftpd/dirtree.h
include/proftpd/display.h
+include/proftpd/encode.h
include/proftpd/env.h
include/proftpd/event.h
+include/proftpd/expr.h
include/proftpd/feat.h
include/proftpd/fsio.h
include/proftpd/ftp.h
include/proftpd/glibc-glob.h
include/proftpd/help.h
-include/proftpd/ident.h
include/proftpd/inet.h
include/proftpd/libsupp.h
include/proftpd/log.h
@@ -45,14 +47,16 @@ include/proftpd/regexp.h
include/proftpd/response.h
include/proftpd/scoreboard.h
include/proftpd/sets.h
+include/proftpd/str.h
include/proftpd/support.h
include/proftpd/table.h
+include/proftpd/throttle.h
include/proftpd/timers.h
include/proftpd/trace.h
-include/proftpd/utf8.h
include/proftpd/var.h
include/proftpd/version.h
include/proftpd/xferlog.h
+lib/pkgconfig/proftpd.pc
man/man1/ftpcount.1
man/man1/ftptop.1
man/man1/ftpwho.1
@@ -82,6 +86,10 @@ share/examples/proftpd/complex-virtual.conf
share/examples/proftpd/mod_sql.conf
share/examples/proftpd/virtual.conf
share/examples/rc.d/proftpd
-@dirrm share/doc/proftpd
+share/locale/en_US/LC_MESSAGES/proftpd.mo
+share/locale/it_IT/LC_MESSAGES/proftpd.mo
+share/locale/zh_CN/LC_MESSAGES/proftpd.mo
@dirrm share/examples/proftpd
+@dirrm share/doc/proftpd
+@dirrm lib/proftpd
@dirrm include/proftpd
diff --git a/net/proftpd/distinfo b/net/proftpd/distinfo
index bb9130b2d25..4403b939a40 100644
--- a/net/proftpd/distinfo
+++ b/net/proftpd/distinfo
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.25 2007/10/12 10:06:20 martti Exp $
+$NetBSD: distinfo,v 1.26 2008/10/03 06:52:03 martti Exp $
-SHA1 (proftpd-1.3.1.tar.bz2) = 0b54286492967172c5355e2f489f9665b46591e5
-RMD160 (proftpd-1.3.1.tar.bz2) = ed47f7a7c446b01c3d00d2d25d89573c787da905
-Size (proftpd-1.3.1.tar.bz2) = 2243888 bytes
-SHA1 (patch-aa) = d7ad034e763a2bf729c9af669c3094402bdd03b7
-SHA1 (patch-ab) = f214c7b321028bda1c27d654059b2a1d6aa73cbc
-SHA1 (patch-ac) = be33bb40718c4f5a124e2c80ad5dfe8db28e3af3
+SHA1 (proftpd-1.3.2rc2.tar.bz2) = 94c5e71a7be7e65ae04d97df62c8b3675398c3b6
+RMD160 (proftpd-1.3.2rc2.tar.bz2) = 4048327e14ce4e03075bbfdb6de4adb4d5e23f61
+Size (proftpd-1.3.2rc2.tar.bz2) = 2356053 bytes
+SHA1 (patch-aa) = e254d3a2d31ec43a408d80c8974f1b346fbc7e5a
+SHA1 (patch-ab) = 7f03db9449506499fa49361aed51f15f1b1043c9
+SHA1 (patch-ac) = 2de0ce81727c8823a3cba87c4631fe02153eba13
+SHA1 (patch-ad) = f65da6a6ff954c259af9123324876a60182cfac9
+SHA1 (patch-ae) = 3421c4b1084208834aac253883e3ac2326d79c6a
diff --git a/net/proftpd/patches/patch-aa b/net/proftpd/patches/patch-aa
index e80cec155c6..e537856c752 100644
--- a/net/proftpd/patches/patch-aa
+++ b/net/proftpd/patches/patch-aa
@@ -1,13 +1,15 @@
-$NetBSD: patch-aa,v 1.9 2007/01/13 09:47:38 martti Exp $
+$NetBSD: patch-aa,v 1.10 2008/10/03 06:52:03 martti Exp $
---- Makefile.in.orig 2007-01-10 02:19:02.000000000 +0000
-+++ Makefile.in 2007-01-13 11:40:16.000000000 +0000
-@@ -122,7 +122,7 @@
+Make this pkgsrc friendly.
+
+--- Makefile.in.orig 2008-09-08 23:56:02.000000000 +0300
++++ Makefile.in 2008-10-03 09:35:29.000000000 +0300
+@@ -142,7 +142,7 @@
$(INSTALL_MAN) $(top_srcdir)/utils/ftpwho.1 $(DESTDIR)$(mandir)/man1
$(INSTALL_MAN) $(top_srcdir)/src/xferlog.5 $(DESTDIR)$(mandir)/man5
--install-all: install-proftpd install-modules install-utils install-conf install-man install-headers install-locales $(INSTALL_DEPS)
-+install-all: install-proftpd install-modules install-utils install-man install-headers install-locales $(INSTALL_DEPS)
+-install-all: install-proftpd install-modules install-utils install-conf install-man install-libs install-headers install-pkgconfig install-locales $(INSTALL_DEPS)
++install-all: install-proftpd install-modules install-utils install-man install-libs install-headers install-pkgconfig install-locales $(INSTALL_DEPS)
install: all install-all
diff --git a/net/proftpd/patches/patch-ab b/net/proftpd/patches/patch-ab
index 8d4a255625b..f913c376685 100644
--- a/net/proftpd/patches/patch-ab
+++ b/net/proftpd/patches/patch-ab
@@ -1,9 +1,11 @@
-$NetBSD: patch-ab,v 1.7 2007/07/06 11:04:40 martti Exp $
+$NetBSD: patch-ab,v 1.8 2008/10/03 06:52:03 martti Exp $
---- configure.orig 2007-05-23 00:01:32.000000000 +0300
-+++ configure 2007-07-06 13:52:59.000000000 +0300
-@@ -37098,7 +37098,7 @@
- _ACEOF
+Make this pkgsrc friendly.
+
+--- configure.orig 2008-09-02 19:00:54.000000000 +0300
++++ configure 2008-10-03 09:35:50.000000000 +0300
+@@ -36925,7 +36925,7 @@
+
cat >>confdefs.h <<_ACEOF
-#define PR_RUN_DIR "`eval echo "${localstatedir}/proftpd"`"
@@ -11,7 +13,7 @@ $NetBSD: patch-ab,v 1.7 2007/07/06 11:04:40 martti Exp $
_ACEOF
cat >>confdefs.h <<_ACEOF
-@@ -37106,7 +37106,7 @@
+@@ -36933,7 +36933,7 @@
_ACEOF
cat >>confdefs.h <<_ACEOF
diff --git a/net/proftpd/patches/patch-ac b/net/proftpd/patches/patch-ac
index 3fbe922d8a8..e5796eba230 100644
--- a/net/proftpd/patches/patch-ac
+++ b/net/proftpd/patches/patch-ac
@@ -1,11 +1,13 @@
-$NetBSD: patch-ac,v 1.9 2007/07/06 11:04:40 martti Exp $
+$NetBSD: patch-ac,v 1.10 2008/10/03 06:52:03 martti Exp $
---- configure.in.orig 2007-05-22 23:54:09.000000000 +0300
-+++ configure.in 2007-07-06 13:53:22.000000000 +0300
-@@ -2019,9 +2019,9 @@
- AC_DEFINE_UNQUOTED(PR_CONFIG_DIR, "`eval echo "${sysconfdir}"`")
- AC_DEFINE_UNQUOTED(PR_LIBEXEC_DIR, "`eval echo "${libexecdir}"`")
- AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${datadir}/locale"`")
+Make this pkgsrc friendly.
+
+--- configure.in.orig 2008-09-02 18:54:49.000000000 +0300
++++ configure.in 2008-10-03 09:36:41.000000000 +0300
+@@ -2067,9 +2067,9 @@
+ locale_dir="`eval echo ${locale_dir}`"
+ AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}/locale"`")
+
-AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}/proftpd"`")
+AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}/run"`")
AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/proftpd.conf"`")
diff --git a/net/proftpd/patches/patch-ad b/net/proftpd/patches/patch-ad
new file mode 100644
index 00000000000..cf5d5d83927
--- /dev/null
+++ b/net/proftpd/patches/patch-ad
@@ -0,0 +1,80 @@
+$NetBSD: patch-ad,v 1.5 2008/10/03 06:52:03 martti Exp $
+
+http://bugs.proftpd.org/show_bug.cgi?id=3115
+
+Index: src/main.c
+===================================================================
+RCS file: /cvsroot/proftp/proftpd/src/main.c,v
+retrieving revision 1.344
+diff -u -r1.344 main.c
+--- src/main.c 8 Sep 2008 00:47:11 -0000 1.344
++++ src/main.c 20 Sep 2008 20:10:49 -0000
+@@ -516,20 +516,32 @@
+ static long get_max_cmd_len(size_t buflen) {
+ long res;
+ int *bufsz = NULL;
++ size_t default_cmd_bufsz;
+
++ /* It's possible for the admin to select a PR_TUNABLE_BUFFER_SIZE which
++ * is smaller than PR_DEFAULT_CMD_BUFSZ. We need to handle such cases
++ * properly.
++ */
++ default_cmd_bufsz = PR_DEFAULT_CMD_BUFSZ;
++ if (default_cmd_bufsz > buflen) {
++ default_cmd_bufsz = buflen;
++ }
++
+ bufsz = get_param_ptr(main_server->conf, "CommandBufferSize", FALSE);
+ if (bufsz == NULL) {
+- res = PR_DEFAULT_CMD_BUFSZ;
++ res = default_cmd_bufsz;
+
+ } else if (*bufsz <= 0) {
+ pr_log_pri(PR_LOG_WARNING, "invalid CommandBufferSize size (%d) given, "
+- "using default buffer size (%u) instead", *bufsz, PR_DEFAULT_CMD_BUFSZ);
+- res = PR_DEFAULT_CMD_BUFSZ;
++ "using default buffer size (%lu) instead", *bufsz,
++ (unsigned long) default_cmd_bufsz);
++ res = default_cmd_bufsz;
+
+ } else if (*bufsz + 1 > buflen) {
+ pr_log_pri(PR_LOG_WARNING, "invalid CommandBufferSize size (%d) given, "
+- "using default buffer size (%u) instead", *bufsz, PR_DEFAULT_CMD_BUFSZ);
+- res = PR_DEFAULT_CMD_BUFSZ;
++ "using default buffer size (%lu) instead", *bufsz,
++ (unsigned long) default_cmd_bufsz);
++ res = default_cmd_bufsz;
+
+ } else {
+ pr_log_debug(DEBUG1, "setting CommandBufferSize to %d", *bufsz);
+@@ -577,11 +589,26 @@
+ return -1;
+ }
+
+- memset(buf, '\0', sizeof(buf));
++ while (TRUE) {
++ pr_signals_handle();
+
+- if (pr_netio_telnet_gets(buf, sizeof(buf)-1, session.c->instrm,
+- session.c->outstrm) == NULL)
+- return -1;
++ memset(buf, '\0', sizeof(buf));
++
++ if (pr_netio_telnet_gets(buf, sizeof(buf)-1, session.c->instrm,
++ session.c->outstrm) == NULL) {
++
++ if (errno == E2BIG) {
++ /* The client sent a too-long command which was ignored; give
++ * them another chance?
++ */
++ continue;
++ }
++
++ return -1;
++ }
++
++ break;
++ }
+
+ if (cmd_bufsz == -1)
+ cmd_bufsz = get_max_cmd_len(sizeof(buf));
diff --git a/net/proftpd/patches/patch-ae b/net/proftpd/patches/patch-ae
new file mode 100644
index 00000000000..7fbcd76c551
--- /dev/null
+++ b/net/proftpd/patches/patch-ae
@@ -0,0 +1,117 @@
+$NetBSD: patch-ae,v 1.5 2008/10/03 06:52:03 martti Exp $
+
+http://bugs.proftpd.org/show_bug.cgi?id=3115
+
+Index: src/netio.c
+===================================================================
+RCS file: /cvsroot/proftp/proftpd/src/netio.c,v
+retrieving revision 1.33
+diff -u -r1.33 netio.c
+--- src/netio.c 3 Apr 2008 03:14:31 -0000 1.33
++++ src/netio.c 20 Sep 2008 20:10:49 -0000
+@@ -1,6 +1,6 @@
+ /*
+ * ProFTPD - FTP server daemon
+- * Copyright (c) 2001-2007 The ProFTPD Project team
++ * Copyright (c) 2001-2008 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
+@@ -30,19 +30,19 @@
+ #include <signal.h>
+
+ #ifndef IAC
+-#define IAC 255
++# define IAC 255
+ #endif
+ #ifndef DONT
+-#define DONT 254
++# define DONT 254
+ #endif
+ #ifndef DO
+-#define DO 253
++# define DO 253
+ #endif
+ #ifndef WONT
+-#define WONT 252
++# define WONT 252
+ #endif
+ #ifndef WILL
+-#define WILL 251
++# define WILL 251
+ #endif
+
+ static const char *trace_channel = "netio";
+@@ -51,6 +51,17 @@
+ static pr_netio_t *core_data_netio = NULL, *data_netio = NULL;
+ static pr_netio_t *core_othr_netio = NULL, *othr_netio = NULL;
+
++/* Used to track whether the previous text read from the client's control
++ * connection was a properly-terminated command. If so, then read in the
++ * next/current text as per normal. If NOT (e.g. the client sent a too-long
++ * command), then read in the next/current text, but ignore it. Only clear
++ * this flag if the next/current command can be read as per normal.
++ *
++ * The pr_netio_telnet_gets() uses this variable, in conjunction with its
++ * saw_newline flag, for handling too-long commands from clients.
++ */
++static int properly_terminated_prev_command = TRUE;
++
+ static pr_netio_stream_t *netio_stream_alloc(pool *parent_pool) {
+ pool *netio_pool = NULL;
+ pr_netio_stream_t *nstrm = NULL;
+@@ -950,7 +961,7 @@
+ char *bp = buf;
+ unsigned char cp;
+ static unsigned char mode = 0;
+- int toread, handle_iac = TRUE;
++ int toread, handle_iac = TRUE, saw_newline = FALSE;
+ pr_buffer_t *pbuf = NULL;
+
+ if (buflen == 0) {
+@@ -983,8 +994,9 @@
+ *bp = '\0';
+ return buf;
+
+- } else
++ } else {
+ return NULL;
++ }
+ }
+
+ pbuf->remaining = pbuf->buflen - toread;
+@@ -1049,6 +1061,8 @@
+ toread--;
+ *bp++ = *pbuf->current++;
+ pbuf->remaining++;
++
++ saw_newline = TRUE;
+ break;
+ }
+
+@@ -1056,6 +1070,25 @@
+ pbuf->current = NULL;
+ }
+
++ if (!saw_newline) {
++ /* If we haven't seen a newline, then assume the client is deliberately
++ * sending a too-long command, trying to exploit buffer sizes and make
++ * the server make some possibly bad assumptions.
++ */
++
++ properly_terminated_prev_command = FALSE;
++ errno = E2BIG;
++ return NULL;
++ }
++
++ if (!properly_terminated_prev_command) {
++ properly_terminated_prev_command = TRUE;
++ pr_log_pri(PR_LOG_NOTICE, "client sent too-long command, ignoring");
++ errno = E2BIG;
++ return NULL;
++ }
++
++ properly_terminated_prev_command = TRUE;
+ *bp = '\0';
+ return buf;
+ }