From beech@alaskaparadise.com  Sat Dec 16 22:46:06 2006
Return-Path: <beech@alaskaparadise.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9278316A407
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 16 Dec 2006 22:46:06 +0000 (UTC)
	(envelope-from beech@alaskaparadise.com)
Received: from stargate.alaskaparadise.com (114-103-74-65.gci.net [65.74.103.114])
	by mx1.FreeBSD.org (Postfix) with ESMTP id EEFB843CA7
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 16 Dec 2006 22:46:00 +0000 (GMT)
	(envelope-from beech@alaskaparadise.com)
Received: from stargate.alaskaparadise.com (stargate.alaskaparadise.com [65.74.103.114])
	by stargate.alaskaparadise.com (Postfix) with ESMTP id AFDC4461F;
	Sat, 16 Dec 2006 13:45:59 -0900 (AKST)
Message-Id: <1166309159.59973@stargate.alaskaparadise.com>
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: [MAINTAINER] ftp/proftpd Upgrade to 1.3.1rc1
X-Send-Pr-Version: gtk-send-pr 0.4.8 
X-GNATS-Notify:

>Number:         106821
>Category:       ports
>Synopsis:       [MAINTAINER] ftp/proftpd Upgrade to 1.3.1rc1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 16 22:50:14 GMT 2006
>Closed-Date:    Thu Dec 21 22:13:37 GMT 2006
>Last-Modified:  Thu Dec 21 22:20:32 GMT 2006
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Sat Dec 16 22:53:01 UTC 2006 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106821 

