[Midnightbsd-cvs] mports: ftp/proftpd: update to 1.3.2.r2.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Tue Sep 30 11:16:54 EDT 2008
Log Message:
-----------
update to 1.3.2.r2. This version was released on September 17 which is before the public disclosure of a fix for the recent CVE on proftpd. It is unclear if this version includes the fix.
Modified Files:
--------------
mports/ftp/proftpd:
Makefile (r1.2 -> r1.3)
distinfo (r1.2 -> r1.3)
pkg-plist (r1.2 -> r1.3)
mports/ftp/proftpd/files:
patch-sample-configurations_basic.conf (r1.2 -> r1.3)
Removed Files:
-------------
mports/ftp/proftpd/files:
extra-patch-cyrillic-fix-netio.c
extra-patch-mod-codeconv
extra_patch-ldap-tls-mod_ldap.c
patch-contrib-mod_wrap2-Makefile.in
patch-module::mod_auth_pam.c
patch-src-auth.c
-------------- next part --------------
Index: pkg-plist
===================================================================
RCS file: /home/cvs/mports/ftp/proftpd/pkg-plist,v
retrieving revision 1.2
retrieving revision 1.3
diff -L ftp/proftpd/pkg-plist -L ftp/proftpd/pkg-plist -u -r1.2 -r1.3
--- ftp/proftpd/pkg-plist
+++ ftp/proftpd/pkg-plist
@@ -2,6 +2,10 @@
bin/ftpdctl
bin/ftptop
bin/ftpwho
+bin/prxs
+ at unexec if cmp -s %D/etc/proftpd.conf %D/etc/proftpd.conf.sample; then rm -f %D/etc/proftpd.conf; fi
+etc/proftpd.conf.sample
+ at exec cp -n %D/%F %B/proftpd.conf
include/proftpd/auth.h
include/proftpd/bindings.h
include/proftpd/buildstamp.h
@@ -15,18 +19,20 @@
include/proftpd/default_paths.h
include/proftpd/dirtree.h
include/proftpd/display.h
+include/proftpd/encode.h
include/proftpd/env.h
include/proftpd/event.h
+include/proftpd/expr.h
include/proftpd/feat.h
include/proftpd/fsio.h
include/proftpd/ftp.h
include/proftpd/glibc-glob.h
include/proftpd/help.h
-include/proftpd/ident.h
include/proftpd/inet.h
include/proftpd/libsupp.h
include/proftpd/log.h
include/proftpd/mkhome.h
+%%CLAMAV%%include/proftpd/mod_clamav.h
include/proftpd/mod_ctrls.h
include/proftpd/modules.h
include/proftpd/netacl.h
@@ -44,18 +50,18 @@
include/proftpd/response.h
include/proftpd/scoreboard.h
include/proftpd/sets.h
+include/proftpd/str.h
include/proftpd/support.h
include/proftpd/table.h
+include/proftpd/throttle.h
include/proftpd/timers.h
include/proftpd/trace.h
-include/proftpd/utf8.h
include/proftpd/var.h
include/proftpd/version.h
include/proftpd/xferlog.h
+libdata/pkgconfig/proftpd.pc
sbin/ftpshut
sbin/in.proftpd
sbin/proftpd
- at unexec if cmp -s %D/etc/proftpd.conf %D/etc/proftpd.conf.sample; then rm -f %D/etc/proftpd.conf; fi
-etc/proftpd.conf.sample
- at exec cp -n %D/%F %B/proftpd.conf
@dirrm include/proftpd
+ at dirrmtry lib/proftpd
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/ftp/proftpd/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -L ftp/proftpd/Makefile -L ftp/proftpd/Makefile -u -r1.2 -r1.3
--- ftp/proftpd/Makefile
+++ ftp/proftpd/Makefile
@@ -7,7 +7,7 @@
#
PORTNAME= proftpd
-DISTVERSION= 1.3.1
+DISTVERSION= 1.3.2rc2
CATEGORIES= ftp
MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
ftp://ftp.fastorama.com/mirrors/ftp.proftpd.org/distrib/source/ \
@@ -16,8 +16,12 @@
ftp://proftpd.networkedsystems.co.uk/distrib/source/ \
http://mirrors.ibiblio.org/pub/mirrors/proftpd/distrib/source/ \
http://www.mirrorservice.org/sites/ftp.proftpd.org/distrib/source/ \
- CENKES:clam
+ http://www.alaskaparadise.com/freebsd/:clam \
+ http://www.smartftp.com/oss/proftpd/:digest \
+ LOCAL/beech:clam \
+ LOCAL/beech:digest
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER?= ports at MidnightBSD.org
COMMENT?= Highly configurable ftp daemon
@@ -31,7 +35,10 @@
PORTDOCScontrib=mod_ifsession.html mod_radius.html mod_rewrite.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}
+PORTDOCSreadme= README README.DSO README.FreeBSD README.IPv6 README.LDAP README.PAM \
+ README.capabilities README.classes README.facl README.modules \
+ README.ports RELEASE_NOTES
+PORTDOCS= ${PORTDOCSdoc} ${PORTDOCScontrib} ${PORTDOCSreadme}
PORTEXAMPLES= ASCII.html CreateHome.html Filters.html SQL.html Umask.html \
AuthFiles.html DNS.html Globbing.html SSH.html Upgrade.html \
@@ -44,38 +51,36 @@
USE_GMAKE= yes
USE_BZIP2= yes
-USE_AUTOTOOLS= autoconf:261
+USE_AUTOTOOLS= autoconf:262
GNU_CONFIGURE= yes
USE_RC_SUBR= proftpd.sh
-CONFIGURE_ARGS= --localstatedir=/var/run \
+CONFIGURE_ARGS= --with-pkgconfig=libdata/pkgconfig \
+ --localstatedir=/var/run \
--sysconfdir=${PREFIX}/etc \
- --enable-builtin-getnameinfo \
--disable-sendfile
-
-OPTIONS= IPV6 "Use IPv6" off \
+OPTIONS= BAN "Include mod_ban (Requires CTRLS)" off \
+ CLAMAV "Include mod_clamav" off \
+ CTRLS "Include controls" off \
+ DIGEST "Include mod_digest" off \
+ IFSESSION "Include mod_ifsession" on \
+ IPV6 "Use IPv6" off \
LDAP "Use LDAP" off \
LDAP_TLS "Use LDAP TLS (Requires LDAP, OPENSSL)" off\
- MYSQL "Use MySQL" off \
- PGSQL "Use Postgres" off \
+ MYSQL "MySQL auth (Can be combined with PGSQL)" off \
+ NLS "Use nls (builds mod_lang)" off \
OPENSSL "Include mod_tls" on \
+ PGSQL "Postgres auth (Can be combined with MYSQL)" off \
QUOTA "Include mod_quota" off \
- IFSESSION "Include mod_ifsession" on \
- README "Include mod_readme" on \
+ QUOTATAB_RADIUS "include mod_quotatab_radius" off \
+ RADIUS "Include mod_radius" on \
RATIO "Include mod_ratio" on \
- CTRLS "Include controls" off \
+ README "Include mod_readme" on \
REWRITE "Include mod_rewrite" on \
WRAP "Include mod_wrap2" on \
WRAP_FILE "Include mod_wrap2_file" off \
- WRAP_SQL "Include mod_wrap2_sql" off \
- RADIUS "Include mod_radius" on \
- QUOTATAB_RADIUS "include mod_quotatab_radius" off \
- BAN "Include mod_ban (Requires CTRLS)" off \
- NLS "Use nls (builds mod_lang)" off \
- CYRFIX "Patch to fix cyrillic encoding" off \
- CLAMAV "Include mod_clamav " off
-
+ WRAP_SQL "Include mod_wrap2_sql" off
MODULES?=
LIBDIRS?=
INCLUDEDIRS?=
@@ -149,10 +154,6 @@
PROFTPD_LIBS+= -lintl -L${LOCALBASE}/lib
.endif
-.if defined (WITH_CYRFIX)
-EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-cyrillic-fix-netio.c
-.endif
-
#allow user to override
MODULES?= mod_ratio:mod_readme:mod_rewrite:mod_wrap2:mod_ifsession
@@ -186,9 +187,9 @@
.endif
.if defined(WITH_OPENSSL)
-CFLAGS+= -DHAVE_OPENSSL
.include <${PORTSDIR}/Mk/bsd.openssl.mk>
-PROFTPD_LIBS+= -lssl -lcrypto -L${LOCALBASE}/lib
+CFLAGS+= -DHAVE_OPENSSL -I${OPENSSLINC}
+PROFTPD_LIBS+= -lssl -lcrypto -L${OPENSSLLIB}
MODULES:=${MODULES}:mod_tls
.endif
@@ -212,13 +213,23 @@
.endif
.if defined(WITH_CLAMAV)
-#http://www.uglyboxindustries.com/mod_clamav_new.c
-DISTFILES+= mod_clamav-0.5.tar.bz2:clam
+#http://www.thrallingpenguin.com/resources/mod_clamav-0.10.tar.bz2
+DISTFILES+= mod_clamav-0.10.tar.bz2:clam
+EXTRACT_ONLY+= mod_clamav-0.10.tar.bz2
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-modules_mod_xfer.c
USE_CLAMAV= yes
MODULES:=${MODULES}:mod_clamav
-LIB_DEPENDS+= clamav.2:${PORTSDIR}/security/clamav
+LIB_DEPENDS+= clamav.5:${PORTSDIR}/security/clamav
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
+PLIST_SUB= CLAMAV=""
+.else
+PLIST_SUB= CLAMAV="@comment "
+.endif
+
+.if defined(WITH_DIGEST)
+DISTFILES+= mod_digest.c:digest
+MODULES:=${MODULES}:mod_digest
.endif
# mod_ifsession should be the last item in the modules list
@@ -245,7 +256,10 @@
post-extract:
.if defined(WITH_CLAMAV)
- @${MV} ${WRKDIR}/mod_clamav_new.c ${WRKSRC}/modules/mod_clamav.c
+ @${CP} ${WRKDIR}/mod_clamav-0.10/mod_clamav.* ${WRKSRC}/contrib
+.endif
+.if defined(WITH_DIGEST)
+ @${CP} ${DISTDIR}/${DIST_SUBDIR}/mod_digest.c ${WRKSRC}/modules/
.endif
post-patch:
@@ -274,6 +288,7 @@
@${INSTALL} -d ${DOCSDIR}/
@cd ${WRKSRC}/doc/ && ${INSTALL_DATA} ${PORTDOCSdoc} ${DOCSDIR}/
@cd ${WRKSRC}/doc/contrib && ${INSTALL_DATA} ${PORTDOCScontrib} ${DOCSDIR}/
+ @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCSreadme} ${DOCSDIR}/
.endif
.if !defined(NOPORTEXAMPLES)
@${INSTALL} -d ${EXAMPLESDIR}/
Index: distinfo
===================================================================
RCS file: /home/cvs/mports/ftp/proftpd/distinfo,v
retrieving revision 1.2
retrieving revision 1.3
diff -L ftp/proftpd/distinfo -L ftp/proftpd/distinfo -u -r1.2 -r1.3
--- ftp/proftpd/distinfo
+++ ftp/proftpd/distinfo
@@ -1,3 +1,15 @@
-MD5 (proftpd-1.3.1.tar.bz2) = 175958df8de92d5209b7b1e2e23a5a28
-SHA256 (proftpd-1.3.1.tar.bz2) = 03bc023e5b7b1c04d8eb2d5dca53b931b3e02cc7aba7dd8f629b0878535dc91b
-SIZE (proftpd-1.3.1.tar.bz2) = 2243888
+MD5 (proftpd-1.3.2rc2.tar.bz2) = c8b32ffb8febc33c5897165f0d61a475
+SHA256 (proftpd-1.3.2rc2.tar.bz2) = 1fb46b8b0d1ac11ed80a3106e261e15fd4c0b3bc83c198ab9620a852d31f96b7
+SIZE (proftpd-1.3.2rc2.tar.bz2) = 2356053
+MD5 (mod_clamav-0.10.tar.bz2) = 7150cde88f6c692711c007f6312bd495
+SHA256 (mod_clamav-0.10.tar.bz2) = 4f6d09979514a8b3f120890753dcf7c6247dfce0aa09d340edf8a359b031a1f4
+SIZE (mod_clamav-0.10.tar.bz2) = 5435
+MD5 (mod_digest.c) = e706e66fa4d82cf7875a1a5d6767fe00
+SHA256 (mod_digest.c) = 18174e3d3c1d61367d78c228e6510b0a21c11458f389630df281bb84d467d399
+SIZE (mod_digest.c) = 39073
+MD5 (mod_comb-0.1.tar.bz2) = 99ee47c8b5147196c9a2faa4596eaae7
+SHA256 (mod_comb-0.1.tar.bz2) = 05786083c05cb3e53e3ff723b1ca2036af68d5cd9ebb26d2ae1e8009e05b77f1
+SIZE (mod_comb-0.1.tar.bz2) = 11617
+MD5 (mod_sql_tds-4.5.tar.bz2) = 6fe1feac62f483c2e536d0e3a0abe619
+SHA256 (mod_sql_tds-4.5.tar.bz2) = 4b225c2e945a2587cbb46161a263a8e40922da7bd6beb3fdb76c01aaaac705f5
+SIZE (mod_sql_tds-4.5.tar.bz2) = 10923
--- ftp/proftpd/files/patch-src-auth.c
+++ /dev/null
@@ -1,43 +0,0 @@
-ndex: src/auth.c
-===================================================================
-RCS file: /cvsroot/proftp/proftpd/src/auth.c,v
-retrieving revision 1.52
-diff -u -r1.52 auth.c
---- src/auth.c 5 Oct 2007 17:04:13 -0000 1.52
-+++ src/auth.c 8 Oct 2007 18:44:21 -0000
-@@ -503,6 +503,17 @@
- return res;
- }
-
-+ if (MODRET_ISERROR(mr)) {
-+ res = MODRET_ERROR(mr);
-+
-+ if (cmd->tmp_pool) {
-+ destroy_pool(cmd->tmp_pool);
-+ cmd->tmp_pool = NULL;
-+ }
-+
-+ return res;
-+ }
-+
- m = NULL;
- }
-
-@@ -566,6 +577,17 @@
- return res;
- }
-
-+ if (MODRET_ISERROR(mr)) {
-+ res = MODRET_ERROR(mr);
-+
-+ if (cmd->tmp_pool) {
-+ destroy_pool(cmd->tmp_pool);
-+ cmd->tmp_pool = NULL;
-+ }
-+
-+ return res;
-+ }
-+
- m = NULL;
- }
-
--- ftp/proftpd/files/extra_patch-ldap-tls-mod_ldap.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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 */
-
- /*
- * If you have to edit anything below this line, it's a bug. Report it
--- ftp/proftpd/files/extra-patch-mod-codeconv
+++ /dev/null
@@ -1,426 +0,0 @@
-diff -urN ./modules/mod_codeconv.c .-iconv/modules/mod_codeconv.c
---- ./modules/mod_codeconv.c 1970-01-01 09:00:00.000000000 +0900
-+++ .-iconv/modules/mod_codeconv.c 2004-09-25 21:44:05.000000000 +0900
-@@ -0,0 +1,229 @@
-+/*
-+ * ProFTPD: mod_codeconv -- local <-> remote charset conversion
-+ *
-+ * Copyright (c) 2004 by TSUJIKAWA Tohru <tsujikawa at tsg.ne.jp> / All rights reserved.
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ */
-+
-+
-+#include "conf.h"
-+#include <iconv.h>
-+
-+
-+//
-+// directive
-+//
-+#define DIRECTIVE_CHARSETLOCAL "CharsetLocal"
-+#define DIRECTIVE_CHARSETREMOTE "CharsetRemote"
-+
-+
-+//
-+// initialization
-+//
-+static int codeconv_init(void)
-+{
-+ return 0;
-+}
-+
-+static int codeconv_sess_init(void)
-+{
-+ return 0;
-+}
-+
-+
-+char* remote2local(struct pool* pool, char* remote)
-+{
-+ iconv_t ic;
-+ char* local;
-+ char* in_ptr;
-+ char* out_ptr;
-+ size_t inbytesleft, outbytesleft;
-+
-+ config_rec* conf_l = NULL;
-+ config_rec* conf_r = NULL;
-+
-+ conf_l = find_config(main_server->conf, CONF_PARAM, DIRECTIVE_CHARSETLOCAL, FALSE);
-+ conf_r = find_config(main_server->conf, CONF_PARAM, DIRECTIVE_CHARSETREMOTE, FALSE);
-+ if (!conf_l || !conf_r) return NULL;
-+
-+ ic = iconv_open(conf_l->argv[0], conf_r->argv[0]);
-+ if (ic == (iconv_t)(-1)) return NULL;
-+
-+ iconv(ic, NULL, NULL, NULL, NULL);
-+
-+ inbytesleft = strlen(remote);
-+ outbytesleft = inbytesleft*3;
-+ local = palloc(pool, outbytesleft+1);
-+
-+ in_ptr = remote; out_ptr = local;
-+ while (inbytesleft) {
-+ if (iconv(ic, &in_ptr, &inbytesleft, &out_ptr, &outbytesleft) == -1) {
-+ *out_ptr = '?'; out_ptr++; outbytesleft--;
-+ in_ptr++; inbytesleft--;
-+ break;
-+ }
-+ }
-+ *out_ptr = 0;
-+
-+ iconv_close(ic);
-+
-+ return local;
-+}
-+
-+
-+char* local2remote(char* local)
-+{
-+ iconv_t ic;
-+ char* remote;
-+ char* in_ptr;
-+ char* out_ptr;
-+ size_t inbytesleft, outbytesleft;
-+
-+ config_rec* conf_l = NULL;
-+ config_rec* conf_r = NULL;
-+
-+ conf_l = find_config(main_server->conf, CONF_PARAM, DIRECTIVE_CHARSETLOCAL, FALSE);
-+ conf_r = find_config(main_server->conf, CONF_PARAM, DIRECTIVE_CHARSETREMOTE, FALSE);
-+ if (!conf_l || !conf_r) return NULL;
-+
-+ ic = iconv_open(conf_r->argv[0], conf_l->argv[0]);
-+ if (ic == (iconv_t)(-1)) return NULL;
-+
-+ iconv(ic, NULL, NULL, NULL, NULL);
-+
-+ inbytesleft = strlen(local);
-+ outbytesleft = inbytesleft*3;
-+ remote = malloc(outbytesleft+1);
-+
-+ in_ptr = local; out_ptr = remote;
-+ while (inbytesleft) {
-+ if (iconv(ic, &in_ptr, &inbytesleft, &out_ptr, &outbytesleft) == -1) {
-+ *out_ptr = '?'; out_ptr++; outbytesleft--;
-+ in_ptr++; inbytesleft--;
-+ break;
-+ }
-+ }
-+ *out_ptr = 0;
-+
-+ iconv_close(ic);
-+
-+ return remote;
-+}
-+
-+
-+//
-+// module handler
-+//
-+MODRET codeconv_pre_any(cmd_rec* cmd)
-+{
-+ char* p;
-+ int i;
-+
-+ p = remote2local(cmd->pool, cmd->arg);
-+ if (p) cmd->arg = p;
-+
-+ for (i = 0; i < cmd->argc; i++) {
-+ p = remote2local(cmd->pool, cmd->argv[i]);
-+ if (p) cmd->argv[i] = p;
-+ }
-+
-+ return DECLINED(cmd);
-+}
-+
-+
-+//
-+// local charset directive "CharsetLocal"
-+//
-+MODRET set_charsetlocal(cmd_rec *cmd) {
-+ config_rec *c = NULL;
-+
-+ /* Syntax: CharsetLocal iconv-charset-name */
-+
-+ CHECK_ARGS(cmd, 1);
-+ CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL);
-+
-+ c = add_config_param_str(DIRECTIVE_CHARSETLOCAL, 1, cmd->argv[1]);
-+
-+ return HANDLED(cmd);
-+}
-+
-+//
-+// remote charset directive "CharsetRemote"
-+//
-+MODRET set_charsetremote(cmd_rec *cmd) {
-+ config_rec *c = NULL;
-+
-+ /* Syntax: CharsetRemote iconv-charset-name */
-+
-+ CHECK_ARGS(cmd, 1);
-+ CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL);
-+
-+ c = add_config_param_str(DIRECTIVE_CHARSETREMOTE, 1, cmd->argv[1]);
-+
-+ return HANDLED(cmd);
-+}
-+
-+
-+//
-+// module ═╤ directive
-+//
-+static conftable codeconv_conftab[] = {
-+ { DIRECTIVE_CHARSETLOCAL, set_charsetlocal, NULL },
-+ { DIRECTIVE_CHARSETREMOTE, set_charsetremote, NULL },
-+ { NULL, NULL, NULL }
-+};
-+
-+
-+//
-+// trap д╣дые│е▐еєе╔░ь═ў
-+//
-+static cmdtable codeconv_cmdtab[] = {
-+ { PRE_CMD, C_ANY, G_NONE, codeconv_pre_any, FALSE, FALSE },
-+ { 0, NULL }
-+};
-+
-+
-+//
-+// module ╛Ё╩є
-+//
-+module codeconv_module = {
-+
-+ /* Always NULL */
-+ NULL, NULL,
-+
-+ /* Module API version (2.0) */
-+ 0x20,
-+
-+ /* Module name */
-+ "codeconv",
-+
-+ /* Module configuration directive handlers */
-+ codeconv_conftab,
-+
-+ /* Module command handlers */
-+ codeconv_cmdtab,
-+
-+ /* Module authentication handlers (none in this case) */
-+ NULL,
-+
-+ /* Module initialization */
-+ codeconv_init,
-+
-+ /* Session initialization */
-+ codeconv_sess_init
-+
-+};
-diff -urN ./modules/mod_df.c .-iconv/modules/mod_df.c
---- ./modules/mod_df.c 1970-01-01 09:00:00.000000000 +0900
-+++ .-iconv/modules/mod_df.c 2004-09-25 21:43:57.000000000 +0900
-@@ -0,0 +1,127 @@
-+/*
-+ * ProFTPD: mod_df -- е╟еге╣еп╢їдн═╞╬╠─╠├╬ете╕ехб╝еы
-+ *
-+ * Copyright (c) 2002 by TSUJIKAWA Tohru <tsujikawa at tsg.ne.jp>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ */
-+
-+ /*
-+ **** for Linux only ****
-+
-+ CWD/CDUP е│е▐еєе╔д╬еъе╢еые╚д╟┼Ў│║е╟егеьепе╚еъд╟д╬е╟еге╣еп╢їдн═╞╬╠дЄ─╠├╬д╣дыете╕ехб╝еыд╟д╣бг
-+
-+ statfs() д╬╗┼══╛хбд64bit ═╤д╦е│еєе╤едеыд╖д╩дд╛ь╣чд╧ 2TB ░╩╛хд╬е╟еге╣епд╬╗■д╦
-+ └╡╛яд╩├═дЄ╩╓д╡д╩ддд│д╚дм┤№┬╘д╡дьд▐д╣бг
-+
-+ */
-+
-+
-+#include "conf.h"
-+#include <sys/vfs.h>
-+
-+
-+//
-+// ╜щ┤№▓╜
-+//
-+static int df_init(void)
-+{
-+ return 0;
-+}
-+
-+static int df_sess_init(void)
-+{
-+ return 0;
-+}
-+
-+
-+//
-+// module handler
-+//
-+MODRET df_post_cwd(cmd_rec* cmd)
-+{
-+ char buf[PATH_MAX+1];
-+ struct statfs sfs;
-+
-+ if (getcwd(buf, sizeof(buf)) && statfs(buf, &sfs) == 0) {
-+ long long f = (long long)sfs.f_bavail * (long long)sfs.f_bsize;
-+ if (f >= ((long long)1 << 10)*1000000000L) {
-+ sprintf(buf, "Disk free space at this directory is %lld,%03lld,%03lld MB.",
-+ (f >> 20)/1000000, (f >> 20)/1000%1000, (f >> 20)%1000);
-+ } else if (f >= ((long long)1 << 10)*1000000) {
-+ sprintf(buf, "Disk free space at this directory is %lld,%03lld,%03lld KB.",
-+ (f >> 10)/1000000, (f >> 10)/1000%1000, (f >> 10)%1000);
-+ } else if (f >= ((long long)1 << 10)*1000) {
-+ sprintf(buf, "DISK FREE SPACE AT THIS DIRECTORY IS ONLY %lld,%03lld KB.", (f >> 10)/1000, (f >> 10)%1000);
-+ } else if (f >= 1000) {
-+ sprintf(buf, "DISK FREE SPACE AT THIS DIRECTORY IS ONLY %lld,%03lld Bytes.", f/1000, f%1000);
-+ } else {
-+ sprintf(buf, "DISK FREE SPACE AT THIS DIRECTORY IS ONLY %lld Bytes.", f);
-+ }
-+ pr_response_send_raw("250-%s", buf);
-+ }
-+ return HANDLED(cmd);
-+}
-+
-+
-+//
-+// module ═╤ directive
-+//
-+static conftable df_conftab[] = {
-+ { NULL } // directive д╧е╡е▌б╝е╚д╖д╩дд
-+};
-+
-+
-+//
-+// trap д╣дые│е▐еєе╔░ь═ў
-+//
-+static cmdtable df_cmdtab[] = {
-+ { POST_CMD, C_CWD, G_NONE, df_post_cwd, FALSE, FALSE },
-+ { POST_CMD, C_CDUP, G_NONE, df_post_cwd, FALSE, FALSE },
-+ { 0, NULL }
-+};
-+
-+
-+//
-+// module ╛Ё╩є
-+//
-+module df_module = {
-+
-+ /* Always NULL */
-+ NULL, NULL,
-+
-+ /* Module API version (2.0) */
-+ 0x20,
-+
-+ /* Module name */
-+ "df",
-+
-+ /* Module configuration directive handlers */
-+ df_conftab,
-+
-+ /* Module command handlers */
-+ df_cmdtab,
-+
-+ /* Module authentication handlers (none in this case) */
-+ NULL,
-+
-+ /* Module initialization */
-+ df_init,
-+
-+ /* Session initialization */
-+ df_sess_init
-+
-+};
---- ./modules/mod_ls.c Sat Dec 16 01:25:31 2006
-+++ .-iconv/modules/mod_ls.c Tue Jan 23 15:43:20 2007
-@@ -244,12 +244,15 @@
- return res;
- }
-
-+extern char* local2remote(char*);
-+
- /* sendline() now has an internal buffer, to help speed up LIST output. */
- static int sendline(int flags, char *fmt, ...) {
- static char listbuf[PR_TUNABLE_BUFFER_SIZE] = {'\0'};
- va_list msg;
- char buf[PR_TUNABLE_BUFFER_SIZE+1] = {'\0'};
- int res = 0;
-+ char* buf2;
-
- if (flags & LS_SENDLINE_FL_FLUSH) {
- res = pr_data_xfer(listbuf, strlen(listbuf));
-@@ -268,6 +271,13 @@
-
- buf[sizeof(buf)-1] = '\0';
-
-+ if (buf[0]) {
-+ buf2 = local2remote(buf);
-+ if (buf2) {
-+ strcpy(buf, buf2); free(buf2);
-+ }
-+ }
-+
- /* If buf won't fit completely into listbuf, flush listbuf */
- if (strlen(buf) >= (sizeof(listbuf) - strlen(listbuf))) {
- res = pr_data_xfer(listbuf, strlen(listbuf));
-diff -urN ./src/netio.c .-iconv/src/netio.c
---- ./src/netio.c 2004-06-16 01:45:21.000000000 +0900
-+++ .-iconv/src/netio.c 2004-09-25 21:42:59.000000000 +0900
-@@ -467,9 +467,12 @@
- return -1;
- }
-
-+extern char* local2remote(char* local);
-+
- int pr_netio_printf(pr_netio_stream_t *nstrm, const char *fmt, ...) {
- va_list msg;
- char buf[PR_RESPONSE_BUFFER_SIZE] = {'\0'};
-+ char* p;
-
- if (!nstrm) {
- errno = EINVAL;
-@@ -481,6 +484,13 @@
- va_end(msg);
- buf[sizeof(buf)-1] = '\0';
-
-+ if (buf[0]) {
-+ p = local2remote(buf);
-+ if (p) {
-+ strcpy(buf, p); free(p);
-+ }
-+ }
-+
- return pr_netio_write(nstrm, buf, strlen(buf));
- }
-
--- ftp/proftpd/files/patch-module::mod_auth_pam.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./modules/mod_auth_pam.c.orig Thu Jan 2 13:25:20 2003
-+++ ./modules/mod_auth_pam.c Sat Mar 15 11:35:00 2003
-@@ -57,7 +57,7 @@
- #endif /* HAVE_PAM_PAM_APPL_H */
-
- static pam_handle_t * pamh = NULL;
--static char * pamconfig = "ftp";
-+static char * pamconfig = "ftpd";
- static char * pam_user = NULL;
- static char * pam_pass = NULL;
- static size_t pam_user_len = 0;
Index: patch-sample-configurations_basic.conf
===================================================================
RCS file: /home/cvs/mports/ftp/proftpd/files/patch-sample-configurations_basic.conf,v
retrieving revision 1.2
retrieving revision 1.3
diff -L ftp/proftpd/files/patch-sample-configurations_basic.conf -L ftp/proftpd/files/patch-sample-configurations_basic.conf -u -r1.2 -r1.3
--- ftp/proftpd/files/patch-sample-configurations_basic.conf
+++ ftp/proftpd/files/patch-sample-configurations_basic.conf
@@ -12,7 +12,7 @@
ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on
-+ScoreboardFile /var/run/proftpd.scoreboard
++ScoreboardFile /var/run/proftpd/proftpd.scoreboard
# Port 21 is the standard FTP port.
Port 21
--- ftp/proftpd/files/patch-contrib-mod_wrap2-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- contrib/mod_wrap2/Makefile.in.orig 2007-01-08 19:16:11.000000000 -0900
-+++ contrib/mod_wrap2/Makefile.in 2007-10-05 14:02:38.000000000 -0800
-@@ -13,7 +13,7 @@
- MODULE_NAME=mod_wrap2
-
- # Necessary redefinitions
--INCLUDES=-I. -I../.. -I../../include
-+INCLUDES=-I. -I../.. -I../../include -I/usr/local/include
- CPPFLAGS= -DHAVE_CONFIG_H $(DEFAULT_PATHS) $(PLATFORM) $(INCLUDES)
- LDFLAGS=-L../../lib
-
--- ftp/proftpd/files/extra-patch-cyrillic-fix-netio.c
+++ /dev/null
@@ -1,50 +0,0 @@
---- ./src/netio.c.orig Sun Oct 10 00:46:22 2004
-+++ ./src/netio.c Thu Oct 12 15:17:22 2006
-@@ -901,47 +901,6 @@
- cp = *pbuf->current++;
- pbuf->remaining++;
-
-- switch (mode) {
-- case IAC:
-- switch (cp) {
-- case WILL:
-- case WONT:
-- case DO:
-- case DONT:
-- mode = cp;
-- continue;
--
-- case IAC:
-- mode = 0;
-- break;
--
-- default:
-- /* Ignore */
-- mode = 0;
-- continue;
-- }
-- break;
--
-- case WILL:
-- case WONT:
-- pr_netio_printf(out_nstrm, "%c%c%c", IAC, DONT, cp);
-- mode = 0;
-- continue;
--
-- case DO:
-- case DONT:
-- pr_netio_printf(out_nstrm, "%c%c%c", IAC, WONT, cp);
-- mode = 0;
-- continue;
--
-- default:
-- if (cp == IAC) {
-- mode = cp;
-- continue;
-- }
-- break;
-- }
--
- *bp++ = cp;
- buflen--;
- }
More information about the Midnightbsd-cvs
mailing list