Date: Sat, 16 Dec 2006 13:45:59 -0900 From: "Beech Rintoul" <beech@alaskaparadise.com> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Cc: beech@alaskaparadise.com Subject: ports/106821: [MAINTAINER] ftp/proftpd Upgrade to 1.3.1rc1 Message-ID: <1166309159.59973@stargate.alaskaparadise.com> Resent-Message-ID: <200612162250.kBGMoJC0066797@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 106821 >Category: ports >Synopsis: [MAINTAINER] ftp/proftpd Upgrade to 1.3.1rc1 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Dec 16 22:50:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Beech Rintoul >Release: FreeBSD 7.0-CURRENT i386 >Organization: Alaska Paradise >Environment: System: FreeBSD 7.0-CURRENT #92: Fri Dec 15 19:23:27 AKST 2006 root@stargate.alaskaparadise.com:/usr/obj/usr/src/sys/STARGATE >Description: Upgrade to version 1.3.1rc1 Added Options: wrap2, wrap2_file, wrap2_sql, lang, ban, NLS Removed Patches: patch-support.c, patch-main.c, extra_patch-configure.in Upgrade fixes Secunia security advisory SA23371 Privilege escalation buffer overflow in mod_control. >How-To-Repeat: >Fix: Remove Patches: patch-support.c, patch-main.c, extra_patch configure.in diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/Makefile /usr/ports/ftp/proftpd/Makefile --- /usr/ports/ftp/proftpd.orig/Makefile Tue Dec 12 07:08:09 2006 +++ /usr/ports/ftp/proftpd/Makefile Sat Dec 16 13:31:04 2006 @@ -6,8 +6,8 @@ # PORTNAME= proftpd -DISTVERSION= 1.3.0 -PORTREVISION= 5 +DISTVERSION= 1.3.1rc1 +PORTREVISION= CATEGORIES= ftp MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \ ftp://ftp.fastorama.com/mirrors/ftp.proftpd.org/distrib/source/ \ @@ -26,12 +26,13 @@ PORTDOCSdoc= Configuration.html faq.html PORTDOCScontrib=mod_ifsession.html mod_radius.html mod_rewrite.html \ - mod_tls.html mod_wrap.html ftpasswd.html + mod_tls.html mod_wrap2.html mod_wrap2_file.html mod_wrap2_sql.html \ + mod_ban.html mod_quotatab_radius.html ftpasswd.html PORTDOCS= ${PORTDOCSdoc} ${PORTDOCScontrib} USE_GMAKE= yes -GNU_CONFIGURE= yes USE_BZIP2= yes +GNU_CONFIGURE=yes USE_RC_SUBR= proftpd.sh @@ -49,9 +50,16 @@ IFSESSION "Include mod_ifsession" on \ README "Include mod_readme" on \ RATIO "Include mod_ratio" on \ + CTRLS "include controls" off \ REWRITE "Include mod_rewrite" on \ - WRAP "Include mod_wrap" on \ - RADIUS "Include mod_radius" off + WRAP "Include mod_wrap2" on \ + WRAP_FILE "include mod_wrap2_file" off \ + WRAP_SQL "include mod_wrap2_sql" off \ + LANG "include mod_lang" off \ + RADIUS "Include mod_radius" off \ + QUOTATAB_RADIUS "include mod_quotatab_radius" off \ + BAN "include mod_ban (Requires CTRLS)" off \ + NLS "Use nls" off MODULES?= @@ -59,7 +67,6 @@ .if ${OSVERSION} < 500000 CONFIGURE_ARGS+= --without-getopt -EXTRA_PATCHES= ${FILESDIR}/extra_patch-configure.in USE_AUTOTOOLS= autoconf:259 .endif @@ -76,13 +83,39 @@ .endif .if !defined(WITHOUT_WRAP) -MODULES:=${MODULES}:mod_wrap +MODULES:=${MODULES}:mod_wrap2 +INCLUDEDIRS:=${INCLUDEDIRS}:${WORKDIR}/include +LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib +.endif + +.if defined(WITH_WRAP_FILE) +INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include +LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib +MODULES:=${MODULES}:mod_wrap2_file +.endif + +.if defined(WITH_WRAP_SQL) +INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include +LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib +MODULES:=${MODULES}:mod_wrap2_sql .endif .if defined(WITH_RADIUS) MODULES:=${MODULES}:mod_radius .endif +.if defined(WITH_QUOTATAB_RADIUS) +MODULES:=${MODULES}:mod_quotatab_radius +.endif + +.if defined(WITH_LANG) +MODULES:=${MODULES}:mod_lang +.endif + +.if defined(WITH_BAN) +MODULES:=${MODULES}:mod_ban +.endif + .if defined(WITH_SETPASSENT) CONFIGURE_ARGS+= --enable-force-setpassent .endif @@ -97,6 +130,12 @@ .if !defined(WITH_IPV6) CONFIGURE_ARGS+= --disable-ipv6 +.endif + +.if defined(WITH_NLS) +INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include +LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib +CONFIGURE_ARGS+= --enable-nls .endif #allow user to override diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/distinfo /usr/ports/ftp/proftpd/distinfo --- /usr/ports/ftp/proftpd.orig/distinfo Tue May 2 23:49:02 2006 +++ /usr/ports/ftp/proftpd/distinfo Tue Dec 12 19:42:28 2006 @@ -1,3 +1,3 @@ -MD5 (proftpd-1.3.0.tar.bz2) = fae47d01b52e035eb6b7190e74c17722 -SHA256 (proftpd-1.3.0.tar.bz2) = 83f220cba64455a2b1701b97ce9896f66a0020b179c50daf4860cdf362464ffe -SIZE (proftpd-1.3.0.tar.bz2) = 1386086 +MD5 (proftpd-1.3.1rc1.tar.bz2) = 08f4d526b46c84f10e9634d2d913052c +SHA256 (proftpd-1.3.1rc1.tar.bz2) = 32cf852535c2ec55c5833c2766cbd0c6aba950ab2967565606e1df334736a766 +SIZE (proftpd-1.3.1rc1.tar.bz2) = 1484138 diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/extra_patch-configure.in /usr/ports/ftp/proftpd/files/extra_patch-configure.in --- /usr/ports/ftp/proftpd.orig/files/extra_patch-configure.in Fri May 26 10:39:15 2006 +++ /usr/ports/ftp/proftpd/files/extra_patch-configure.in Wed Dec 31 14:00:00 1969 @@ -1,37 +0,0 @@ ---- configure.in Thu Mar 9 09:12:35 2006 -+++ configure.in Mon May 22 15:01:23 2006 -@@ -161,12 +161,14 @@ - [ - if test "$withval" != "no" ; then - LIB_OBJS="$LIB_OBJS getopt.o getopt1.o" -- AC_CHECK_FUNCS(getopt) -+ AC_CHECK_FUNCS(getopt getopt_long) -+ AC_CHECK_HEADERS(getopt.h) - fi - ], - [ - LIB_OBJS="$LIB_OBJS getopt.o getopt1.o" -- AC_CHECK_FUNCS(getopt) -+ AC_CHECK_FUNCS(getopt getopt_long) -+ AC_CHECK_HEADERS(getopt.h) - ]) - - dnl Modules...'nuff said. -@@ -850,7 +852,7 @@ - ac_build_static_modules="modules/mod_cap.o $ac_build_static_modules" - fi - --AC_CHECK_HEADERS(ctype.h getopt.h crypt.h bstring.h iconv.h inttypes.h langinfo.h limits.h) -+AC_CHECK_HEADERS(ctype.h crypt.h bstring.h iconv.h inttypes.h langinfo.h limits.h) - AC_CHECK_HEADERS(string.h strings.h stropts.h) - AC_CHECK_HEADERS(sys/file.h sys/mman.h sys/types.h sys/uio.h) - -@@ -1110,7 +1112,7 @@ - ) - - AC_CHECK_FUNCS(getcwd getenv gethostbyname2 gethostname getnameinfo) --AC_CHECK_FUNCS(getopt_long gettimeofday hstrerror inet_aton inet_ntop inet_pton) -+AC_CHECK_FUNCS(gettimeofday hstrerror inet_aton inet_ntop inet_pton) - AC_CHECK_FUNCS(memcpy mempcpy mkdir mkstemp mlock mlockall munlock munlockall) - AC_CHECK_FUNCS(rmdir select setgroups socket statfs strchr strcoll strerror) - AC_CHECK_FUNCS(strsep strtol strtoull setprotoent setspent endprotoent) diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/extra_patch-ldap-tls-mod_ldap.c /usr/ports/ftp/proftpd/files/extra_patch-ldap-tls-mod_ldap.c --- /usr/ports/ftp/proftpd.orig/files/extra_patch-ldap-tls-mod_ldap.c Sat May 20 17:26:17 2006 +++ /usr/ports/ftp/proftpd/files/extra_patch-ldap-tls-mod_ldap.c Fri Dec 15 11:06:55 2006 @@ -1,8 +1,11 @@ ---- contrib/mod_ldap.c Fri Apr 21 10:31:23 2006 -+++ contrib/mod_ldap.c Fri Apr 21 10:31:43 2006 -@@ -55,7 +55,7 @@ +--- contrib/mod_ldap.c.orig Thu Oct 19 18:18:07 2006 ++++ contrib/mod_ldap.c Fri Dec 15 11:01:21 2006 +@@ -60,7 +60,7 @@ * after connecting to the LDAP server. If TLS cannot be enabled, the LDAP * connection will fail. */ -/* #define USE_LDAP_TLS */ -+#define USE_LDAP_TLS ++#define USE_LDAP_TLS */ + + /* + * If you have to edit anything below this line, it's a bug. Report it diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/patch-contrib::mod_sql_mysql.c /usr/ports/ftp/proftpd/files/patch-contrib::mod_sql_mysql.c --- /usr/ports/ftp/proftpd.orig/files/patch-contrib::mod_sql_mysql.c Mon Nov 3 10:40:38 2003 +++ /usr/ports/ftp/proftpd/files/patch-contrib::mod_sql_mysql.c Tue Dec 12 20:43:00 2006 @@ -1,11 +1,11 @@ ---- contrib/mod_sql_mysql.c.orig Sun Nov 2 00:30:13 2003 -+++ contrib/mod_sql_mysql.c Sun Nov 2 00:30:23 2003 -@@ -134,7 +134,7 @@ - - #define _MYSQL_PORT "3306" +--- contrib/mod_sql_mysql.c.orig Tue Dec 12 19:52:15 2006 ++++ contrib/mod_sql_mysql.c Tue Dec 12 20:02:56 2006 +@@ -135,7 +135,7 @@ + #include "conf.h" + #include "../contrib/mod_sql.h" -#include <mysql.h> +#include <mysql/mysql.h> - #include "conf.h" - #include "../contrib/mod_sql.h" + /* + * timer-handling code adds the need for a couple of forward declarations diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/patch-main.c /usr/ports/ftp/proftpd/files/patch-main.c --- /usr/ports/ftp/proftpd.orig/files/patch-main.c Wed Nov 15 10:22:23 2006 +++ /usr/ports/ftp/proftpd/files/patch-main.c Wed Dec 31 14:00:00 1969 @@ -1,46 +0,0 @@ ---- src/main.c.orig Wed Mar 15 19:41:01 2006 -+++ src/main.c Wed Nov 15 19:06:18 2006 -@@ -116,6 +116,8 @@ - - static char sbuf[PR_TUNABLE_BUFFER_SIZE] = {'\0'}; - -+#define PR_DEFAULT_CMD_BUFSZ 512 -+ - static char **Argv = NULL; - static char *LastArgv = NULL; - static const char *PidPath = PR_PID_FILE_PATH; -@@ -820,16 +822,25 @@ - pr_timer_reset(TIMER_IDLE, NULL); - - if (cmd_buf_size == -1) { -- long *buf_size = get_param_ptr(main_server->conf, -- "CommandBufferSize", FALSE); -- -- if (buf_size == NULL || *buf_size <= 0) -- cmd_buf_size = 512; -+ int *bufsz = get_param_ptr(main_server->conf, "CommandBufferSize", -+ FALSE); - -- else if (*buf_size + 1 > sizeof(buf)) { -- pr_log_pri(PR_LOG_WARNING, "Invalid CommandBufferSize size given. " -- "Resetting to 512."); -- cmd_buf_size = 512; -+ if (bufsz == NULL || -+ *bufsz <= 0) { -+ pr_log_pri(PR_LOG_WARNING, "invalid CommandBufferSize size " -+ "given, resetting to default buffer size (%u)", -+ (unsigned int) PR_DEFAULT_CMD_BUFSZ); -+ cmd_buf_size = PR_DEFAULT_CMD_BUFSZ; -+ -+ } else if (*bufsz + 1 > sizeof(buf)) { -+ pr_log_pri(PR_LOG_WARNING, "invalid CommandBufferSize size (%d) " -+ "given, resetting to default buffer size (%u)", -+ *bufsz, (unsigned int) PR_DEFAULT_CMD_BUFSZ); -+ cmd_buf_size = PR_DEFAULT_CMD_BUFSZ; -+ -+ } else { -+ pr_log_debug(DEBUG1, "setting CommandBufferSize to %d", *bufsz); -+ cmd_buf_size = (long) *bufsz; - } - } - diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/patch-mod_tls.c /usr/ports/ftp/proftpd/files/patch-mod_tls.c --- /usr/ports/ftp/proftpd.orig/files/patch-mod_tls.c Tue Dec 12 07:08:09 2006 +++ /usr/ports/ftp/proftpd/files/patch-mod_tls.c Wed Dec 31 14:00:00 1969 @@ -1,38 +0,0 @@ -diff -u -r1.100 mod_tls.c ---- contrib/mod_tls.c 29 Nov 2006 03:47:56 -0000 1.100 -+++ contrib/mod_tls.c 29 Nov 2006 04:09:06 -0000 -@@ -3103,17 +3103,25 @@ - long datalen = 0; - int ok; - -- if ((ok = X509_NAME_print_ex(mem, x509_name, 0, XN_FLAG_ONELINE))) -- datalen = BIO_get_mem_data(mem, &data); -+ ok = X509_NAME_print_ex(mem, x509_name, 0, XN_FLAG_ONELINE); -+ if (ok) { -+ datalen = BIO_get_mem_data(mem, &data); - -- if (data) { -- memset(&buf, '\0', sizeof(buf)); -- memcpy(buf, data, datalen); -- buf[datalen] = '\0'; -- buf[sizeof(buf)-1] = '\0'; -+ if (data) { -+ memset(&buf, '\0', sizeof(buf)); - -- BIO_free(mem); -- return buf; -+ if (datalen >= sizeof(buf)) { -+ datalen = sizeof(buf)-1; -+ } -+ -+ memcpy(buf, data, datalen); -+ -+ buf[datalen] = '\0'; -+ buf[sizeof(buf)-1] = '\0'; -+ -+ BIO_free(mem); -+ return buf; -+ } - } - - BIO_free(mem); diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/patch-support.c /usr/ports/ftp/proftpd/files/patch-support.c --- /usr/ports/ftp/proftpd.orig/files/patch-support.c Tue Dec 12 07:08:09 2006 +++ /usr/ports/ftp/proftpd/files/patch-support.c Wed Dec 31 14:00:00 1969 @@ -1,79 +0,0 @@ ---- src/support.c 2005/09/28 02:06:26 1.78 -+++ src/support.c 2006/11/27 14:49:47 1.80 -@@ -27,7 +27,7 @@ - /* Various basic support routines for ProFTPD, used by all modules - * and not specific to one or another. - * -- * $Id: support.c,v 1.78 2005/09/28 02:06:26 castaglia Exp $ -+ * $Id: support.c,v 1.80 2006/11/27 14:49:47 jwm Exp $ - */ - - #include "conf.h" -@@ -632,7 +632,8 @@ - char **mptr,**rptr; - char *marr[33],*rarr[33]; - char buf[PR_TUNABLE_PATH_MAX] = {'\0'}, *pbuf = NULL; -- size_t mlen = 0, rlen = 0, blen; -+ size_t mlen = 0, rlen = 0; -+ int blen; - int dyn = TRUE; - - cp = buf; -@@ -646,7 +647,7 @@ - - while ((m = va_arg(args, char *)) != NULL && mlen < sizeof(marr)-1) { - char *tmp = NULL; -- size_t count = 0; -+ int count = 0; - - if ((r = va_arg(args, char *)) == NULL) - break; -@@ -659,6 +660,12 @@ - while (tmp) { - pr_signals_handle(); - count++; -+ if (count < 0) { -+ /* Integer overflow. In order to overflow integer range with a count -+ * of escapes, somebody must be doing something very strange. -+ */ -+ return s; -+ } - - /* Be sure to increment the pointer returned by strstr(3), to - * advance past the beginning of the substring for which we are -@@ -674,6 +681,12 @@ - */ - if (count) { - blen += count * (strlen(r) - strlen(m)); -+ if (blen < 0) { -+ /* Integer overflow. In order to overflow this, somebody must be -+ * doing something very strange. -+ */ -+ return s; -+ } - marr[mlen] = m; - rarr[mlen++] = r; - } -@@ -722,10 +735,11 @@ - } - - if (!*mptr) { -- if ((cp - pbuf + 1) > blen) { -+ if ((cp - pbuf + 1) >= blen) { - pr_log_pri(PR_LOG_ERR, - "WARNING: attempt to overflow internal ProFTPD buffers"); - cp = pbuf + blen - 1; -+ goto done; - } - *cp++ = *src++; - } -@@ -768,6 +782,9 @@ - char *sstrcat(char *dest, const char *src, size_t n) { - register char *d; - -+ if (n == 0) -+ return NULL; -+ - for (d = dest; *d && n > 1; d++, n--) ; - - while (n-- > 1 && *src) diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/patch-utf8.c /usr/ports/ftp/proftpd/files/patch-utf8.c --- /usr/ports/ftp/proftpd.orig/files/patch-utf8.c Wed Dec 31 14:00:00 1969 +++ /usr/ports/ftp/proftpd/files/patch-utf8.c Fri Dec 15 08:47:50 2006 @@ -0,0 +1,110 @@ +--- src/utf8.c.orig Wed Jun 14 15:33:19 2006 ++++ src/utf8.c Wed Dec 13 08:40:35 2006 +@@ -23,7 +23,7 @@ + */ + + /* UTF8 encoding/decoding +- * $Id: utf8.c,v 1.3 2006/06/14 23:33:19 castaglia Exp $ ++ * $Id: utf8.c,v 1.4 2006/12/13 17:40:35 castaglia Exp $ + */ + + #include "conf.h" +@@ -38,12 +38,13 @@ + # include <langinfo.h> + #endif + ++#ifdef HAVE_ICONV_H + static iconv_t decode_conv = (iconv_t) -1; + static iconv_t encode_conv = (iconv_t) -1; + + static int utf8_convert(iconv_t conv, char *inbuf, size_t *inbuflen, + char *outbuf, size_t *outbuflen) { +-#ifdef HAVE_ICONV ++# ifdef HAVE_ICONV + char *start = inbuf; + + while (inbuflen > 0) { +@@ -61,14 +62,14 @@ + break; + } + return 0; +-#else ++# else + errno = ENOSYS; + return -1; +-#endif /* HAVE_ICONV */ ++# endif /* HAVE_ICONV */ + } + + int utf8_free(void) { +-#ifdef HAVE_ICONV ++# ifdef HAVE_ICONV + int res; + + /* Close the iconv handles. */ +@@ -81,10 +82,10 @@ + return -1; + + return 0; +-#else ++# else + errno = ENOSYS; + return -1; +-#endif ++# endif + } + + int utf8_init(void) { +@@ -111,7 +112,7 @@ + "conversion"); + #endif /* HAVE_NL_LANGINFO */ + +-#ifdef HAVE_ICONV ++# ifdef HAVE_ICONV + /* Get the iconv handles. */ + encode_conv = iconv_open(local_charset, "UTF-8"); + if (encode_conv == (iconv_t) -1) +@@ -122,13 +123,15 @@ + return -1; + + return 0; +-#else ++# else + errno = ENOSYS; + return -1; +-#endif /* HAVE_ICONV */ ++# endif /* HAVE_ICONV */ + } ++#endif /* !HAVE_ICONV_H */ + + char *pr_utf8_decode(pool *p, const char *in, size_t inlen, size_t *outlen) { ++#ifdef HAVE_ICONV_H + size_t inbuflen, outbuflen; + char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res = NULL; + +@@ -156,9 +159,14 @@ + memcpy(res, outbuf, *outlen); + + return res; ++#else ++ pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 decoding possible"); ++ return pstrdup(p, in); ++#endif /* !HAVE_ICONV_H */ + } + + char *pr_utf8_encode(pool *p, const char *in, size_t inlen, size_t *outlen) { ++#ifdef HAVE_ICONV_H + size_t inbuflen, outbuflen; + char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res; + +@@ -186,6 +194,10 @@ + memcpy(res, outbuf, *outlen); + + return res; ++#else ++ pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 encoding possible"); ++ return pstrdup(p, in); ++#endif /* !HAVE_ICONV_H */ + } + + #endif /* PR_USE_NLS */ diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/patch-proftpd-1.3.1rc1 /usr/ports/ftp/proftpd/patch-proftpd-1.3.1rc1 --- /usr/ports/ftp/proftpd.orig/patch-proftpd-1.3.1rc1 Wed Dec 31 14:00:00 1969 +++ /usr/ports/ftp/proftpd/patch-proftpd-1.3.1rc1 Sat Dec 16 12:41:48 2006 @@ -0,0 +1,490 @@ +diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/Makefile /usr/ports/ftp/proftpd/Makefile +--- /usr/ports/ftp/proftpd.orig/Makefile Tue Dec 12 07:08:09 2006 ++++ /usr/ports/ftp/proftpd/Makefile Fri Dec 15 20:55:05 2006 +@@ -6,8 +6,8 @@ + # + + PORTNAME= proftpd +-DISTVERSION= 1.3.0 +-PORTREVISION= 5 ++DISTVERSION= 1.3.1rc1 ++PORTREVISION= + CATEGORIES= ftp + MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \ + ftp://ftp.fastorama.com/mirrors/ftp.proftpd.org/distrib/source/ \ +@@ -26,12 +26,13 @@ + + PORTDOCSdoc= Configuration.html faq.html + PORTDOCScontrib=mod_ifsession.html mod_radius.html mod_rewrite.html \ +- mod_tls.html mod_wrap.html ftpasswd.html ++ mod_tls.html mod_wrap2.html mod_wrap2_file.html mod_wrap2_sql.html \ ++ mod_ban.html mod_quotatab_radius.html ftpasswd.html + PORTDOCS= ${PORTDOCSdoc} ${PORTDOCScontrib} + + USE_GMAKE= yes +-GNU_CONFIGURE= yes + USE_BZIP2= yes ++GNU_CONFIGURE=yes + + USE_RC_SUBR= proftpd.sh + +@@ -50,8 +51,14 @@ + README "Include mod_readme" on \ + RATIO "Include mod_ratio" on \ + REWRITE "Include mod_rewrite" on \ +- WRAP "Include mod_wrap" on \ +- RADIUS "Include mod_radius" off ++ WRAP "Include mod_wrap2" on \ ++ WRAP_FILE "include mod_wrap2_file" off \ ++ WRAP_SQL "include mod_wrap2_sql" off \ ++ LANG "include mod_lang" off \ ++ RADIUS "Include mod_radius" off \ ++ QUOTATAB_RADIUS "include mod_quotatab_radius" off \ ++ BAN "include mod_ban" off \ ++ NLS "Use nls" off + + MODULES?= + +@@ -59,7 +66,6 @@ + + .if ${OSVERSION} < 500000 + CONFIGURE_ARGS+= --without-getopt +-EXTRA_PATCHES= ${FILESDIR}/extra_patch-configure.in + USE_AUTOTOOLS= autoconf:259 + .endif + +@@ -76,13 +82,39 @@ + .endif + + .if !defined(WITHOUT_WRAP) +-MODULES:=${MODULES}:mod_wrap ++MODULES:=${MODULES}:mod_wrap2 ++INCLUDEDIRS:=${INCLUDEDIRS}:${WORKDIR}/include ++LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib ++.endif ++ ++.if defined(WITH_WRAP_FILE) ++INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include ++LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib ++MODULES:=${MODULES}:mod_wrap2_file ++.endif ++ ++.if defined(WITH_WRAP_SQL) ++INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include ++LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib ++MODULES:=${MODULES}:mod_wrap2_sql + .endif + + .if defined(WITH_RADIUS) + MODULES:=${MODULES}:mod_radius + .endif + ++.if defined(WITH_QUOTATAB_RADIUS) ++MODULES:=${MODULES}:mod_quotatab_radius ++.endif ++ ++.if defined(WITH_LANG) ++MODULES:=${MODULES}:mod_lang ++.endif ++ ++.if defined(WITH_BAN) ++MODULES:=${MODULES}:mod_ban ++.endif ++ + .if defined(WITH_SETPASSENT) + CONFIGURE_ARGS+= --enable-force-setpassent + .endif +@@ -97,6 +129,12 @@ + + .if !defined(WITH_IPV6) + CONFIGURE_ARGS+= --disable-ipv6 ++.endif ++ ++.if defined(WITH_NLS) ++INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include ++LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib ++CONFIGURE_ARGS+= --enable-nls + .endif + + #allow user to override +diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/distinfo /usr/ports/ftp/proftpd/distinfo +--- /usr/ports/ftp/proftpd.orig/distinfo Tue May 2 23:49:02 2006 ++++ /usr/ports/ftp/proftpd/distinfo Tue Dec 12 19:42:28 2006 +@@ -1,3 +1,3 @@ +-MD5 (proftpd-1.3.0.tar.bz2) = fae47d01b52e035eb6b7190e74c17722 +-SHA256 (proftpd-1.3.0.tar.bz2) = 83f220cba64455a2b1701b97ce9896f66a0020b179c50daf4860cdf362464ffe +-SIZE (proftpd-1.3.0.tar.bz2) = 1386086 ++MD5 (proftpd-1.3.1rc1.tar.bz2) = 08f4d526b46c84f10e9634d2d913052c ++SHA256 (proftpd-1.3.1rc1.tar.bz2) = 32cf852535c2ec55c5833c2766cbd0c6aba950ab2967565606e1df334736a766 ++SIZE (proftpd-1.3.1rc1.tar.bz2) = 1484138 +diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/extra_patch-configure.in /usr/ports/ftp/proftpd/files/extra_patch-configure.in +--- /usr/ports/ftp/proftpd.orig/files/extra_patch-configure.in Fri May 26 10:39:15 2006 ++++ /usr/ports/ftp/proftpd/files/extra_patch-configure.in Wed Dec 31 14:00:00 1969 +@@ -1,37 +0,0 @@ +---- configure.in Thu Mar 9 09:12:35 2006 +-+++ configure.in Mon May 22 15:01:23 2006 +-@@ -161,12 +161,14 @@ +- [ +- if test "$withval" != "no" ; then +- LIB_OBJS="$LIB_OBJS getopt.o getopt1.o" +-- AC_CHECK_FUNCS(getopt) +-+ AC_CHECK_FUNCS(getopt getopt_long) +-+ AC_CHECK_HEADERS(getopt.h) +- fi +- ], +- [ +- LIB_OBJS="$LIB_OBJS getopt.o getopt1.o" +-- AC_CHECK_FUNCS(getopt) +-+ AC_CHECK_FUNCS(getopt getopt_long) +-+ AC_CHECK_HEADERS(getopt.h) +- ]) +- +- dnl Modules...'nuff said. +-@@ -850,7 +852,7 @@ +- ac_build_static_modules="modules/mod_cap.o $ac_build_static_modules" +- fi +- +--AC_CHECK_HEADERS(ctype.h getopt.h crypt.h bstring.h iconv.h inttypes.h langinfo.h limits.h) +-+AC_CHECK_HEADERS(ctype.h crypt.h bstring.h iconv.h inttypes.h langinfo.h limits.h) +- AC_CHECK_HEADERS(string.h strings.h stropts.h) +- AC_CHECK_HEADERS(sys/file.h sys/mman.h sys/types.h sys/uio.h) +- +-@@ -1110,7 +1112,7 @@ +- ) +- +- AC_CHECK_FUNCS(getcwd getenv gethostbyname2 gethostname getnameinfo) +--AC_CHECK_FUNCS(getopt_long gettimeofday hstrerror inet_aton inet_ntop inet_pton) +-+AC_CHECK_FUNCS(gettimeofday hstrerror inet_aton inet_ntop inet_pton) +- AC_CHECK_FUNCS(memcpy mempcpy mkdir mkstemp mlock mlockall munlock munlockall) +- AC_CHECK_FUNCS(rmdir select setgroups socket statfs strchr strcoll strerror) +- AC_CHECK_FUNCS(strsep strtol strtoull setprotoent setspent endprotoent) +diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/extra_patch-ldap-tls-mod_ldap.c /usr/ports/ftp/proftpd/files/extra_patch-ldap-tls-mod_ldap.c +--- /usr/ports/ftp/proftpd.orig/files/extra_patch-ldap-tls-mod_ldap.c Sat May 20 17:26:17 2006 ++++ /usr/ports/ftp/proftpd/files/extra_patch-ldap-tls-mod_ldap.c Fri Dec 15 11:06:55 2006 +@@ -1,8 +1,11 @@ +---- contrib/mod_ldap.c Fri Apr 21 10:31:23 2006 +-+++ contrib/mod_ldap.c Fri Apr 21 10:31:43 2006 +-@@ -55,7 +55,7 @@ ++--- contrib/mod_ldap.c.orig Thu Oct 19 18:18:07 2006 +++++ contrib/mod_ldap.c Fri Dec 15 11:01:21 2006 ++@@ -60,7 +60,7 @@ + * after connecting to the LDAP server. If TLS cannot be enabled, the LDAP + * connection will fail. + */ + -/* #define USE_LDAP_TLS */ +-+#define USE_LDAP_TLS +++#define USE_LDAP_TLS */ ++ ++ /* ++ * If you have to edit anything below this line, it's a bug. Report it +diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/patch-contrib::mod_sql_mysql.c /usr/ports/ftp/proftpd/files/patch-contrib::mod_sql_mysql.c +--- /usr/ports/ftp/proftpd.orig/files/patch-contrib::mod_sql_mysql.c Mon Nov 3 10:40:38 2003 ++++ /usr/ports/ftp/proftpd/files/patch-contrib::mod_sql_mysql.c Tue Dec 12 20:43:00 2006 +@@ -1,11 +1,11 @@ +---- contrib/mod_sql_mysql.c.orig Sun Nov 2 00:30:13 2003 +-+++ contrib/mod_sql_mysql.c Sun Nov 2 00:30:23 2003 +-@@ -134,7 +134,7 @@ +- +- #define _MYSQL_PORT "3306" ++--- contrib/mod_sql_mysql.c.orig Tue Dec 12 19:52:15 2006 +++++ contrib/mod_sql_mysql.c Tue Dec 12 20:02:56 2006 ++@@ -135,7 +135,7 @@ ++ #include "conf.h" ++ #include "../contrib/mod_sql.h" + + -#include <mysql.h> + +#include <mysql/mysql.h> +- #include "conf.h" +- #include "../contrib/mod_sql.h" + ++ /* ++ * timer-handling code adds the need for a couple of forward declarations +diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/patch-main.c /usr/ports/ftp/proftpd/files/patch-main.c +--- /usr/ports/ftp/proftpd.orig/files/patch-main.c Wed Nov 15 10:22:23 2006 ++++ /usr/ports/ftp/proftpd/files/patch-main.c Wed Dec 31 14:00:00 1969 +@@ -1,46 +0,0 @@ +---- src/main.c.orig Wed Mar 15 19:41:01 2006 +-+++ src/main.c Wed Nov 15 19:06:18 2006 +-@@ -116,6 +116,8 @@ +- +- static char sbuf[PR_TUNABLE_BUFFER_SIZE] = {'\0'}; +- +-+#define PR_DEFAULT_CMD_BUFSZ 512 +-+ +- static char **Argv = NULL; +- static char *LastArgv = NULL; +- static const char *PidPath = PR_PID_FILE_PATH; +-@@ -820,16 +822,25 @@ +- pr_timer_reset(TIMER_IDLE, NULL); +- +- if (cmd_buf_size == -1) { +-- long *buf_size = get_param_ptr(main_server->conf, +-- "CommandBufferSize", FALSE); +-- +-- if (buf_size == NULL || *buf_size <= 0) +-- cmd_buf_size = 512; +-+ int *bufsz = get_param_ptr(main_server->conf, "CommandBufferSize", +-+ FALSE); +- +-- else if (*buf_size + 1 > sizeof(buf)) { +-- pr_log_pri(PR_LOG_WARNING, "Invalid CommandBufferSize size given. " +-- "Resetting to 512."); +-- cmd_buf_size = 512; +-+ if (bufsz == NULL || +-+ *bufsz <= 0) { +-+ pr_log_pri(PR_LOG_WARNING, "invalid CommandBufferSize size " +-+ "given, resetting to default buffer size (%u)", +-+ (unsigned int) PR_DEFAULT_CMD_BUFSZ); +-+ cmd_buf_size = PR_DEFAULT_CMD_BUFSZ; +-+ +-+ } else if (*bufsz + 1 > sizeof(buf)) { +-+ pr_log_pri(PR_LOG_WARNING, "invalid CommandBufferSize size (%d) " +-+ "given, resetting to default buffer size (%u)", +-+ *bufsz, (unsigned int) PR_DEFAULT_CMD_BUFSZ); +-+ cmd_buf_size = PR_DEFAULT_CMD_BUFSZ; +-+ +-+ } else { +-+ pr_log_debug(DEBUG1, "setting CommandBufferSize to %d", *bufsz); +-+ cmd_buf_size = (long) *bufsz; +- } +- } +- +diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/patch-mod_tls.c /usr/ports/ftp/proftpd/files/patch-mod_tls.c +--- /usr/ports/ftp/proftpd.orig/files/patch-mod_tls.c Tue Dec 12 07:08:09 2006 ++++ /usr/ports/ftp/proftpd/files/patch-mod_tls.c Wed Dec 31 14:00:00 1969 +@@ -1,38 +0,0 @@ +-diff -u -r1.100 mod_tls.c +---- contrib/mod_tls.c 29 Nov 2006 03:47:56 -0000 1.100 +-+++ contrib/mod_tls.c 29 Nov 2006 04:09:06 -0000 +-@@ -3103,17 +3103,25 @@ +- long datalen = 0; +- int ok; +- +-- if ((ok = X509_NAME_print_ex(mem, x509_name, 0, XN_FLAG_ONELINE))) +-- datalen = BIO_get_mem_data(mem, &data); +-+ ok = X509_NAME_print_ex(mem, x509_name, 0, XN_FLAG_ONELINE); +-+ if (ok) { +-+ datalen = BIO_get_mem_data(mem, &data); +- +-- if (data) { +-- memset(&buf, '\0', sizeof(buf)); +-- memcpy(buf, data, datalen); +-- buf[datalen] = '\0'; +-- buf[sizeof(buf)-1] = '\0'; +-+ if (data) { +-+ memset(&buf, '\0', sizeof(buf)); +- +-- BIO_free(mem); +-- return buf; +-+ if (datalen >= sizeof(buf)) { +-+ datalen = sizeof(buf)-1; +-+ } +-+ +-+ memcpy(buf, data, datalen); +-+ +-+ buf[datalen] = '\0'; +-+ buf[sizeof(buf)-1] = '\0'; +-+ +-+ BIO_free(mem); +-+ return buf; +-+ } +- } +- +- BIO_free(mem); +diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/patch-support.c /usr/ports/ftp/proftpd/files/patch-support.c +--- /usr/ports/ftp/proftpd.orig/files/patch-support.c Tue Dec 12 07:08:09 2006 ++++ /usr/ports/ftp/proftpd/files/patch-support.c Wed Dec 31 14:00:00 1969 +@@ -1,79 +0,0 @@ +---- src/support.c 2005/09/28 02:06:26 1.78 +-+++ src/support.c 2006/11/27 14:49:47 1.80 +-@@ -27,7 +27,7 @@ +- /* Various basic support routines for ProFTPD, used by all modules +- * and not specific to one or another. +- * +-- * $Id: support.c,v 1.78 2005/09/28 02:06:26 castaglia Exp $ +-+ * $Id: support.c,v 1.80 2006/11/27 14:49:47 jwm Exp $ +- */ +- +- #include "conf.h" +-@@ -632,7 +632,8 @@ +- char **mptr,**rptr; +- char *marr[33],*rarr[33]; +- char buf[PR_TUNABLE_PATH_MAX] = {'\0'}, *pbuf = NULL; +-- size_t mlen = 0, rlen = 0, blen; +-+ size_t mlen = 0, rlen = 0; +-+ int blen; +- int dyn = TRUE; +- +- cp = buf; +-@@ -646,7 +647,7 @@ +- +- while ((m = va_arg(args, char *)) != NULL && mlen < sizeof(marr)-1) { +- char *tmp = NULL; +-- size_t count = 0; +-+ int count = 0; +- +- if ((r = va_arg(args, char *)) == NULL) +- break; +-@@ -659,6 +660,12 @@ +- while (tmp) { +- pr_signals_handle(); +- count++; +-+ if (count < 0) { +-+ /* Integer overflow. In order to overflow integer range with a count +-+ * of escapes, somebody must be doing something very strange. +-+ */ +-+ return s; +-+ } +- +- /* Be sure to increment the pointer returned by strstr(3), to +- * advance past the beginning of the substring for which we are +-@@ -674,6 +681,12 @@ +- */ +- if (count) { +- blen += count * (strlen(r) - strlen(m)); +-+ if (blen < 0) { +-+ /* Integer overflow. In order to overflow this, somebody must be +-+ * doing something very strange. +-+ */ +-+ return s; +-+ } +- marr[mlen] = m; +- rarr[mlen++] = r; +- } +-@@ -722,10 +735,11 @@ +- } +- +- if (!*mptr) { +-- if ((cp - pbuf + 1) > blen) { +-+ if ((cp - pbuf + 1) >= blen) { +- pr_log_pri(PR_LOG_ERR, +- "WARNING: attempt to overflow internal ProFTPD buffers"); +- cp = pbuf + blen - 1; +-+ goto done; +- } +- *cp++ = *src++; +- } +-@@ -768,6 +782,9 @@ +- char *sstrcat(char *dest, const char *src, size_t n) { +- register char *d; +- +-+ if (n == 0) +-+ return NULL; +-+ +- for (d = dest; *d && n > 1; d++, n--) ; +- +- while (n-- > 1 && *src) +diff -ruN --exclude=CVS /usr/ports/ftp/proftpd.orig/files/patch-utf8.c /usr/ports/ftp/proftpd/files/patch-utf8.c +--- /usr/ports/ftp/proftpd.orig/files/patch-utf8.c Wed Dec 31 14:00:00 1969 ++++ /usr/ports/ftp/proftpd/files/patch-utf8.c Fri Dec 15 08:47:50 2006 +@@ -0,0 +1,110 @@ ++--- src/utf8.c.orig Wed Jun 14 15:33:19 2006 +++++ src/utf8.c Wed Dec 13 08:40:35 2006 ++@@ -23,7 +23,7 @@ ++ */ ++ ++ /* UTF8 encoding/decoding ++- * $Id: utf8.c,v 1.3 2006/06/14 23:33:19 castaglia Exp $ +++ * $Id: utf8.c,v 1.4 2006/12/13 17:40:35 castaglia Exp $ ++ */ ++ ++ #include "conf.h" ++@@ -38,12 +38,13 @@ ++ # include <langinfo.h> ++ #endif ++ +++#ifdef HAVE_ICONV_H ++ static iconv_t decode_conv = (iconv_t) -1; ++ static iconv_t encode_conv = (iconv_t) -1; ++ ++ static int utf8_convert(iconv_t conv, char *inbuf, size_t *inbuflen, ++ char *outbuf, size_t *outbuflen) { ++-#ifdef HAVE_ICONV +++# ifdef HAVE_ICONV ++ char *start = inbuf; ++ ++ while (inbuflen > 0) { ++@@ -61,14 +62,14 @@ ++ break; ++ } ++ return 0; ++-#else +++# else ++ errno = ENOSYS; ++ return -1; ++-#endif /* HAVE_ICONV */ +++# endif /* HAVE_ICONV */ ++ } ++ ++ int utf8_free(void) { ++-#ifdef HAVE_ICONV +++# ifdef HAVE_ICONV ++ int res; ++ ++ /* Close the iconv handles. */ ++@@ -81,10 +82,10 @@ ++ return -1; ++ ++ return 0; ++-#else +++# else ++ errno = ENOSYS; ++ return -1; ++-#endif +++# endif ++ } ++ ++ int utf8_init(void) { ++@@ -111,7 +112,7 @@ ++ "conversion"); ++ #endif /* HAVE_NL_LANGINFO */ ++ ++-#ifdef HAVE_ICONV +++# ifdef HAVE_ICONV ++ /* Get the iconv handles. */ ++ encode_conv = iconv_open(local_charset, "UTF-8"); ++ if (encode_conv == (iconv_t) -1) ++@@ -122,13 +123,15 @@ ++ return -1; ++ ++ return 0; ++-#else +++# else ++ errno = ENOSYS; ++ return -1; ++-#endif /* HAVE_ICONV */ +++# endif /* HAVE_ICONV */ ++ } +++#endif /* !HAVE_ICONV_H */ ++ ++ char *pr_utf8_decode(pool *p, const char *in, size_t inlen, size_t *outlen) { +++#ifdef HAVE_ICONV_H ++ size_t inbuflen, outbuflen; ++ char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res = NULL; ++ ++@@ -156,9 +159,14 @@ ++ memcpy(res, outbuf, *outlen); ++ ++ return res; +++#else +++ pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 decoding possible"); +++ return pstrdup(p, in); +++#endif /* !HAVE_ICONV_H */ ++ } ++ ++ char *pr_utf8_encode(pool *p, const char *in, size_t inlen, size_t *outlen) { +++#ifdef HAVE_ICONV_H ++ size_t inbuflen, outbuflen; ++ char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res; ++ ++@@ -186,6 +194,10 @@ ++ memcpy(res, outbuf, *outlen); ++ ++ return res; +++#else +++ pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 encoding possible"); +++ return pstrdup(p, in); +++#endif /* !HAVE_ICONV_H */ ++ } ++ ++ #endif /* PR_USE_NLS */ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1166309159.59973>