From: Beech Rintoul <freebsd@alaskaparadise.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/106821: [MAINTAINER] ftp/proftpd Upgrade to 1.3.1rc1
Date: Mon, 18 Dec 2006 08:10:18 -0900

 Here's the complete port:
 
 
 #!/bin/sh
 # This is a shell archive
 echo x proftpd
 mkdir -p proftpd > /dev/null 2>&1
 echo x proftpd/files
 mkdir -p proftpd/files > /dev/null 2>&1
 echo x proftpd/Makefile
 sed 's/^X//' > proftpd/Makefile << 'SHAR_END'
 X# New ports collection makefile for:	proftpd
 X# Date created:		26 January 1998
 X# Whom:			Stephane Legrand
 X#
 X# $FreeBSD: ports/ftp/proftpd/Makefile,v 1.93 2006/12/12 16:08:09 delphij Exp 
 $
 X#
 X
 XPORTNAME=	proftpd
 XDISTVERSION=	1.3.1rc1
 XPORTREVISION=
 XCATEGORIES=	ftp
 XMASTER_SITES=	ftp://ftp.proftpd.org/distrib/source/ \
 X		ftp://ftp.fastorama.com/mirrors/ftp.proftpd.org/distrib/source/ \
 X		ftp://ftp.dataguard.no/ftp/pub/proftpd/distrib/source/ \
 X		ftp://spirit.bentel.sk/mirrors/Proftpd/distrib/source/ \
 X		ftp://proftpd.networkedsystems.co.uk/distrib/source/ \
 X		ftp://ftp.ethereal.com/mirrors/ftp.proftpd.org/distrib/source/ \
 X		ftp://mirror.cybercomm.nl/pub/proftpd/distrib/source/
 X
 XMAINTAINER?=	beech@alaskaparadise.com
 XCOMMENT?=	Highly configurable ftp daemon
 X
 XMAN1=	ftpcount.1 ftpwho.1 ftptop.1
 XMAN5=	xferlog.5
 XMAN8=	proftpd.8 ftpshut.8 ftpdctl.8
 X
 XPORTDOCSdoc=	Configuration.html faq.html
 XPORTDOCScontrib=mod_ifsession.html mod_radius.html mod_rewrite.html \
 X		mod_tls.html mod_wrap2.html mod_wrap2_file.html mod_wrap2_sql.html \
 X		mod_ban.html mod_quotatab_radius.html ftpasswd.html
 XPORTDOCS=	${PORTDOCSdoc} ${PORTDOCScontrib}
 X
 XUSE_GMAKE=	yes
 XUSE_BZIP2=	yes
 XGNU_CONFIGURE=yes
 X
 XUSE_RC_SUBR=	proftpd.sh
 X
 XCONFIGURE_ARGS=	--localstatedir=/var/run \
 X		--sysconfdir=${EXAMPLESDIR}/etc \
 X		--disable-sendfile
 X
 XOPTIONS=	IPV6 "Use IPv6" off \
 X		LDAP "Use LDAP" off \
 X		LDAP_TLS "Use LDAP TLS (Requires LDAP)" off\
 X		MYSQL "Use MySQL" off \
 X		POSTGRESQL "Use Postgres" off \
 X		OPENSSL "Include mod_tls" off \
 X		QUOTA "Include mod_quota" off \
 X		IFSESSION "Include mod_ifsession" on \
 X		README "Include mod_readme" on \
 X		RATIO "Include mod_ratio" on \
 X		CTRLS "include controls" off \
 X		REWRITE "Include mod_rewrite" on \
 X		WRAP "Include mod_wrap2" on \
 X		WRAP_FILE "include mod_wrap2_file" off \
 X		WRAP_SQL "include mod_wrap2_sql" off \
 X		LANG "include mod_lang" off \
 X		RADIUS "Include mod_radius" off \
 X		QUOTATAB_RADIUS "include mod_quotatab_radius" off \
 X		BAN "include mod_ban (Requires CTRLS)" off \
 X		NLS "Use nls" off
 X
 XMODULES?=
 X
 X.include <bsd.port.pre.mk>
 X
 X.if ${OSVERSION} < 500000
 XCONFIGURE_ARGS+=	--without-getopt
 XUSE_AUTOTOOLS=	autoconf:259
 X.endif
 X
 X.if !defined(WITHOUT_RATIO)
 XMODULES:=${MODULES}:mod_ratio
 X.endif
 X
 X.if !defined(WITHOUT_README)
 XMODULES:=${MODULES}:mod_readme
 X.endif
 X
 X.if !defined(WITHOUT_REWRITE)
 XMODULES:=${MODULES}:mod_rewrite
 X.endif
 X
 X.if !defined(WITHOUT_WRAP)
 XMODULES:=${MODULES}:mod_wrap2
 XINCLUDEDIRS:=${INCLUDEDIRS}:${WORKDIR}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 X.endif
 X
 X.if defined(WITH_WRAP_FILE)
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 XMODULES:=${MODULES}:mod_wrap2_file
 X.endif
 X
 X.if defined(WITH_WRAP_SQL)
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 XMODULES:=${MODULES}:mod_wrap2_sql
 X.endif
 X
 X.if defined(WITH_RADIUS)
 XMODULES:=${MODULES}:mod_radius
 X.endif
 X
 X.if defined(WITH_QUOTATAB_RADIUS)
 XMODULES:=${MODULES}:mod_quotatab_radius
 X.endif
 X
 X.if defined(WITH_LANG)
 XMODULES:=${MODULES}:mod_lang
 X.endif
 X
 X.if defined(WITH_BAN)
 XMODULES:=${MODULES}:mod_ban
 X.endif
 X
 X.if defined(WITH_SETPASSENT)
 XCONFIGURE_ARGS+=	--enable-force-setpassent
 X.endif
 X
 X.if defined(WITHOUT_PAM)
 XCONFIGURE_ARGS+=	--disable-auth-pam
 X.endif
 X
 X.if defined(WITH_IPV6)
 XCONFIGURE_ARGS+=	--enable-ipv6
 X.endif
 X
 X.if !defined(WITH_IPV6)
 XCONFIGURE_ARGS+=	--disable-ipv6
 X.endif
 X
 X.if defined(WITH_NLS)
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 XCONFIGURE_ARGS+=	--enable-nls
 X.endif
 X
 X#allow user to override
 XMODULES?=	mod_ratio:mod_readme:mod_rewrite:mod_wrap:mod_ifsession
 X
 XINCLUDEDIRS?=
 XLIBDIRS?=
 X
 X.if defined(WITH_LDAP)
 XUSE_OPENLDAP=	yes
 XMODULES:=${MODULES}:mod_ldap
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 X.endif
 X
 X.if defined(WITH_MYSQL)
 XUSE_MYSQL=	yes
 XMODULES:=${MODULES}:mod_sql:mod_sql_mysql
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib/mysql
 X.endif
 X
 X.if defined(WITH_POSTGRESQL)
 XUSE_PGSQL=	yes
 XMODULES:=${MODULES}:mod_sql:mod_sql_postgres
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 X.endif
 X
 X.if defined(WITH_OPENSSL)
 XCFLAGS+=	-DHAVE_OPENSSL
 X.include <${PORTSDIR}/Mk/bsd.openssl.mk>
 XPROFTPD_LIBS+=	-lssl -lcrypto -L${LOCALBASE}/lib
 XMODULES:=${MODULES}:mod_tls
 X.if defined(WITH_LDAP_TLS)
 XEXTRA_PATCHES+=	${FILESDIR}/extra_patch-ldap-tls-mod_ldap.c
 X.endif
 X.endif
 X
 X.if defined(WITH_CTRLS)
 XCONFIGURE_ARGS+=	--enable-ctrls
 XPLIST_FILES+=	sbin/ftpdctl
 X.if !defined(WITHOUT_CTRLS_ADMIN)
 XMODULES:=${MODULES}:mod_ctrls_admin
 X.endif
 X.endif
 X
 X.if defined(WITH_QUOTA)
 XMODULES:=${MODULES}:mod_quotatab:mod_quotatab_file
 X.if defined(WITH_LDAP)
 XMODULES:=${MODULES}:mod_quotatab_ldap
 X.endif
 X.if defined(WITH_POSTGRESQL) || defined(WITH_MYSQL)
 XMODULES:=${MODULES}:mod_quotatab_sql
 X.endif
 X.endif
 X
 X# mod_ifsession should be the last item in the modules list
 X.if !defined(WITHOUT_IFSESSION)
 XMODULES:=${MODULES}:mod_ifsession
 X.endif
 X
 X# Keep this here below, in case similar constructs need to be made
 XCONFIGURE_ENV+=	"LIBS=${PROFTPD_LIBS}"
 X
 X.if !empty(MODULES)
 XCONFIGURE_ARGS+=	--with-modules=${MODULES}
 X.endif
 X
 X.if !empty(INCLUDEDIRS)
 XCONFIGURE_ARGS+=	--with-includes=${INCLUDEDIRS}
 X.endif
 X
 X.if !empty(LIBDIRS)
 XCONFIGURE_ARGS+=	--with-libraries=${LIBDIRS}
 X.endif
 X
 XMODULES!=${ECHO} ${MODULES} | ${SED} -e 's,^:,,' -e 's,:$$,,'
 X
 Xpre-configure:
 X	@${ECHO_MSG} "==> Configuring with ${MODULES}"
 X
 Xpost-configure:
 X	${REINPLACE_CMD} -e 's:${EXAMPLESDIR}:${PREFIX}:' ${WRKSRC}/config.h
 X	${REINPLACE_CMD} -e 's: -lnsl::' ${WRKSRC}/Make.rules
 X	${REINPLACE_CMD} -e 's:/usr/sbin:${PREFIX}/sbin:' \
 X		-e 's:/usr/bin:${PREFIX}/bin:' \
 X		${WRKSRC}/src/proftpd.8 ${WRKSRC}/utils/ftpshut.8 \
 X		${WRKSRC}/utils/ftpcount.1
 X
 Xpost-install:
 X	[ -f ${PREFIX}/etc/proftpd.conf ] || \
 X		${CP} ${EXAMPLESDIR}/etc/proftpd.conf ${PREFIX}/etc/proftpd.conf
 X
 X.if !defined(NOPORTDOCS)
 X	@${MKDIR} ${PREFIX}/share/doc/proftpd
 X.for f in ${PORTDOCSdoc}
 X	@${INSTALL_DATA} ${WRKSRC}/doc/${f} ${PREFIX}/share/doc/proftpd
 X.endfor
 X.for f in ${PORTDOCScontrib}
 X	@${INSTALL_DATA} ${WRKSRC}/doc/contrib/${f} ${PREFIX}/share/doc/proftpd
 X.endfor
 X.endif
 X
 X.if !defined(WITHOUT_PAM)
 X	@${CAT} ${PKGMESSAGE}
 X.endif
 X
 X.if defined(WITH_CTRLS)
 X	@${INSTALL_PROGRAM} ${WRKSRC}/ftpdctl ${PREFIX}/sbin/ftpdctl
 X	@${INSTALL_MAN} ${WRKSRC}/src/ftpdctl.8 ${PREFIX}/man/man8/ftpdctl.8
 X.endif
 X
 X.include <bsd.port.post.mk>
 SHAR_END
 echo x proftpd/distinfo
 sed 's/^X//' > proftpd/distinfo << 'SHAR_END'
 XMD5 (proftpd-1.3.1rc1.tar.bz2) = 08f4d526b46c84f10e9634d2d913052c
 XSHA256 (proftpd-1.3.1rc1.tar.bz2) = 
 32cf852535c2ec55c5833c2766cbd0c6aba950ab2967565606e1df334736a766
 XSIZE (proftpd-1.3.1rc1.tar.bz2) = 1484138
 SHAR_END
 echo x proftpd/pkg-descr
 sed 's/^X//' > proftpd/pkg-descr << 'SHAR_END'
 XProFTPD is a highly configurable ftp daemon for unix
 Xand unix-like operating systems. ProFTPD is designed
 Xto be somewhat of a "drop-in" replacement for wu-ftpd
 Xwith a configuration format like Apache.
 X
 XFull online documentation is available at
 Xhttp://www.proftpd.org/, including a server
 Xconfiguration directive reference manual.
 X
 X- Stephane Legrand
 Xstephane@lituus.fr
 X
 XWWW: http://www.proftpd.org/
 SHAR_END
 echo x proftpd/pkg-message
 sed 's/^X//' > proftpd/pkg-message << 'SHAR_END'
 X###
 XMake sure you have the following lines in your PAM configuration file
 Xso that ProFTPd's PAM module can authenticate users correctly.
 X
 Xftpd auth    required    pam_unix.so         try_first_pass
 Xftpd account required    pam_unix.so         try_first_pass
 Xftpd session required    pam_permit.so
 X###
 SHAR_END
 echo x proftpd/pkg-plist
 sed 's/^X//' > proftpd/pkg-plist << 'SHAR_END'
 Xbin/ftpcount
 Xbin/ftpdctl
 Xbin/ftptop
 Xbin/ftpwho
 Xetc/proftpd.conf
 Xetc/rc.d/proftpd
 Xinclude/proftpd/auth.h
 Xinclude/proftpd/bindings.h
 Xinclude/proftpd/buildstamp.h
 Xinclude/proftpd/child.h
 Xinclude/proftpd/class.h
 Xinclude/proftpd/compat.h
 Xinclude/proftpd/conf.h
 Xinclude/proftpd/config.h
 Xinclude/proftpd/ctrls.h
 Xinclude/proftpd/data.h
 Xinclude/proftpd/default_paths.h
 Xinclude/proftpd/dirtree.h
 Xinclude/proftpd/display.h
 Xinclude/proftpd/event.h
 Xinclude/proftpd/feat.h
 Xinclude/proftpd/fsio.h
 Xinclude/proftpd/ftp.h
 Xinclude/proftpd/glibc-glob.h
 Xinclude/proftpd/help.h
 Xinclude/proftpd/ident.h
 Xinclude/proftpd/inet.h
 Xinclude/proftpd/lastlog.h
 Xinclude/proftpd/libsupp.h
 Xinclude/proftpd/log.h
 Xinclude/proftpd/mkhome.h
 Xinclude/proftpd/mod_ctrls.h
 Xinclude/proftpd/mod_wrap2.h
 Xinclude/proftpd/modules.h
 Xinclude/proftpd/netacl.h
 Xinclude/proftpd/netaddr.h
 Xinclude/proftpd/netio.h
 Xinclude/proftpd/options.h
 Xinclude/proftpd/parser.h
 Xinclude/proftpd/pool.h
 Xinclude/proftpd/pr-syslog.h
 Xinclude/proftpd/privs.h
 Xinclude/proftpd/proftpd.h
 Xinclude/proftpd/regexp.h
 Xinclude/proftpd/response.h
 Xinclude/proftpd/scoreboard.h
 Xinclude/proftpd/sets.h
 Xinclude/proftpd/support.h
 Xinclude/proftpd/table.h
 Xinclude/proftpd/timers.h
 Xinclude/proftpd/trace.h
 Xinclude/proftpd/utf8.h
 Xinclude/proftpd/var.h
 Xinclude/proftpd/version.h
 Xinclude/proftpd/xferlog.h
 Xsbin/ftpshut
 Xsbin/in.proftpd
 Xsbin/proftpd
 X@unexec if cmp -s %D/etc/proftpd.conf %D/%%EXAMPLESDIR%%/etc/proftpd.conf; 
 then rm -f %D/etc/proftpd.conf; fi
 X%%EXAMPLESDIR%%/etc/proftpd.conf
 X@exec if [ ! -f %D/etc/proftpd.conf ] ; then cp -p %D/%F %B/proftpd.conf; fi
 X@dirrm %%EXAMPLESDIR%%/etc
 X@dirrm %%EXAMPLESDIR%%
 SHAR_END
 echo x proftpd/files/patch-ah
 sed 's/^X//' > proftpd/files/patch-ah << 'SHAR_END'
 X--- modules/mod_auth_unix.c.orig	Thu May 13 23:40:18 2004
 X+++ modules/mod_auth_unix.c	Thu May 13 23:40:27 2004
 X@@ -57,6 +57,7 @@
 X #endif /* HAVE_HPSECURITY_H or HPUX10 or HPUX11 */
 X 
 X #if defined(HAVE_PROT_H) || defined(COMSEC)
 X+# include <krb.h>
 X # include <prot.h>
 X #endif
 X 
 SHAR_END
 echo x proftpd/files/patch-contrib::mod_sql_mysql.c
 sed 's/^X//' > proftpd/files/patch-contrib::mod_sql_mysql.c << 'SHAR_END'
 X--- contrib/mod_sql_mysql.c.orig	Tue Dec 12 19:52:15 2006
 X+++ contrib/mod_sql_mysql.c	Tue Dec 12 20:02:56 2006
 X@@ -135,7 +135,7 @@
 X #include "conf.h"
 X #include "../contrib/mod_sql.h"
 X 
 X-#include <mysql.h>
 X+#include <mysql/mysql.h>
 X 
 X /* 
 X  * timer-handling code adds the need for a couple of forward declarations
 SHAR_END
 echo x proftpd/files/patch-doc::Configuration.html
 sed 's/^X//' > proftpd/files/patch-doc::Configuration.html << 'SHAR_END'
 X--- ./doc/Configuration.html.orig	Wed Jan 29 12:27:24 2003
 X+++ ./doc/Configuration.html	Sat Mar 15 11:34:14 2003
 X@@ -4226,7 +4226,7 @@
 X ></DT
 X ><DD
 X ><P
 X->ftp</P
 X+>ftpd</P
 X ></DD
 X ><DT
 X ><PRE
 X@@ -32252,4 +32252,4 @@
 X ></DIV
 X ></BODY
 X ></HTML
 X->
 X\ No newline at end of file
 X+>
 SHAR_END
 echo x proftpd/files/patch-module::mod_auth_pam.c
 sed 's/^X//' > proftpd/files/patch-module::mod_auth_pam.c << 'SHAR_END'
 X--- ./modules/mod_auth_pam.c.orig	Thu Jan  2 13:25:20 2003
 X+++ ./modules/mod_auth_pam.c	Sat Mar 15 11:35:00 2003
 X@@ -57,7 +57,7 @@
 X #endif /* HAVE_PAM_PAM_APPL_H */
 X 
 X static pam_handle_t *	pamh			= NULL;
 X-static char *		pamconfig		= "ftp";
 X+static char *		pamconfig		= "ftpd";
 X static char *		pam_user 		= NULL;
 X static char *		pam_pass 		= NULL;
 X static size_t		pam_user_len		= 0;
 SHAR_END
 echo x proftpd/files/patch-sample-configurations_basic.conf
 sed 's/^X//' > proftpd/files/patch-sample-configurations_basic.conf 
 << 'SHAR_END'
 X--- sample-configurations/basic.conf.orig	Thu Apr 15 19:46:38 2004
 X+++ sample-configurations/basic.conf	Wed Nov 15 19:14:36 2006
 X@@ -1,3 +1,7 @@
 X+#
 X+# To have more informations about Proftpd configuration
 X+# look at : http://www.proftpd.org/
 X+#
 X # This is a basic ProFTPD configuration file (rename it to 
 X # 'proftpd.conf' for actual use.  It establishes a single server
 X # and a single anonymous login.  It assumes that you have a user/group
 X@@ -6,6 +10,7 @@
 X ServerName			"ProFTPD Default Installation"
 X ServerType			standalone
 X DefaultServer			on
 X+ScoreboardFile			/var/run/proftpd.scoreboard
 X 
 X # Port 21 is the standard FTP port.
 X Port				21
 X@@ -22,6 +27,8 @@
 X # (such as xinetd).
 X MaxInstances			30
 X 
 X+CommandBufferSize		512
 X+
 X # Set the user and group under which the server will run.
 X User				nobody
 X Group				nogroup
 X@@ -40,23 +47,29 @@
 X 
 X # A basic anonymous configuration, no upload directories.  If you do not
 X # want anonymous users, simply delete this entire <Anonymous> section.
 X-<Anonymous ~ftp>
 X-  User				ftp
 X-  Group				ftp
 X-
 X-  # We want clients to be able to login with "anonymous" as well as "ftp"
 X-  UserAlias			anonymous ftp
 X-
 X-  # Limit the maximum number of anonymous logins
 X-  MaxClients			10
 X-
 X-  # We want 'welcome.msg' displayed at login, and '.message' displayed
 X-  # in each newly chdired directory.
 X-  DisplayLogin			welcome.msg
 X-  DisplayFirstChdir		.message
 X-
 X-  # Limit WRITE everywhere in the anonymous chroot
 X-  <Limit WRITE>
 X-    DenyAll
 X-  </Limit>
 X-</Anonymous>
 X+#########################################################################
 X+#                                                                       #
 X+# Uncomment lines with only one # to allow basic anonymous access       #
 X+#                                                                       #
 X+#########################################################################
 X+
 X+#<Anonymous ~ftp>
 X+#   User				ftp
 X+#   Group				ftp
 X+
 X+  ### We want clients to be able to login with "anonymous" as well as "ftp"
 X+  # UserAlias			anonymous ftp
 X+
 X+  ### Limit the maximum number of anonymous logins
 X+  # MaxClients			10
 X+
 X+  ### We want 'welcome.msg' displayed at login, and '.message' displayed
 X+  ### in each newly chdired directory.
 X+  # DisplayLogin			welcome.msg
 X+  # DisplayFirstChdir		.message
 X+
 X+  ### Limit WRITE everywhere in the anonymous chroot
 X+  # <Limit WRITE>
 X+  #   DenyAll
 X+  # </Limit>
 X+#</Anonymous>
 SHAR_END
 echo x proftpd/files/patch-src_proftpd.8.in
 sed 's/^X//' > proftpd/files/patch-src_proftpd.8.in << 'SHAR_END'
 X--- src/proftpd.8.in.orig	Sat Sep 18 07:40:30 2004
 X+++ src/proftpd.8.in	Thu Nov  3 15:35:56 2005
 X@@ -22,6 +22,12 @@
 X connection to the FTP service is made, or alternatively it can be run as a
 X standalone daemon.
 X .PP
 X+.br
 X+Each successful and failed ftp(1) session is logged using syslog with a
 X+facility of LOG_FTP.  Note: LOG_FTP messages are not displayed
 X+by syslogd(8) by default, and may have to be enabled in syslogd(8)'s 
 X+configuration file.
 X+.PP
 X When
 X .B proftpd
 X is run in standalone mode and it receives a SIGHUP then it will reread its
 SHAR_END
 echo x proftpd/files/proftpd.sh.in
 sed 's/^X//' > proftpd/files/proftpd.sh.in << 'SHAR_END'
 X#!/bin/sh
 X#
 X# $FreeBSD: ports/ftp/proftpd/files/proftpd.sh.in,v 1.3 2006/02/20 20:47:00 
 dougb Exp $
 X#
 X
 X# PROVIDE: proftpd
 X# REQUIRE: DAEMON
 X# BEFORE: LOGIN
 X# KEYWORD: shutdown
 X
 X#
 X# Add the following lines to /etc/rc.conf to enable proftpd:
 X#
 X#proftpd_enable="YES"
 X#
 X# See proftpd(8) for flags
 X#
 X
 X. %%RC_SUBR%%
 X
 Xname=proftpd
 Xrcvar=`set_rcvar`
 X
 Xcommand=%%PREFIX%%/sbin/proftpd
 Xpidfile=/var/run/proftpd.pid
 Xrequired_files=%%PREFIX%%/etc/proftpd.conf
 X
 Xstop_postcmd=stop_postcmd
 X
 Xstop_postcmd()
 X{
 X  rm -f $pidfile
 X}
 X
 X# set defaults
 X
 Xproftpd_enable=${proftpd_enable:-"NO"}
 Xproftpd_flags=${proftpd_flags:-""}
 X
 Xextra_commands="reload"
 X
 Xload_rc_config $name
 Xrun_rc_command "$1"
 SHAR_END
 echo x proftpd/files/extra_patch-ldap-tls-mod_ldap.c
 sed 's/^X//' > proftpd/files/extra_patch-ldap-tls-mod_ldap.c << 'SHAR_END'
 X--- contrib/mod_ldap.c.orig	Thu Oct 19 18:18:07 2006
 X+++ contrib/mod_ldap.c	Fri Dec 15 11:01:21 2006
 X@@ -60,7 +60,7 @@
 X  * after connecting to the LDAP server. If TLS cannot be enabled, the LDAP
 X  * connection will fail.
 X  */
 X-/* #define USE_LDAP_TLS */
 X+#define USE_LDAP_TLS */
 X 
 X /*
 X  * If you have to edit anything below this line, it's a bug. Report it
 SHAR_END
 echo x proftpd/files/patch-utf8.c
 sed 's/^X//' > proftpd/files/patch-utf8.c << 'SHAR_END'
 X--- src/utf8.c.orig	Wed Jun 14 15:33:19 2006
 X+++ src/utf8.c	Wed Dec 13 08:40:35 2006
 X@@ -23,7 +23,7 @@
 X  */
 X 
 X /* UTF8 encoding/decoding
 X- * $Id: utf8.c,v 1.3 2006/06/14 23:33:19 castaglia Exp $
 X+ * $Id: utf8.c,v 1.4 2006/12/13 17:40:35 castaglia Exp $
 X  */
 X 
 X #include "conf.h"
 X@@ -38,12 +38,13 @@
 X # include <langinfo.h>
 X #endif
 X 
 X+#ifdef HAVE_ICONV_H
 X static iconv_t decode_conv = (iconv_t) -1;
 X static iconv_t encode_conv = (iconv_t) -1;
 X 
 X static int utf8_convert(iconv_t conv, char *inbuf, size_t *inbuflen,
 X     char *outbuf, size_t *outbuflen) {
 X-#ifdef HAVE_ICONV
 X+# ifdef HAVE_ICONV
 X   char *start = inbuf;
 X 
 X   while (inbuflen > 0) {
 X@@ -61,14 +62,14 @@
 X     break;
 X   }
 X   return 0;
 X-#else
 X+# else
 X   errno = ENOSYS;
 X   return -1;
 X-#endif /* HAVE_ICONV */
 X+# endif /* HAVE_ICONV */
 X }
 X 
 X int utf8_free(void) {
 X-#ifdef HAVE_ICONV
 X+# ifdef HAVE_ICONV
 X   int res;
 X 
 X   /* Close the iconv handles. */
 X@@ -81,10 +82,10 @@
 X     return -1;
 X 
 X   return 0;
 X-#else
 X+# else
 X   errno = ENOSYS;
 X   return -1;
 X-#endif
 X+# endif
 X }
 X 
 X int utf8_init(void) {
 X@@ -111,7 +112,7 @@
 X     "conversion");
 X #endif /* HAVE_NL_LANGINFO */
 X 
 X-#ifdef HAVE_ICONV
 X+# ifdef HAVE_ICONV
 X   /* Get the iconv handles. */
 X   encode_conv = iconv_open(local_charset, "UTF-8");
 X   if (encode_conv == (iconv_t) -1)
 X@@ -122,13 +123,15 @@
 X     return -1;
 X 
 X   return 0;
 X-#else
 X+# else
 X   errno = ENOSYS;
 X   return -1;
 X-#endif /* HAVE_ICONV */
 X+# endif /* HAVE_ICONV */
 X }
 X+#endif /* !HAVE_ICONV_H */
 X 
 X char *pr_utf8_decode(pool *p, const char *in, size_t inlen, size_t *outlen) 
 {
 X+#ifdef HAVE_ICONV_H
 X   size_t inbuflen, outbuflen;
 X   char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res = NULL;
 X 
 X@@ -156,9 +159,14 @@
 X   memcpy(res, outbuf, *outlen);
 X 
 X   return res;
 X+#else
 X+  pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 decoding 
 possible");
 X+  return pstrdup(p, in);
 X+#endif /* !HAVE_ICONV_H */
 X }
 X 
 X char *pr_utf8_encode(pool *p, const char *in, size_t inlen, size_t *outlen) 
 {
 X+#ifdef HAVE_ICONV_H
 X   size_t inbuflen, outbuflen;
 X   char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res;
 X 
 X@@ -186,6 +194,10 @@
 X   memcpy(res, outbuf, *outlen);
 X 
 X   return res;
 X+#else
 X+  pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 encoding 
 possible");
 X+  return pstrdup(p, in);
 X+#endif /* !HAVE_ICONV_H */
 X }
 X 
 X #endif /* PR_USE_NLS */
 SHAR_END
 exit
 
 
 
 
 
 
 
 
 
 

From: "Beecher Rintoul" <akbeech@gmail.com>
To: miwi@freebsd.org
Cc: bug-followup@freebsd.org
Subject: Re: ports/106821: [MAINTAINER] ftp/proftpd Upgrade to 1.3.1rc1
Date: Mon, 18 Dec 2006 08:19:40 -0900

 I sent you an email yesterday with a shar file of the complete port. I fixed
 the pkg-plist so it now removes all files. I don't know why 4.x shows up as
 not finding a patch, they're all there. I'm not seeing that here.
 
 #!/bin/sh
 # This is a shell archive
 echo x proftpd
 mkdir -p proftpd > /dev/null 2>&1
 echo x proftpd/files
 mkdir -p proftpd/files > /dev/null 2>&1
 echo x proftpd/Makefile
 sed 's/^X//' > proftpd/Makefile << 'SHAR_END'
 X# New ports collection makefile for:	proftpd
 X# Date created:		26 January 1998
 X# Whom:			Stephane Legrand
 X#
 X# $FreeBSD: ports/ftp/proftpd/Makefile,v 1.93 2006/12/12 16:08:09 delphij Exp $
 X#
 X
 XPORTNAME=	proftpd
 XDISTVERSION=	1.3.1rc1
 XPORTREVISION=
 XCATEGORIES=	ftp
 XMASTER_SITES=	ftp://ftp.proftpd.org/distrib/source/ \
 X		ftp://ftp.fastorama.com/mirrors/ftp.proftpd.org/distrib/source/ \
 X		ftp://ftp.dataguard.no/ftp/pub/proftpd/distrib/source/ \
 X		ftp://spirit.bentel.sk/mirrors/Proftpd/distrib/source/ \
 X		ftp://proftpd.networkedsystems.co.uk/distrib/source/ \
 X		ftp://ftp.ethereal.com/mirrors/ftp.proftpd.org/distrib/source/ \
 X		ftp://mirror.cybercomm.nl/pub/proftpd/distrib/source/
 X
 XMAINTAINER?=	beech@alaskaparadise.com
 XCOMMENT?=	Highly configurable ftp daemon
 X
 XMAN1=	ftpcount.1 ftpwho.1 ftptop.1
 XMAN5=	xferlog.5
 XMAN8=	proftpd.8 ftpshut.8 ftpdctl.8
 X
 XPORTDOCSdoc=	Configuration.html faq.html
 XPORTDOCScontrib=mod_ifsession.html mod_radius.html mod_rewrite.html \
 X		mod_tls.html mod_wrap2.html mod_wrap2_file.html mod_wrap2_sql.html \
 X		mod_ban.html mod_quotatab_radius.html ftpasswd.html
 XPORTDOCS=	${PORTDOCSdoc} ${PORTDOCScontrib}
 X
 XUSE_GMAKE=	yes
 XUSE_BZIP2=	yes
 XGNU_CONFIGURE=yes
 X
 XUSE_RC_SUBR=	proftpd.sh
 X
 XCONFIGURE_ARGS=	--localstatedir=/var/run \
 X		--sysconfdir=${EXAMPLESDIR}/etc \
 X		--disable-sendfile
 X
 XOPTIONS=	IPV6 "Use IPv6" off \
 X		LDAP "Use LDAP" off \
 X		LDAP_TLS "Use LDAP TLS (Requires LDAP)" off\
 X		MYSQL "Use MySQL" off \
 X		POSTGRESQL "Use Postgres" off \
 X		OPENSSL "Include mod_tls" off \
 X		QUOTA "Include mod_quota" off \
 X		IFSESSION "Include mod_ifsession" on \
 X		README "Include mod_readme" on \
 X		RATIO "Include mod_ratio" on \
 X		CTRLS "include controls" off \
 X		REWRITE "Include mod_rewrite" on \
 X		WRAP "Include mod_wrap2" on \
 X		WRAP_FILE "include mod_wrap2_file" off \
 X		WRAP_SQL "include mod_wrap2_sql" off \
 X		LANG "include mod_lang" off \
 X		RADIUS "Include mod_radius" off \
 X		QUOTATAB_RADIUS "include mod_quotatab_radius" off \
 X		BAN "include mod_ban (Requires CTRLS)" off \
 X		NLS "Use nls" off
 X
 XMODULES?=
 X
 X.include <bsd.port.pre.mk>
 X
 X.if ${OSVERSION} < 500000
 XCONFIGURE_ARGS+=	--without-getopt
 XUSE_AUTOTOOLS=	autoconf:259
 X.endif
 X
 X.if !defined(WITHOUT_RATIO)
 XMODULES:=${MODULES}:mod_ratio
 X.endif
 X
 X.if !defined(WITHOUT_README)
 XMODULES:=${MODULES}:mod_readme
 X.endif
 X
 X.if !defined(WITHOUT_REWRITE)
 XMODULES:=${MODULES}:mod_rewrite
 X.endif
 X
 X.if !defined(WITHOUT_WRAP)
 XMODULES:=${MODULES}:mod_wrap2
 XINCLUDEDIRS:=${INCLUDEDIRS}:${WORKDIR}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 X.endif
 X
 X.if defined(WITH_WRAP_FILE)
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 XMODULES:=${MODULES}:mod_wrap2_file
 X.endif
 X
 X.if defined(WITH_WRAP_SQL)
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 XMODULES:=${MODULES}:mod_wrap2_sql
 X.endif
 X
 X.if defined(WITH_RADIUS)
 XMODULES:=${MODULES}:mod_radius
 X.endif
 X
 X.if defined(WITH_QUOTATAB_RADIUS)
 XMODULES:=${MODULES}:mod_quotatab_radius
 X.endif
 X
 X.if defined(WITH_LANG)
 XMODULES:=${MODULES}:mod_lang
 X.endif
 X
 X.if defined(WITH_BAN)
 XMODULES:=${MODULES}:mod_ban
 X.endif
 X
 X.if defined(WITH_SETPASSENT)
 XCONFIGURE_ARGS+=	--enable-force-setpassent
 X.endif
 X
 X.if defined(WITHOUT_PAM)
 XCONFIGURE_ARGS+=	--disable-auth-pam
 X.endif
 X
 X.if defined(WITH_IPV6)
 XCONFIGURE_ARGS+=	--enable-ipv6
 X.endif
 X
 X.if !defined(WITH_IPV6)
 XCONFIGURE_ARGS+=	--disable-ipv6
 X.endif
 X
 X.if defined(WITH_NLS)
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 XCONFIGURE_ARGS+=	--enable-nls
 X.endif
 X
 X#allow user to override
 XMODULES?=	mod_ratio:mod_readme:mod_rewrite:mod_wrap:mod_ifsession
 X
 XINCLUDEDIRS?=
 XLIBDIRS?=
 X
 X.if defined(WITH_LDAP)
 XUSE_OPENLDAP=	yes
 XMODULES:=${MODULES}:mod_ldap
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 X.endif
 X
 X.if defined(WITH_MYSQL)
 XUSE_MYSQL=	yes
 XMODULES:=${MODULES}:mod_sql:mod_sql_mysql
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib/mysql
 X.endif
 X
 X.if defined(WITH_POSTGRESQL)
 XUSE_PGSQL=	yes
 XMODULES:=${MODULES}:mod_sql:mod_sql_postgres
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 X.endif
 X
 X.if defined(WITH_OPENSSL)
 XCFLAGS+=	-DHAVE_OPENSSL
 X.include <${PORTSDIR}/Mk/bsd.openssl.mk>
 XPROFTPD_LIBS+=	-lssl -lcrypto -L${LOCALBASE}/lib
 XMODULES:=${MODULES}:mod_tls
 X.if defined(WITH_LDAP_TLS)
 XEXTRA_PATCHES+=	${FILESDIR}/extra_patch-ldap-tls-mod_ldap.c
 X.endif
 X.endif
 X
 X.if defined(WITH_CTRLS)
 XCONFIGURE_ARGS+=	--enable-ctrls
 XPLIST_FILES+=	sbin/ftpdctl
 X.if !defined(WITHOUT_CTRLS_ADMIN)
 XMODULES:=${MODULES}:mod_ctrls_admin
 X.endif
 X.endif
 X
 X.if defined(WITH_QUOTA)
 XMODULES:=${MODULES}:mod_quotatab:mod_quotatab_file
 X.if defined(WITH_LDAP)
 XMODULES:=${MODULES}:mod_quotatab_ldap
 X.endif
 X.if defined(WITH_POSTGRESQL) || defined(WITH_MYSQL)
 XMODULES:=${MODULES}:mod_quotatab_sql
 X.endif
 X.endif
 X
 X# mod_ifsession should be the last item in the modules list
 X.if !defined(WITHOUT_IFSESSION)
 XMODULES:=${MODULES}:mod_ifsession
 X.endif
 X
 X# Keep this here below, in case similar constructs need to be made
 XCONFIGURE_ENV+=	"LIBS=${PROFTPD_LIBS}"
 X
 X.if !empty(MODULES)
 XCONFIGURE_ARGS+=	--with-modules=${MODULES}
 X.endif
 X
 X.if !empty(INCLUDEDIRS)
 XCONFIGURE_ARGS+=	--with-includes=${INCLUDEDIRS}
 X.endif
 X
 X.if !empty(LIBDIRS)
 XCONFIGURE_ARGS+=	--with-libraries=${LIBDIRS}
 X.endif
 X
 XMODULES!=${ECHO} ${MODULES} | ${SED} -e 's,^:,,' -e 's,:$$,,'
 X
 Xpre-configure:
 X	@${ECHO_MSG} "==> Configuring with ${MODULES}"
 X
 Xpost-configure:
 X	${REINPLACE_CMD} -e 's:${EXAMPLESDIR}:${PREFIX}:' ${WRKSRC}/config.h
 X	${REINPLACE_CMD} -e 's: -lnsl::' ${WRKSRC}/Make.rules
 X	${REINPLACE_CMD} -e 's:/usr/sbin:${PREFIX}/sbin:' \
 X		-e 's:/usr/bin:${PREFIX}/bin:' \
 X		${WRKSRC}/src/proftpd.8 ${WRKSRC}/utils/ftpshut.8 \
 X		${WRKSRC}/utils/ftpcount.1
 X
 Xpost-install:
 X	[ -f ${PREFIX}/etc/proftpd.conf ] || \
 X		${CP} ${EXAMPLESDIR}/etc/proftpd.conf ${PREFIX}/etc/proftpd.conf
 X
 X.if !defined(NOPORTDOCS)
 X	@${MKDIR} ${PREFIX}/share/doc/proftpd
 X.for f in ${PORTDOCSdoc}
 X	@${INSTALL_DATA} ${WRKSRC}/doc/${f} ${PREFIX}/share/doc/proftpd
 X.endfor
 X.for f in ${PORTDOCScontrib}
 X	@${INSTALL_DATA} ${WRKSRC}/doc/contrib/${f} ${PREFIX}/share/doc/proftpd
 X.endfor
 X.endif
 X
 X.if !defined(WITHOUT_PAM)
 X	@${CAT} ${PKGMESSAGE}
 X.endif
 X
 X.if defined(WITH_CTRLS)
 X	@${INSTALL_PROGRAM} ${WRKSRC}/ftpdctl ${PREFIX}/sbin/ftpdctl
 X	@${INSTALL_MAN} ${WRKSRC}/src/ftpdctl.8 ${PREFIX}/man/man8/ftpdctl.8
 X.endif
 X
 X.include <bsd.port.post.mk>
 SHAR_END
 echo x proftpd/distinfo
 sed 's/^X//' > proftpd/distinfo << 'SHAR_END'
 XMD5 (proftpd-1.3.1rc1.tar.bz2) = 08f4d526b46c84f10e9634d2d913052c
 XSHA256 (proftpd-1.3.1rc1.tar.bz2) =
 32cf852535c2ec55c5833c2766cbd0c6aba950ab2967565606e1df334736a766
 XSIZE (proftpd-1.3.1rc1.tar.bz2) = 1484138
 SHAR_END
 echo x proftpd/pkg-descr
 sed 's/^X//' > proftpd/pkg-descr << 'SHAR_END'
 XProFTPD is a highly configurable ftp daemon for unix
 Xand unix-like operating systems. ProFTPD is designed
 Xto be somewhat of a "drop-in" replacement for wu-ftpd
 Xwith a configuration format like Apache.
 X
 XFull online documentation is available at
 Xhttp://www.proftpd.org/, including a server
 Xconfiguration directive reference manual.
 X
 X- Stephane Legrand
 Xstephane@lituus.fr
 X
 XWWW: http://www.proftpd.org/
 SHAR_END
 echo x proftpd/pkg-message
 sed 's/^X//' > proftpd/pkg-message << 'SHAR_END'
 X###
 XMake sure you have the following lines in your PAM configuration file
 Xso that ProFTPd's PAM module can authenticate users correctly.
 X
 Xftpd auth    required    pam_unix.so         try_first_pass
 Xftpd account required    pam_unix.so         try_first_pass
 Xftpd session required    pam_permit.so
 X###
 SHAR_END
 echo x proftpd/pkg-plist
 sed 's/^X//' > proftpd/pkg-plist << 'SHAR_END'
 Xbin/ftpcount
 Xbin/ftpdctl
 Xbin/ftptop
 Xbin/ftpwho
 Xetc/proftpd.conf
 Xetc/rc.d/proftpd
 Xinclude/proftpd/auth.h
 Xinclude/proftpd/bindings.h
 Xinclude/proftpd/buildstamp.h
 Xinclude/proftpd/child.h
 Xinclude/proftpd/class.h
 Xinclude/proftpd/compat.h
 Xinclude/proftpd/conf.h
 Xinclude/proftpd/config.h
 Xinclude/proftpd/ctrls.h
 Xinclude/proftpd/data.h
 Xinclude/proftpd/default_paths.h
 Xinclude/proftpd/dirtree.h
 Xinclude/proftpd/display.h
 Xinclude/proftpd/event.h
 Xinclude/proftpd/feat.h
 Xinclude/proftpd/fsio.h
 Xinclude/proftpd/ftp.h
 Xinclude/proftpd/glibc-glob.h
 Xinclude/proftpd/help.h
 Xinclude/proftpd/ident.h
 Xinclude/proftpd/inet.h
 Xinclude/proftpd/lastlog.h
 Xinclude/proftpd/libsupp.h
 Xinclude/proftpd/log.h
 Xinclude/proftpd/mkhome.h
 Xinclude/proftpd/mod_ctrls.h
 Xinclude/proftpd/mod_wrap2.h
 Xinclude/proftpd/modules.h
 Xinclude/proftpd/netacl.h
 Xinclude/proftpd/netaddr.h
 Xinclude/proftpd/netio.h
 Xinclude/proftpd/options.h
 Xinclude/proftpd/parser.h
 Xinclude/proftpd/pool.h
 Xinclude/proftpd/pr-syslog.h
 Xinclude/proftpd/privs.h
 Xinclude/proftpd/proftpd.h
 Xinclude/proftpd/regexp.h
 Xinclude/proftpd/response.h
 Xinclude/proftpd/scoreboard.h
 Xinclude/proftpd/sets.h
 Xinclude/proftpd/support.h
 Xinclude/proftpd/table.h
 Xinclude/proftpd/timers.h
 Xinclude/proftpd/trace.h
 Xinclude/proftpd/utf8.h
 Xinclude/proftpd/var.h
 Xinclude/proftpd/version.h
 Xinclude/proftpd/xferlog.h
 Xsbin/ftpshut
 Xsbin/in.proftpd
 Xsbin/proftpd
 X@unexec if cmp -s %D/etc/proftpd.conf
 %D/%%EXAMPLESDIR%%/etc/proftpd.conf; then rm -f %D/etc/proftpd.conf;
 fi
 X%%EXAMPLESDIR%%/etc/proftpd.conf
 X@exec if [ ! -f %D/etc/proftpd.conf ] ; then cp -p %D/%F %B/proftpd.conf; fi
 X@dirrm %%EXAMPLESDIR%%/etc
 X@dirrm %%EXAMPLESDIR%%
 SHAR_END
 echo x proftpd/files/patch-ah
 sed 's/^X//' > proftpd/files/patch-ah << 'SHAR_END'
 X--- modules/mod_auth_unix.c.orig	Thu May 13 23:40:18 2004
 X+++ modules/mod_auth_unix.c	Thu May 13 23:40:27 2004
 X@@ -57,6 +57,7 @@
 X #endif /* HAVE_HPSECURITY_H or HPUX10 or HPUX11 */
 X
 X #if defined(HAVE_PROT_H) || defined(COMSEC)
 X+# include <krb.h>
 X # include <prot.h>
 X #endif
 X
 SHAR_END
 echo x proftpd/files/patch-contrib::mod_sql_mysql.c
 sed 's/^X//' > proftpd/files/patch-contrib::mod_sql_mysql.c << 'SHAR_END'
 X--- contrib/mod_sql_mysql.c.orig	Tue Dec 12 19:52:15 2006
 X+++ contrib/mod_sql_mysql.c	Tue Dec 12 20:02:56 2006
 X@@ -135,7 +135,7 @@
 X #include "conf.h"
 X #include "../contrib/mod_sql.h"
 X
 X-#include <mysql.h>
 X+#include <mysql/mysql.h>
 X
 X /*
 X  * timer-handling code adds the need for a couple of forward declarations
 SHAR_END
 echo x proftpd/files/patch-doc::Configuration.html
 sed 's/^X//' > proftpd/files/patch-doc::Configuration.html << 'SHAR_END'
 X--- ./doc/Configuration.html.orig	Wed Jan 29 12:27:24 2003
 X+++ ./doc/Configuration.html	Sat Mar 15 11:34:14 2003
 X@@ -4226,7 +4226,7 @@
 X ></DT
 X ><DD
 X ><P
 X->ftp</P
 X+>ftpd</P
 X ></DD
 X ><DT
 X ><PRE
 X@@ -32252,4 +32252,4 @@
 X ></DIV
 X ></BODY
 X ></HTML
 X->
 X\ No newline at end of file
 X+>
 SHAR_END
 echo x proftpd/files/patch-module::mod_auth_pam.c
 sed 's/^X//' > proftpd/files/patch-module::mod_auth_pam.c << 'SHAR_END'
 X--- ./modules/mod_auth_pam.c.orig	Thu Jan  2 13:25:20 2003
 X+++ ./modules/mod_auth_pam.c	Sat Mar 15 11:35:00 2003
 X@@ -57,7 +57,7 @@
 X #endif /* HAVE_PAM_PAM_APPL_H */
 X
 X static pam_handle_t *	pamh			= NULL;
 X-static char *		pamconfig		= "ftp";
 X+static char *		pamconfig		= "ftpd";
 X static char *		pam_user 		= NULL;
 X static char *		pam_pass 		= NULL;
 X static size_t		pam_user_len		= 0;
 SHAR_END
 echo x proftpd/files/patch-sample-configurations_basic.conf
 sed 's/^X//' > proftpd/files/patch-sample-configurations_basic.conf <<
 'SHAR_END'
 X--- sample-configurations/basic.conf.orig	Thu Apr 15 19:46:38 2004
 X+++ sample-configurations/basic.conf	Wed Nov 15 19:14:36 2006
 X@@ -1,3 +1,7 @@
 X+#
 X+# To have more informations about Proftpd configuration
 X+# look at : http://www.proftpd.org/
 X+#
 X # This is a basic ProFTPD configuration file (rename it to
 X # 'proftpd.conf' for actual use.  It establishes a single server
 X # and a single anonymous login.  It assumes that you have a user/group
 X@@ -6,6 +10,7 @@
 X ServerName			"ProFTPD Default Installation"
 X ServerType			standalone
 X DefaultServer			on
 X+ScoreboardFile			/var/run/proftpd.scoreboard
 X
 X # Port 21 is the standard FTP port.
 X Port				21
 X@@ -22,6 +27,8 @@
 X # (such as xinetd).
 X MaxInstances			30
 X
 X+CommandBufferSize		512
 X+
 X # Set the user and group under which the server will run.
 X User				nobody
 X Group				nogroup
 X@@ -40,23 +47,29 @@
 X
 X # A basic anonymous configuration, no upload directories.  If you do not
 X # want anonymous users, simply delete this entire <Anonymous> section.
 X-<Anonymous ~ftp>
 X-  User				ftp
 X-  Group				ftp
 X-
 X-  # We want clients to be able to login with "anonymous" as well as "ftp"
 X-  UserAlias			anonymous ftp
 X-
 X-  # Limit the maximum number of anonymous logins
 X-  MaxClients			10
 X-
 X-  # We want 'welcome.msg' displayed at login, and '.message' displayed
 X-  # in each newly chdired directory.
 X-  DisplayLogin			welcome.msg
 X-  DisplayFirstChdir		.message
 X-
 X-  # Limit WRITE everywhere in the anonymous chroot
 X-  <Limit WRITE>
 X-    DenyAll
 X-  </Limit>
 X-</Anonymous>
 X+#########################################################################
 X+#                                                                       #
 X+# Uncomment lines with only one # to allow basic anonymous access       #
 X+#                                                                       #
 X+#########################################################################
 X+
 X+#<Anonymous ~ftp>
 X+#   User				ftp
 X+#   Group				ftp
 X+
 X+  ### We want clients to be able to login with "anonymous" as well as "ftp"
 X+  # UserAlias			anonymous ftp
 X+
 X+  ### Limit the maximum number of anonymous logins
 X+  # MaxClients			10
 X+
 X+  ### We want 'welcome.msg' displayed at login, and '.message' displayed
 X+  ### in each newly chdired directory.
 X+  # DisplayLogin			welcome.msg
 X+  # DisplayFirstChdir		.message
 X+
 X+  ### Limit WRITE everywhere in the anonymous chroot
 X+  # <Limit WRITE>
 X+  #   DenyAll
 X+  # </Limit>
 X+#</Anonymous>
 SHAR_END
 echo x proftpd/files/patch-src_proftpd.8.in
 sed 's/^X//' > proftpd/files/patch-src_proftpd.8.in << 'SHAR_END'
 X--- src/proftpd.8.in.orig	Sat Sep 18 07:40:30 2004
 X+++ src/proftpd.8.in	Thu Nov  3 15:35:56 2005
 X@@ -22,6 +22,12 @@
 X connection to the FTP service is made, or alternatively it can be run as a
 X standalone daemon.
 X .PP
 X+.br
 X+Each successful and failed ftp(1) session is logged using syslog with a
 X+facility of LOG_FTP.  Note: LOG_FTP messages are not displayed
 X+by syslogd(8) by default, and may have to be enabled in syslogd(8)'s
 X+configuration file.
 X+.PP
 X When
 X .B proftpd
 X is run in standalone mode and it receives a SIGHUP then it will reread its
 SHAR_END
 echo x proftpd/files/proftpd.sh.in
 sed 's/^X//' > proftpd/files/proftpd.sh.in << 'SHAR_END'
 X#!/bin/sh
 X#
 X# $FreeBSD: ports/ftp/proftpd/files/proftpd.sh.in,v 1.3 2006/02/20
 20:47:00 dougb Exp $
 X#
 X
 X# PROVIDE: proftpd
 X# REQUIRE: DAEMON
 X# BEFORE: LOGIN
 X# KEYWORD: shutdown
 X
 X#
 X# Add the following lines to /etc/rc.conf to enable proftpd:
 X#
 X#proftpd_enable="YES"
 X#
 X# See proftpd(8) for flags
 X#
 X
 X. %%RC_SUBR%%
 X
 Xname=proftpd
 Xrcvar=`set_rcvar`
 X
 Xcommand=%%PREFIX%%/sbin/proftpd
 Xpidfile=/var/run/proftpd.pid
 Xrequired_files=%%PREFIX%%/etc/proftpd.conf
 X
 Xstop_postcmd=stop_postcmd
 X
 Xstop_postcmd()
 X{
 X  rm -f $pidfile
 X}
 X
 X# set defaults
 X
 Xproftpd_enable=${proftpd_enable:-"NO"}
 Xproftpd_flags=${proftpd_flags:-""}
 X
 Xextra_commands="reload"
 X
 Xload_rc_config $name
 Xrun_rc_command "$1"
 SHAR_END
 echo x proftpd/files/extra_patch-ldap-tls-mod_ldap.c
 sed 's/^X//' > proftpd/files/extra_patch-ldap-tls-mod_ldap.c << 'SHAR_END'
 X--- contrib/mod_ldap.c.orig	Thu Oct 19 18:18:07 2006
 X+++ contrib/mod_ldap.c	Fri Dec 15 11:01:21 2006
 X@@ -60,7 +60,7 @@
 X  * after connecting to the LDAP server. If TLS cannot be enabled, the LDAP
 X  * connection will fail.
 X  */
 X-/* #define USE_LDAP_TLS */
 X+#define USE_LDAP_TLS */
 X
 X /*
 X  * If you have to edit anything below this line, it's a bug. Report it
 SHAR_END
 echo x proftpd/files/patch-utf8.c
 sed 's/^X//' > proftpd/files/patch-utf8.c << 'SHAR_END'
 X--- src/utf8.c.orig	Wed Jun 14 15:33:19 2006
 X+++ src/utf8.c	Wed Dec 13 08:40:35 2006
 X@@ -23,7 +23,7 @@
 X  */
 X
 X /* UTF8 encoding/decoding
 X- * $Id: utf8.c,v 1.3 2006/06/14 23:33:19 castaglia Exp $
 X+ * $Id: utf8.c,v 1.4 2006/12/13 17:40:35 castaglia Exp $
 X  */
 X
 X #include "conf.h"
 X@@ -38,12 +38,13 @@
 X # include <langinfo.h>
 X #endif
 X
 X+#ifdef HAVE_ICONV_H
 X static iconv_t decode_conv = (iconv_t) -1;
 X static iconv_t encode_conv = (iconv_t) -1;
 X
 X static int utf8_convert(iconv_t conv, char *inbuf, size_t *inbuflen,
 X     char *outbuf, size_t *outbuflen) {
 X-#ifdef HAVE_ICONV
 X+# ifdef HAVE_ICONV
 X   char *start = inbuf;
 X
 X   while (inbuflen > 0) {
 X@@ -61,14 +62,14 @@
 X     break;
 X   }
 X   return 0;
 X-#else
 X+# else
 X   errno = ENOSYS;
 X   return -1;
 X-#endif /* HAVE_ICONV */
 X+# endif /* HAVE_ICONV */
 X }
 X
 X int utf8_free(void) {
 X-#ifdef HAVE_ICONV
 X+# ifdef HAVE_ICONV
 X   int res;
 X
 X   /* Close the iconv handles. */
 X@@ -81,10 +82,10 @@
 X     return -1;
 X
 X   return 0;
 X-#else
 X+# else
 X   errno = ENOSYS;
 X   return -1;
 X-#endif
 X+# endif
 X }
 X
 X int utf8_init(void) {
 X@@ -111,7 +112,7 @@
 X     "conversion");
 X #endif /* HAVE_NL_LANGINFO */
 X
 X-#ifdef HAVE_ICONV
 X+# ifdef HAVE_ICONV
 X   /* Get the iconv handles. */
 X   encode_conv = iconv_open(local_charset, "UTF-8");
 X   if (encode_conv == (iconv_t) -1)
 X@@ -122,13 +123,15 @@
 X     return -1;
 X
 X   return 0;
 X-#else
 X+# else
 X   errno = ENOSYS;
 X   return -1;
 X-#endif /* HAVE_ICONV */
 X+# endif /* HAVE_ICONV */
 X }
 X+#endif /* !HAVE_ICONV_H */
 X
 X char *pr_utf8_decode(pool *p, const char *in, size_t inlen, size_t *outlen) {
 X+#ifdef HAVE_ICONV_H
 X   size_t inbuflen, outbuflen;
 X   char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res = NULL;
 X
 X@@ -156,9 +159,14 @@
 X   memcpy(res, outbuf, *outlen);
 X
 X   return res;
 X+#else
 X+  pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 decoding possible");
 X+  return pstrdup(p, in);
 X+#endif /* !HAVE_ICONV_H */
 X }
 X
 X char *pr_utf8_encode(pool *p, const char *in, size_t inlen, size_t *outlen) {
 X+#ifdef HAVE_ICONV_H
 X   size_t inbuflen, outbuflen;
 X   char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res;
 X
 X@@ -186,6 +194,10 @@
 X   memcpy(res, outbuf, *outlen);
 X
 X   return res;
 X+#else
 X+  pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 encoding possible");
 X+  return pstrdup(p, in);
 X+#endif /* !HAVE_ICONV_H */
 X }
 X
 X #endif /* PR_USE_NLS */
 SHAR_END
 exit

From: Beech Rintoul <beech@alaskaparadise.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/106821: [MAINTAINER] ftp/proftpd Upgrade to 1.3.1rc1
Date: Mon, 18 Dec 2006 08:08:59 -0900

 Here's the complete port:
 
 
 #!/bin/sh
 # This is a shell archive
 echo x proftpd
 mkdir -p proftpd > /dev/null 2>&1
 echo x proftpd/files
 mkdir -p proftpd/files > /dev/null 2>&1
 echo x proftpd/Makefile
 sed 's/^X//' > proftpd/Makefile << 'SHAR_END'
 X# New ports collection makefile for:	proftpd
 X# Date created:		26 January 1998
 X# Whom:			Stephane Legrand
 X#
 X# $FreeBSD: ports/ftp/proftpd/Makefile,v 1.93 2006/12/12 16:08:09 delphij Exp 
 $
 X#
 X
 XPORTNAME=	proftpd
 XDISTVERSION=	1.3.1rc1
 XPORTREVISION=
 XCATEGORIES=	ftp
 XMASTER_SITES=	ftp://ftp.proftpd.org/distrib/source/ \
 X		ftp://ftp.fastorama.com/mirrors/ftp.proftpd.org/distrib/source/ \
 X		ftp://ftp.dataguard.no/ftp/pub/proftpd/distrib/source/ \
 X		ftp://spirit.bentel.sk/mirrors/Proftpd/distrib/source/ \
 X		ftp://proftpd.networkedsystems.co.uk/distrib/source/ \
 X		ftp://ftp.ethereal.com/mirrors/ftp.proftpd.org/distrib/source/ \
 X		ftp://mirror.cybercomm.nl/pub/proftpd/distrib/source/
 X
 XMAINTAINER?=	beech@alaskaparadise.com
 XCOMMENT?=	Highly configurable ftp daemon
 X
 XMAN1=	ftpcount.1 ftpwho.1 ftptop.1
 XMAN5=	xferlog.5
 XMAN8=	proftpd.8 ftpshut.8 ftpdctl.8
 X
 XPORTDOCSdoc=	Configuration.html faq.html
 XPORTDOCScontrib=mod_ifsession.html mod_radius.html mod_rewrite.html \
 X		mod_tls.html mod_wrap2.html mod_wrap2_file.html mod_wrap2_sql.html \
 X		mod_ban.html mod_quotatab_radius.html ftpasswd.html
 XPORTDOCS=	${PORTDOCSdoc} ${PORTDOCScontrib}
 X
 XUSE_GMAKE=	yes
 XUSE_BZIP2=	yes
 XGNU_CONFIGURE=yes
 X
 XUSE_RC_SUBR=	proftpd.sh
 X
 XCONFIGURE_ARGS=	--localstatedir=/var/run \
 X		--sysconfdir=${EXAMPLESDIR}/etc \
 X		--disable-sendfile
 X
 XOPTIONS=	IPV6 "Use IPv6" off \
 X		LDAP "Use LDAP" off \
 X		LDAP_TLS "Use LDAP TLS (Requires LDAP)" off\
 X		MYSQL "Use MySQL" off \
 X		POSTGRESQL "Use Postgres" off \
 X		OPENSSL "Include mod_tls" off \
 X		QUOTA "Include mod_quota" off \
 X		IFSESSION "Include mod_ifsession" on \
 X		README "Include mod_readme" on \
 X		RATIO "Include mod_ratio" on \
 X		CTRLS "include controls" off \
 X		REWRITE "Include mod_rewrite" on \
 X		WRAP "Include mod_wrap2" on \
 X		WRAP_FILE "include mod_wrap2_file" off \
 X		WRAP_SQL "include mod_wrap2_sql" off \
 X		LANG "include mod_lang" off \
 X		RADIUS "Include mod_radius" off \
 X		QUOTATAB_RADIUS "include mod_quotatab_radius" off \
 X		BAN "include mod_ban (Requires CTRLS)" off \
 X		NLS "Use nls" off
 X
 XMODULES?=
 X
 X.include <bsd.port.pre.mk>
 X
 X.if ${OSVERSION} < 500000
 XCONFIGURE_ARGS+=	--without-getopt
 XUSE_AUTOTOOLS=	autoconf:259
 X.endif
 X
 X.if !defined(WITHOUT_RATIO)
 XMODULES:=${MODULES}:mod_ratio
 X.endif
 X
 X.if !defined(WITHOUT_README)
 XMODULES:=${MODULES}:mod_readme
 X.endif
 X
 X.if !defined(WITHOUT_REWRITE)
 XMODULES:=${MODULES}:mod_rewrite
 X.endif
 X
 X.if !defined(WITHOUT_WRAP)
 XMODULES:=${MODULES}:mod_wrap2
 XINCLUDEDIRS:=${INCLUDEDIRS}:${WORKDIR}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 X.endif
 X
 X.if defined(WITH_WRAP_FILE)
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 XMODULES:=${MODULES}:mod_wrap2_file
 X.endif
 X
 X.if defined(WITH_WRAP_SQL)
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 XMODULES:=${MODULES}:mod_wrap2_sql
 X.endif
 X
 X.if defined(WITH_RADIUS)
 XMODULES:=${MODULES}:mod_radius
 X.endif
 X
 X.if defined(WITH_QUOTATAB_RADIUS)
 XMODULES:=${MODULES}:mod_quotatab_radius
 X.endif
 X
 X.if defined(WITH_LANG)
 XMODULES:=${MODULES}:mod_lang
 X.endif
 X
 X.if defined(WITH_BAN)
 XMODULES:=${MODULES}:mod_ban
 X.endif
 X
 X.if defined(WITH_SETPASSENT)
 XCONFIGURE_ARGS+=	--enable-force-setpassent
 X.endif
 X
 X.if defined(WITHOUT_PAM)
 XCONFIGURE_ARGS+=	--disable-auth-pam
 X.endif
 X
 X.if defined(WITH_IPV6)
 XCONFIGURE_ARGS+=	--enable-ipv6
 X.endif
 X
 X.if !defined(WITH_IPV6)
 XCONFIGURE_ARGS+=	--disable-ipv6
 X.endif
 X
 X.if defined(WITH_NLS)
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 XCONFIGURE_ARGS+=	--enable-nls
 X.endif
 X
 X#allow user to override
 XMODULES?=	mod_ratio:mod_readme:mod_rewrite:mod_wrap:mod_ifsession
 X
 XINCLUDEDIRS?=
 XLIBDIRS?=
 X
 X.if defined(WITH_LDAP)
 XUSE_OPENLDAP=	yes
 XMODULES:=${MODULES}:mod_ldap
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 X.endif
 X
 X.if defined(WITH_MYSQL)
 XUSE_MYSQL=	yes
 XMODULES:=${MODULES}:mod_sql:mod_sql_mysql
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib/mysql
 X.endif
 X
 X.if defined(WITH_POSTGRESQL)
 XUSE_PGSQL=	yes
 XMODULES:=${MODULES}:mod_sql:mod_sql_postgres
 XINCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 XLIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 X.endif
 X
 X.if defined(WITH_OPENSSL)
 XCFLAGS+=	-DHAVE_OPENSSL
 X.include <${PORTSDIR}/Mk/bsd.openssl.mk>
 XPROFTPD_LIBS+=	-lssl -lcrypto -L${LOCALBASE}/lib
 XMODULES:=${MODULES}:mod_tls
 X.if defined(WITH_LDAP_TLS)
 XEXTRA_PATCHES+=	${FILESDIR}/extra_patch-ldap-tls-mod_ldap.c
 X.endif
 X.endif
 X
 X.if defined(WITH_CTRLS)
 XCONFIGURE_ARGS+=	--enable-ctrls
 XPLIST_FILES+=	sbin/ftpdctl
 X.if !defined(WITHOUT_CTRLS_ADMIN)
 XMODULES:=${MODULES}:mod_ctrls_admin
 X.endif
 X.endif
 X
 X.if defined(WITH_QUOTA)
 XMODULES:=${MODULES}:mod_quotatab:mod_quotatab_file
 X.if defined(WITH_LDAP)
 XMODULES:=${MODULES}:mod_quotatab_ldap
 X.endif
 X.if defined(WITH_POSTGRESQL) || defined(WITH_MYSQL)
 XMODULES:=${MODULES}:mod_quotatab_sql
 X.endif
 X.endif
 X
 X# mod_ifsession should be the last item in the modules list
 X.if !defined(WITHOUT_IFSESSION)
 XMODULES:=${MODULES}:mod_ifsession
 X.endif
 X
 X# Keep this here below, in case similar constructs need to be made
 XCONFIGURE_ENV+=	"LIBS=${PROFTPD_LIBS}"
 X
 X.if !empty(MODULES)
 XCONFIGURE_ARGS+=	--with-modules=${MODULES}
 X.endif
 X
 X.if !empty(INCLUDEDIRS)
 XCONFIGURE_ARGS+=	--with-includes=${INCLUDEDIRS}
 X.endif
 X
 X.if !empty(LIBDIRS)
 XCONFIGURE_ARGS+=	--with-libraries=${LIBDIRS}
 X.endif
 X
 XMODULES!=${ECHO} ${MODULES} | ${SED} -e 's,^:,,' -e 's,:$$,,'
 X
 Xpre-configure:
 X	@${ECHO_MSG} "==> Configuring with ${MODULES}"
 X
 Xpost-configure:
 X	${REINPLACE_CMD} -e 's:${EXAMPLESDIR}:${PREFIX}:' ${WRKSRC}/config.h
 X	${REINPLACE_CMD} -e 's: -lnsl::' ${WRKSRC}/Make.rules
 X	${REINPLACE_CMD} -e 's:/usr/sbin:${PREFIX}/sbin:' \
 X		-e 's:/usr/bin:${PREFIX}/bin:' \
 X		${WRKSRC}/src/proftpd.8 ${WRKSRC}/utils/ftpshut.8 \
 X		${WRKSRC}/utils/ftpcount.1
 X
 Xpost-install:
 X	[ -f ${PREFIX}/etc/proftpd.conf ] || \
 X		${CP} ${EXAMPLESDIR}/etc/proftpd.conf ${PREFIX}/etc/proftpd.conf
 X
 X.if !defined(NOPORTDOCS)
 X	@${MKDIR} ${PREFIX}/share/doc/proftpd
 X.for f in ${PORTDOCSdoc}
 X	@${INSTALL_DATA} ${WRKSRC}/doc/${f} ${PREFIX}/share/doc/proftpd
 X.endfor
 X.for f in ${PORTDOCScontrib}
 X	@${INSTALL_DATA} ${WRKSRC}/doc/contrib/${f} ${PREFIX}/share/doc/proftpd
 X.endfor
 X.endif
 X
 X.if !defined(WITHOUT_PAM)
 X	@${CAT} ${PKGMESSAGE}
 X.endif
 X
 X.if defined(WITH_CTRLS)
 X	@${INSTALL_PROGRAM} ${WRKSRC}/ftpdctl ${PREFIX}/sbin/ftpdctl
 X	@${INSTALL_MAN} ${WRKSRC}/src/ftpdctl.8 ${PREFIX}/man/man8/ftpdctl.8
 X.endif
 X
 X.include <bsd.port.post.mk>
 SHAR_END
 echo x proftpd/distinfo
 sed 's/^X//' > proftpd/distinfo << 'SHAR_END'
 XMD5 (proftpd-1.3.1rc1.tar.bz2) = 08f4d526b46c84f10e9634d2d913052c
 XSHA256 (proftpd-1.3.1rc1.tar.bz2) = 
 32cf852535c2ec55c5833c2766cbd0c6aba950ab2967565606e1df334736a766
 XSIZE (proftpd-1.3.1rc1.tar.bz2) = 1484138
 SHAR_END
 echo x proftpd/pkg-descr
 sed 's/^X//' > proftpd/pkg-descr << 'SHAR_END'
 XProFTPD is a highly configurable ftp daemon for unix
 Xand unix-like operating systems. ProFTPD is designed
 Xto be somewhat of a "drop-in" replacement for wu-ftpd
 Xwith a configuration format like Apache.
 X
 XFull online documentation is available at
 Xhttp://www.proftpd.org/, including a server
 Xconfiguration directive reference manual.
 X
 X- Stephane Legrand
 Xstephane@lituus.fr
 X
 XWWW: http://www.proftpd.org/
 SHAR_END
 echo x proftpd/pkg-message
 sed 's/^X//' > proftpd/pkg-message << 'SHAR_END'
 X###
 XMake sure you have the following lines in your PAM configuration file
 Xso that ProFTPd's PAM module can authenticate users correctly.
 X
 Xftpd auth    required    pam_unix.so         try_first_pass
 Xftpd account required    pam_unix.so         try_first_pass
 Xftpd session required    pam_permit.so
 X###
 SHAR_END
 echo x proftpd/pkg-plist
 sed 's/^X//' > proftpd/pkg-plist << 'SHAR_END'
 Xbin/ftpcount
 Xbin/ftpdctl
 Xbin/ftptop
 Xbin/ftpwho
 Xetc/proftpd.conf
 Xetc/rc.d/proftpd
 Xinclude/proftpd/auth.h
 Xinclude/proftpd/bindings.h
 Xinclude/proftpd/buildstamp.h
 Xinclude/proftpd/child.h
 Xinclude/proftpd/class.h
 Xinclude/proftpd/compat.h
 Xinclude/proftpd/conf.h
 Xinclude/proftpd/config.h
 Xinclude/proftpd/ctrls.h
 Xinclude/proftpd/data.h
 Xinclude/proftpd/default_paths.h
 Xinclude/proftpd/dirtree.h
 Xinclude/proftpd/display.h
 Xinclude/proftpd/event.h
 Xinclude/proftpd/feat.h
 Xinclude/proftpd/fsio.h
 Xinclude/proftpd/ftp.h
 Xinclude/proftpd/glibc-glob.h
 Xinclude/proftpd/help.h
 Xinclude/proftpd/ident.h
 Xinclude/proftpd/inet.h
 Xinclude/proftpd/lastlog.h
 Xinclude/proftpd/libsupp.h
 Xinclude/proftpd/log.h
 Xinclude/proftpd/mkhome.h
 Xinclude/proftpd/mod_ctrls.h
 Xinclude/proftpd/mod_wrap2.h
 Xinclude/proftpd/modules.h
 Xinclude/proftpd/netacl.h
 Xinclude/proftpd/netaddr.h
 Xinclude/proftpd/netio.h
 Xinclude/proftpd/options.h
 Xinclude/proftpd/parser.h
 Xinclude/proftpd/pool.h
 Xinclude/proftpd/pr-syslog.h
 Xinclude/proftpd/privs.h
 Xinclude/proftpd/proftpd.h
 Xinclude/proftpd/regexp.h
 Xinclude/proftpd/response.h
 Xinclude/proftpd/scoreboard.h
 Xinclude/proftpd/sets.h
 Xinclude/proftpd/support.h
 Xinclude/proftpd/table.h
 Xinclude/proftpd/timers.h
 Xinclude/proftpd/trace.h
 Xinclude/proftpd/utf8.h
 Xinclude/proftpd/var.h
 Xinclude/proftpd/version.h
 Xinclude/proftpd/xferlog.h
 Xsbin/ftpshut
 Xsbin/in.proftpd
 Xsbin/proftpd
 X@unexec if cmp -s %D/etc/proftpd.conf %D/%%EXAMPLESDIR%%/etc/proftpd.conf; 
 then rm -f %D/etc/proftpd.conf; fi
 X%%EXAMPLESDIR%%/etc/proftpd.conf
 X@exec if [ ! -f %D/etc/proftpd.conf ] ; then cp -p %D/%F %B/proftpd.conf; fi
 X@dirrm %%EXAMPLESDIR%%/etc
 X@dirrm %%EXAMPLESDIR%%
 SHAR_END
 echo x proftpd/files/patch-ah
 sed 's/^X//' > proftpd/files/patch-ah << 'SHAR_END'
 X--- modules/mod_auth_unix.c.orig	Thu May 13 23:40:18 2004
 X+++ modules/mod_auth_unix.c	Thu May 13 23:40:27 2004
 X@@ -57,6 +57,7 @@
 X #endif /* HAVE_HPSECURITY_H or HPUX10 or HPUX11 */
 X 
 X #if defined(HAVE_PROT_H) || defined(COMSEC)
 X+# include <krb.h>
 X # include <prot.h>
 X #endif
 X 
 SHAR_END
 echo x proftpd/files/patch-contrib::mod_sql_mysql.c
 sed 's/^X//' > proftpd/files/patch-contrib::mod_sql_mysql.c << 'SHAR_END'
 X--- contrib/mod_sql_mysql.c.orig	Tue Dec 12 19:52:15 2006
 X+++ contrib/mod_sql_mysql.c	Tue Dec 12 20:02:56 2006
 X@@ -135,7 +135,7 @@
 X #include "conf.h"
 X #include "../contrib/mod_sql.h"
 X 
 X-#include <mysql.h>
 X+#include <mysql/mysql.h>
 X 
 X /* 
 X  * timer-handling code adds the need for a couple of forward declarations
 SHAR_END
 echo x proftpd/files/patch-doc::Configuration.html
 sed 's/^X//' > proftpd/files/patch-doc::Configuration.html << 'SHAR_END'
 X--- ./doc/Configuration.html.orig	Wed Jan 29 12:27:24 2003
 X+++ ./doc/Configuration.html	Sat Mar 15 11:34:14 2003
 X@@ -4226,7 +4226,7 @@
 X ></DT
 X ><DD
 X ><P
 X->ftp</P
 X+>ftpd</P
 X ></DD
 X ><DT
 X ><PRE
 X@@ -32252,4 +32252,4 @@
 X ></DIV
 X ></BODY
 X ></HTML
 X->
 X\ No newline at end of file
 X+>
 SHAR_END
 echo x proftpd/files/patch-module::mod_auth_pam.c
 sed 's/^X//' > proftpd/files/patch-module::mod_auth_pam.c << 'SHAR_END'
 X--- ./modules/mod_auth_pam.c.orig	Thu Jan  2 13:25:20 2003
 X+++ ./modules/mod_auth_pam.c	Sat Mar 15 11:35:00 2003
 X@@ -57,7 +57,7 @@
 X #endif /* HAVE_PAM_PAM_APPL_H */
 X 
 X static pam_handle_t *	pamh			= NULL;
 X-static char *		pamconfig		= "ftp";
 X+static char *		pamconfig		= "ftpd";
 X static char *		pam_user 		= NULL;
 X static char *		pam_pass 		= NULL;
 X static size_t		pam_user_len		= 0;
 SHAR_END
 echo x proftpd/files/patch-sample-configurations_basic.conf
 sed 's/^X//' > proftpd/files/patch-sample-configurations_basic.conf 
 << 'SHAR_END'
 X--- sample-configurations/basic.conf.orig	Thu Apr 15 19:46:38 2004
 X+++ sample-configurations/basic.conf	Wed Nov 15 19:14:36 2006
 X@@ -1,3 +1,7 @@
 X+#
 X+# To have more informations about Proftpd configuration
 X+# look at : http://www.proftpd.org/
 X+#
 X # This is a basic ProFTPD configuration file (rename it to 
 X # 'proftpd.conf' for actual use.  It establishes a single server
 X # and a single anonymous login.  It assumes that you have a user/group
 X@@ -6,6 +10,7 @@
 X ServerName			"ProFTPD Default Installation"
 X ServerType			standalone
 X DefaultServer			on
 X+ScoreboardFile			/var/run/proftpd.scoreboard
 X 
 X # Port 21 is the standard FTP port.
 X Port				21
 X@@ -22,6 +27,8 @@
 X # (such as xinetd).
 X MaxInstances			30
 X 
 X+CommandBufferSize		512
 X+
 X # Set the user and group under which the server will run.
 X User				nobody
 X Group				nogroup
 X@@ -40,23 +47,29 @@
 X 
 X # A basic anonymous configuration, no upload directories.  If you do not
 X # want anonymous users, simply delete this entire <Anonymous> section.
 X-<Anonymous ~ftp>
 X-  User				ftp
 X-  Group				ftp
 X-
 X-  # We want clients to be able to login with "anonymous" as well as "ftp"
 X-  UserAlias			anonymous ftp
 X-
 X-  # Limit the maximum number of anonymous logins
 X-  MaxClients			10
 X-
 X-  # We want 'welcome.msg' displayed at login, and '.message' displayed
 X-  # in each newly chdired directory.
 X-  DisplayLogin			welcome.msg
 X-  DisplayFirstChdir		.message
 X-
 X-  # Limit WRITE everywhere in the anonymous chroot
 X-  <Limit WRITE>
 X-    DenyAll
 X-  </Limit>
 X-</Anonymous>
 X+#########################################################################
 X+#                                                                       #
 X+# Uncomment lines with only one # to allow basic anonymous access       #
 X+#                                                                       #
 X+#########################################################################
 X+
 X+#<Anonymous ~ftp>
 X+#   User				ftp
 X+#   Group				ftp
 X+
 X+  ### We want clients to be able to login with "anonymous" as well as "ftp"
 X+  # UserAlias			anonymous ftp
 X+
 X+  ### Limit the maximum number of anonymous logins
 X+  # MaxClients			10
 X+
 X+  ### We want 'welcome.msg' displayed at login, and '.message' displayed
 X+  ### in each newly chdired directory.
 X+  # DisplayLogin			welcome.msg
 X+  # DisplayFirstChdir		.message
 X+
 X+  ### Limit WRITE everywhere in the anonymous chroot
 X+  # <Limit WRITE>
 X+  #   DenyAll
 X+  # </Limit>
 X+#</Anonymous>
 SHAR_END
 echo x proftpd/files/patch-src_proftpd.8.in
 sed 's/^X//' > proftpd/files/patch-src_proftpd.8.in << 'SHAR_END'
 X--- src/proftpd.8.in.orig	Sat Sep 18 07:40:30 2004
 X+++ src/proftpd.8.in	Thu Nov  3 15:35:56 2005
 X@@ -22,6 +22,12 @@
 X connection to the FTP service is made, or alternatively it can be run as a
 X standalone daemon.
 X .PP
 X+.br
 X+Each successful and failed ftp(1) session is logged using syslog with a
 X+facility of LOG_FTP.  Note: LOG_FTP messages are not displayed
 X+by syslogd(8) by default, and may have to be enabled in syslogd(8)'s 
 X+configuration file.
 X+.PP
 X When
 X .B proftpd
 X is run in standalone mode and it receives a SIGHUP then it will reread its
 SHAR_END
 echo x proftpd/files/proftpd.sh.in
 sed 's/^X//' > proftpd/files/proftpd.sh.in << 'SHAR_END'
 X#!/bin/sh
 X#
 X# $FreeBSD: ports/ftp/proftpd/files/proftpd.sh.in,v 1.3 2006/02/20 20:47:00 
 dougb Exp $
 X#
 X
 X# PROVIDE: proftpd
 X# REQUIRE: DAEMON
 X# BEFORE: LOGIN
 X# KEYWORD: shutdown
 X
 X#
 X# Add the following lines to /etc/rc.conf to enable proftpd:
 X#
 X#proftpd_enable="YES"
 X#
 X# See proftpd(8) for flags
 X#
 X
 X. %%RC_SUBR%%
 X
 Xname=proftpd
 Xrcvar=`set_rcvar`
 X
 Xcommand=%%PREFIX%%/sbin/proftpd
 Xpidfile=/var/run/proftpd.pid
 Xrequired_files=%%PREFIX%%/etc/proftpd.conf
 X
 Xstop_postcmd=stop_postcmd
 X
 Xstop_postcmd()
 X{
 X  rm -f $pidfile
 X}
 X
 X# set defaults
 X
 Xproftpd_enable=${proftpd_enable:-"NO"}
 Xproftpd_flags=${proftpd_flags:-""}
 X
 Xextra_commands="reload"
 X
 Xload_rc_config $name
 Xrun_rc_command "$1"
 SHAR_END
 echo x proftpd/files/extra_patch-ldap-tls-mod_ldap.c
 sed 's/^X//' > proftpd/files/extra_patch-ldap-tls-mod_ldap.c << 'SHAR_END'
 X--- contrib/mod_ldap.c.orig	Thu Oct 19 18:18:07 2006
 X+++ contrib/mod_ldap.c	Fri Dec 15 11:01:21 2006
 X@@ -60,7 +60,7 @@
 X  * after connecting to the LDAP server. If TLS cannot be enabled, the LDAP
 X  * connection will fail.
 X  */
 X-/* #define USE_LDAP_TLS */
 X+#define USE_LDAP_TLS */
 X 
 X /*
 X  * If you have to edit anything below this line, it's a bug. Report it
 SHAR_END
 echo x proftpd/files/patch-utf8.c
 sed 's/^X//' > proftpd/files/patch-utf8.c << 'SHAR_END'
 X--- src/utf8.c.orig	Wed Jun 14 15:33:19 2006
 X+++ src/utf8.c	Wed Dec 13 08:40:35 2006
 X@@ -23,7 +23,7 @@
 X  */
 X 
 X /* UTF8 encoding/decoding
 X- * $Id: utf8.c,v 1.3 2006/06/14 23:33:19 castaglia Exp $
 X+ * $Id: utf8.c,v 1.4 2006/12/13 17:40:35 castaglia Exp $
 X  */
 X 
 X #include "conf.h"
 X@@ -38,12 +38,13 @@
 X # include <langinfo.h>
 X #endif
 X 
 X+#ifdef HAVE_ICONV_H
 X static iconv_t decode_conv = (iconv_t) -1;
 X static iconv_t encode_conv = (iconv_t) -1;
 X 
 X static int utf8_convert(iconv_t conv, char *inbuf, size_t *inbuflen,
 X     char *outbuf, size_t *outbuflen) {
 X-#ifdef HAVE_ICONV
 X+# ifdef HAVE_ICONV
 X   char *start = inbuf;
 X 
 X   while (inbuflen > 0) {
 X@@ -61,14 +62,14 @@
 X     break;
 X   }
 X   return 0;
 X-#else
 X+# else
 X   errno = ENOSYS;
 X   return -1;
 X-#endif /* HAVE_ICONV */
 X+# endif /* HAVE_ICONV */
 X }
 X 
 X int utf8_free(void) {
 X-#ifdef HAVE_ICONV
 X+# ifdef HAVE_ICONV
 X   int res;
 X 
 X   /* Close the iconv handles. */
 X@@ -81,10 +82,10 @@
 X     return -1;
 X 
 X   return 0;
 X-#else
 X+# else
 X   errno = ENOSYS;
 X   return -1;
 X-#endif
 X+# endif
 X }
 X 
 X int utf8_init(void) {
 X@@ -111,7 +112,7 @@
 X     "conversion");
 X #endif /* HAVE_NL_LANGINFO */
 X 
 X-#ifdef HAVE_ICONV
 X+# ifdef HAVE_ICONV
 X   /* Get the iconv handles. */
 X   encode_conv = iconv_open(local_charset, "UTF-8");
 X   if (encode_conv == (iconv_t) -1)
 X@@ -122,13 +123,15 @@
 X     return -1;
 X 
 X   return 0;
 X-#else
 X+# else
 X   errno = ENOSYS;
 X   return -1;
 X-#endif /* HAVE_ICONV */
 X+# endif /* HAVE_ICONV */
 X }
 X+#endif /* !HAVE_ICONV_H */
 X 
 X char *pr_utf8_decode(pool *p, const char *in, size_t inlen, size_t *outlen) 
 {
 X+#ifdef HAVE_ICONV_H
 X   size_t inbuflen, outbuflen;
 X   char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res = NULL;
 X 
 X@@ -156,9 +159,14 @@
 X   memcpy(res, outbuf, *outlen);
 X 
 X   return res;
 X+#else
 X+  pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 decoding 
 possible");
 X+  return pstrdup(p, in);
 X+#endif /* !HAVE_ICONV_H */
 X }
 X 
 X char *pr_utf8_encode(pool *p, const char *in, size_t inlen, size_t *outlen) 
 {
 X+#ifdef HAVE_ICONV_H
 X   size_t inbuflen, outbuflen;
 X   char *inbuf, outbuf[PR_TUNABLE_PATH_MAX*2], *res;
 X 
 X@@ -186,6 +194,10 @@
 X   memcpy(res, outbuf, *outlen);
 X 
 X   return res;
 X+#else
 X+  pr_trace_msg("utf8", 1, "missing iconv support, no UTF8 encoding 
 possible");
 X+  return pstrdup(p, in);
 X+#endif /* !HAVE_ICONV_H */
 X }
 X 
 X #endif /* PR_USE_NLS */
 SHAR_END
 exit
 
 
 
 
 
 
 
 
 
 
 

From: Martin Wilke <miwi@FreeBSD.org>
To: "Beecher Rintoul" <akbeech@gmail.com>
Cc: bug-followup@FreeBSD.org <bug-followup@FreeBSD.org>
Subject: Re: ports/106821: [MAINTAINER] ftp/proftpd Upgrade to 1.3.1rc1
Date: Mon, 18 Dec 2006 19:13:57 +0100

 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMQ0KDQpPbiBNb24s
 IDE4IERlYyAyMDA2IDE3OjUwOjMwIEdNVA0KIkJlZWNoZXIgUmludG91bCIgPGFrYmVlY2hAZ21h
 aWwuY29tPiB3cm90ZToNCg0KSGksIA0KDQpZZXMgaSBrbm93LCBidXQgdGhpcyBwYXRjaCB3b3Jr
 cyBub3QgY29ycmVjdCBbMV0uIA0KDQo1LlggcGxpc3QgZmFpbGVkIGNvbXBsZXRlbHkNCjYuWCBh
 bmQgNy5YIGJyZWFrcyB3aXRoDQoNCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCj09PT09PT09PT09PT09PT09PT09PHBoYXNl
 IDc6IG1ha2UgcGFja2FnZT49PT09PT09PT09PT09PT09PT09PQ0KPT09PiAgQnVpbGRpbmcgcGFj
 a2FnZSBmb3IgcHJvZnRwZC0xLjMuMS5yMQ0KQ3JlYXRpbmcgcGFja2FnZSAvdG1wL3BhY2thZ2Vz
 L0FsbC9wcm9mdHBkLTEuMy4xLnIxLnRieg0KUmVnaXN0ZXJpbmcgZGVwZW5kczouDQpDcmVhdGlu
 ZyBiemlwJ2QgdGFyIGJhbGwgaW4gJy90bXAvcGFja2FnZXMvQWxsL3Byb2Z0cGQtMS4zLjEucjEu
 dGJ6Jw0KRGVsZXRpbmcgcHJvZnRwZC0xLjMuMS5yMQ0KcGtnX2RlbGV0ZTogZmlsZSAnL3Vzci9s
 b2NhbC9ldGMvcmMuZC9wcm9mdHBkJyBkb2Vzbid0IGV4aXN0DQpwa2dfZGVsZXRlOiBjb3VsZG4n
 dCBlbnRpcmVseSBkZWxldGUgcGFja2FnZSAocGVyaGFwcyB0aGUgcGFja2luZyBsaXN0DQppcyBp
 bmNvcnJlY3RseSBzcGVjaWZpZWQ/KQ0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KDQo9PT0gQ2hlY2tpbmcgZmlsZXN5c3Rl
 bSBzdGF0ZQ0KbGlzdCBvZiBleHRyYSBmaWxlcyBhbmQgZGlyZWN0b3JpZXMgaW4gLyAobm90IHBy
 ZXNlbnQgYmVmb3JlIHRoaXMgcG9ydA0Kd2FzIGluc3RhbGxlZCBidXQgcHJlc2VudCBhZnRlciBp
 dCB3YXMgZGVpbnN0YWxsZWQpIDIyNDA0MzkgICAgICAgIDQNCmRyd3hyLXhyLXggICAgMiByb290
 ICAgICAgICAgICAgIHdoZWVsICAgICAgICAgICAgICAgIDEwMjQgRGVjIDE4IDE3OjQxDQp1c3Iv
 bG9jYWwvaW5jbHVkZS9wcm9mdHBkIERlbGV0aW5nIGdtYWtlLTMuODFfMSBEZWxldGluZw0KZ2V0
 dGV4dC0wLjE0LjVfMiBEZWxldGluZyBsaWJpY29udi0xLjkuMl8yDQoNCj09PSBDaGVja2luZyBm
 aWxlc3lzdGVtIHN0YXRlIGFmdGVyIGFsbCBwYWNrYWdlcyBkZWxldGVkDQo9PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpsaXN0
 IG9mIGV4dHJhIGZpbGVzIGFuZCBkaXJlY3RvcmllcyBpbiAvIChub3QgcHJlc2VudCBvbiBjbGVh
 biBzeXN0ZW0NCmJ1dCBwcmVzZW50IGFmdGVyIGV2ZXJ5dGhpbmcgd2FzIGRlaW5zdGFsbGVkKSAy
 MjQwNDM5ICAgICAgICA0DQpkcnd4ci14ci14ICAgIDIgcm9vdCAgICAgICAgICAgICB3aGVlbCAg
 ICAgICAgICAgICAgICAxMDI0IERlYyAxOCAxNzo0MQ0KdXNyL2xvY2FsL2luY2x1ZGUvcHJvZnRw
 ZA0KDQpbMV0NCmh0dHA6Ly9taXdpYm94Lm9yZy90Yi9pbmRleC5waHA/YWN0aW9uPWRlc2NyaWJl
 X3BvcnQmaWQ9MTEzOQ0KDQoNCi0gLSBNYXJ0aW4NCg0KDQotIC0tIA0KTWFydGluIFdpbGtlCQl8
 IGlyYy51bml4ZnJldW5kZS5kZSAjYnNkIA0KbWl3aUBGcmVlQlNELm9yZwl8IG1pd2lAdW5peGZy
 ZXVuZGUuZGUNCkZyZWVCU0QgQ29tbWl0dGVyCXwgUG93ZXIgdG8gU2VydmUNCi0tLS0tQkVHSU4g
 UEdQIFNJR05BVFVSRS0tLS0tDQpWZXJzaW9uOiBHbnVQRyB2MS40LjUgKEZyZWVCU0QpDQoNCmlE
 OERCUUZGaHRwbFByQ0lGcGpXWml3UkFxNEVBSjlNeVhDL2sxMHFQMTQ0VEJjQ2h1R0o5bmwwVmdD
 Z3pidTINCkVRZHlZVGlJc0ZoQWFEMmRib3pCWk9VPQ0KPUljcjcNCi0tLS0tRU5EIFBHUCBTSUdO
 QVRVUkUtLS0tLQ0K
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Thu Dec 21 22:13:35 UTC 2006 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106821 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/106821: commit references a PR
Date: Thu, 21 Dec 2006 22:14:23 +0000 (UTC)

 miwi        2006-12-21 22:13:41 UTC
 
   FreeBSD ports repository
 
   Modified files:
     ftp/proftpd          Makefile distinfo pkg-plist 
     ftp/proftpd/files    extra_patch-ldap-tls-mod_ldap.c 
                          patch-contrib::mod_sql_mysql.c 
   Added files:
     ftp/proftpd/files    patch-utf8.c 
   Removed files:
     ftp/proftpd/files    extra_patch-configure.in patch-main.c 
                          patch-mod_tls.c patch-support.c 
   Log:
   - Update to 1.3.1-rc1
   
   PR:             ports/106821
   Submitted by:   Beech Rintoul <beech@alaskaparadise.com> (maintainer)
   
   Revision  Changes    Path
   1.94      +50 -8     ports/ftp/proftpd/Makefile
   1.36      +3 -3      ports/ftp/proftpd/distinfo
   1.2       +0 -37     ports/ftp/proftpd/files/extra_patch-configure.in (dead)
   1.2       +7 -4      ports/ftp/proftpd/files/extra_patch-ldap-tls-mod_ldap.c
   1.2       +7 -7      ports/ftp/proftpd/files/patch-contrib::mod_sql_mysql.c
   1.3       +0 -46     ports/ftp/proftpd/files/patch-main.c (dead)
   1.2       +0 -38     ports/ftp/proftpd/files/patch-mod_tls.c (dead)
   1.2       +0 -79     ports/ftp/proftpd/files/patch-support.c (dead)
   1.1       +110 -0    ports/ftp/proftpd/files/patch-utf8.c (new)
   1.14      +54 -3     ports/ftp/proftpd/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
