head	1.8;
access;
symbols
	RELEASE_7_1_0:1.7
	RELEASE_6_4_0:1.7
	RELEASE_5_EOL:1.7
	old_PRE_XORG_7:1.1;
locks; strict;
comment	@# @;


1.8
date	2008.09.23.03.12.28;	author beech;	state dead;
branches;
next	1.7;

1.7
date	2008.04.18.04.03.11;	author beech;	state Exp;
branches;
next	1.6;

1.6
date	2008.04.18.03.31.17;	author beech;	state Exp;
branches;
next	1.5;

1.5
date	2008.04.02.01.15.47;	author beech;	state Exp;
branches;
next	1.4;

1.4
date	2008.03.27.19.36.11;	author beech;	state Exp;
branches;
next	1.3;

1.3
date	2007.07.18.21.09.14;	author beech;	state dead;
branches;
next	1.2;

1.2
date	2007.07.12.07.19.11;	author beech;	state Exp;
branches;
next	1.1;

1.1
date	2007.02.27.07.39.18;	author miwi;	state Exp;
branches;
next	;


desc
@@


1.8
log
@- Update to 1.3.20080920
- Remove mod_codeconv (no longer current)
- Add mod_clamav
@
text
@diff -r -u -P modules/mod_codeconv.c modules/mod_codeconv.c
--- modules/mod_codeconv.c	1970-01-01 03:00:00.000000000 +0300
+++ modules/mod_codeconv.c	2008-03-24 02:55:39.000000000 +0300
@@@@ -0,0 +1,231 @@@@
+/*
+ * ProFTPD: mod_codeconv -- local <-> remote charset conversion
+ *
+ * Copyright (c) 2004 by TSUJIKAWA Tohru <tsujikawa@@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 = remote != NULL ? strlen(remote) : 0;
+	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 = local != NULL ? strlen(local) : 0;
+	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 -r -u -P modules/mod_ls.c modules/mod_ls.c
--- modules/mod_ls.c	2007-09-28 04:53:59.000000000 +0400
+++ modules/mod_ls.c	2008-03-24 02:55:39.000000000 +0300
@@@@ -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) {
     size_t listbuflen = strlen(listbuf);
@@@@ -274,6 +277,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 -r -u -P src/netio.c src/netio.c
--- src/netio.c	2007-08-22 18:50:23.000000000 +0400
+++ src/netio.c	2008-03-24 02:55:39.000000000 +0300
@@@@ -547,9 +547,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;
@@@@ -561,6 +564,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));
 }
@


1.7
log
@- Update to 1.3.2.r1

- 1.3.2rc1 release includes major new features and numerous bugfixes,
  including:

  + Support for the MLST and MLSD commands (RFC3659)
  + New modules: mod_sql_odbc, mod_sql_sqlite, mod_unique_id
  + New configuration directives: MaxTransferPerHost, MaxTransfersPerUser
  + New translations: Italian
  + Better handling of aborted data transfers
  + Support for FIPS and OCSP in mod_tls
  + New documentation: doc/howto/ConfigurationTrick

  Please read the included NEWS, RELEASE_NOTES, and ChangeLog files for
  the full details.
@
text
@@


1.6
log
@- Forced commit after repocopy, files
@
text
@a298 48
 
@@@@ -954,46 +964,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--;
@


1.5
log
@- Remove cyrillic-fix-netio.c (handled by CODECONV)
- Bump portrevision

PR:		ports/122355
Submitted by:	Alex Keda <admin@@lissyara.su>
@
text
@@


1.4
log
@- Re-add OPTIONS CODECONV (mod_codeconv) with v1.3.1 fixes for international users
- Bump portrevision

Submitted by:	Alexey V. Drozdov <nyquist@@ctam.tu-bryansk.ru>
@
text
@d236 1
a236 131
diff -r -u -P modules/mod_df.c modules/mod_df.c
--- modules/mod_df.c	1970-01-01 03:00:00.000000000 +0300
+++ modules/mod_df.c	2008-03-24 02:55:39.000000000 +0300
@@@@ -0,0 +1,127 @@@@
+/*
+ * ProFTPD: mod_df -- ¥Ç¥£¥¹¥¯¶õ¤­ÍÆÎÌÄÌÃÎ¥â¥¸¥å¡¼¥ë
+ *
+ * Copyright (c) 2002 by TSUJIKAWA Tohru <tsujikawa@@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
+
+};
@


1.3
log
@- Remove mod_codeconv
- Patch reviewed upstream. Not compatible with 1.3.1rc3. Duplicates and
  conflicts with utf8 functionality

PR:		ports/114502
Approved by:	sat (mentor)
@
text
@d1 4
a4 4
diff -urN ./modules/mod_codeconv.c .-iconv/modules/mod_codeconv.c
--- ./modules/mod_codeconv.c    1970-01-01 09:00:00.000000000 +0900
+++ modules/mod_codeconv.c      2004-09-25 21:44:05.000000000 +0900
@@@@ -0,0 +1,229 @@@@
d27 2
a28 2
+#include       "conf.h"
+#include       <iconv.h>
d34 2
a35 2
+#define        DIRECTIVE_CHARSETLOCAL          "CharsetLocal"
+#define        DIRECTIVE_CHARSETREMOTE         "CharsetRemote"
d43 1
a43 1
+       return 0;
d48 1
a48 1
+       return 0;
d54 32
a85 31
+       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;
d87 1
a87 1
+       iconv_close(ic);
d89 1
a89 1
+       return local;
d95 32
a126 31
+       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;
d128 1
a128 1
+       iconv_close(ic);
d130 1
a130 1
+       return remote;
d139 2
a140 2
+       char*   p;
+       int             i;
d142 2
a143 2
+       p = remote2local(cmd->pool, cmd->arg);
+       if (p) cmd->arg = p;
d145 4
a148 4
+       for (i = 0; i < cmd->argc; i++) {
+               p = remote2local(cmd->pool, cmd->argv[i]);
+               if (p) cmd->argv[i] = p;
+       }
d150 1
a150 1
+       return DECLINED(cmd);
d188 1
a188 1
+// module &#9552;&#9572; directive
d191 3
a193 3
+       { DIRECTIVE_CHARSETLOCAL,               set_charsetlocal,               NULL },
+       { DIRECTIVE_CHARSETREMOTE,              set_charsetremote,              NULL },
+       { NULL, NULL, NULL }
d198 1
a198 1
+// trap &#1076;&#9571;&#1076;&#1099;&#1077;&#9474;&#1077;&#9616;&#1077;&#1108;&#1077;&#9556;&#9617;&#1100;&#9552;&#1118;
d201 2
a202 2
+       { PRE_CMD,              C_ANY,  G_NONE, codeconv_pre_any,       FALSE, FALSE },
+       { 0,                    NULL }
d207 1
a207 1
+// module &#9563;&#1025;&#9577;&#1108;
d211 2
a212 2
+       /* Always NULL */
+       NULL, NULL,
d214 2
a215 2
+       /* Module API version (2.0) */
+       0x20,
d217 2
a218 2
+       /* Module name */
+       "codeconv",
d220 2
a221 2
+       /* Module configuration directive handlers */
+       codeconv_conftab,
d223 2
a224 2
+       /* Module command handlers */
+       codeconv_cmdtab,
d226 2
a227 2
+       /* Module authentication handlers (none in this case) */
+       NULL,
d229 2
a230 2
+       /* Module initialization */
+       codeconv_init,
d232 2
a233 2
+       /* Session initialization */
+       codeconv_sess_init
d236 3
a238 3
diff -urN ./modules/mod_df.c .-iconv/modules/mod_df.c
--- ./modules/mod_df.c  1970-01-01 09:00:00.000000000 +0900
+++ modules/mod_df.c    2004-09-25 21:43:57.000000000 +0900
d241 1
a241 1
+ * ProFTPD: mod_df -- &#1077;&#9567;&#1077;&#1075;&#1077;&#9571;&#1077;&#1087;&#9570;&#1111;&#1076;&#1085;&#9552;&#9566;&#9580;&#9568;&#9472;&#9568;&#9500;&#9580;&#1077;&#1090;&#1077;&#9557;&#1077;&#1093;&#1073;&#9565;&#1077;&#1099;
d264 1
a264 1
+   CWD/CDUP &#1077;&#9474;&#1077;&#9616;&#1077;&#1108;&#1077;&#9556;&#1076;&#9580;&#1077;&#1098;&#1077;&#9570;&#1077;&#1099;&#1077;&#9562;&#1076;&#9567;&#9532;&#1038;&#9474;&#9553;&#1077;&#9567;&#1077;&#1075;&#1077;&#1100;&#1077;&#1087;&#1077;&#9562;&#1077;&#1098;&#1076;&#9567;&#1076;&#9580;&#1077;&#9567;&#1077;&#1075;&#1077;&#9571;&#1077;&#1087;&#9570;&#1111;&#1076;&#1085;&#9552;&#9566;&#9580;&#9568;&#1076;&#1028;&#9472;&#9568;&#9500;&#9580;&#1076;&#9571;&#1076;&#1099;&#1077;&#1090;&#1077;&#9557;&#1077;&#1093;&#1073;&#9565;&#1077;&#1099;&#1076;&#9567;&#1076;&#9571;&#1073;&#1075;
d266 2
a267 2
+   statfs() &#1076;&#9580;&#9559;&#9532;&#9552;&#9552;&#9563;&#1093;&#1073;&#1076;64bit &#9552;&#9572;&#1076;&#9574;&#1077;&#9474;&#1077;&#1108;&#1077;&#9572;&#1077;&#1076;&#1077;&#1099;&#1076;&#9558;&#1076;&#9577;&#1076;&#1076;&#9563;&#1100;&#9571;&#1095;&#1076;&#9575; 2TB &#9617;&#9577;&#9563;&#1093;&#1076;&#9580;&#1077;&#9567;&#1077;&#1075;&#1077;&#9571;&#1077;&#1087;&#1076;&#9580;&#9559;&#9632;&#1076;&#9574;
+   &#9492;&#9569;&#9563;&#1103;&#1076;&#9577;&#9500;&#9552;&#1076;&#1028;&#9577;&#9555;&#1076;&#9569;&#1076;&#9577;&#1076;&#1076;&#1076;&#9474;&#1076;&#9562;&#1076;&#1084;&#9508;&#8470;&#9516;&#9560;&#1076;&#9569;&#1076;&#1100;&#1076;&#9616;&#1076;&#9571;&#1073;&#1075;
d272 2
a273 2
+#include       "conf.h"
+#include       <sys/vfs.h>
d277 1
a277 1
+// &#9564;&#1097;&#9508;&#8470;&#9619;&#9564;
d281 1
a281 1
+       return 0;
d286 1
a286 1
+       return 0;
d295 2
a296 2
+       char    buf[PATH_MAX+1];
+       struct statfs   sfs;
d298 18
a315 18
+       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);
d320 1
a320 1
+// module &#9552;&#9572; directive
d323 1
a323 1
+       { NULL }                                                // directive &#1076;&#9575;&#1077;&#9569;&#1077;&#9612;&#1073;&#9565;&#1077;&#9562;&#1076;&#9558;&#1076;&#9577;&#1076;&#1076;
d328 1
a328 1
+// trap &#1076;&#9571;&#1076;&#1099;&#1077;&#9474;&#1077;&#9616;&#1077;&#1108;&#1077;&#9556;&#9617;&#1100;&#9552;&#1118;
d331 3
a333 3
+       { POST_CMD,             C_CWD,  G_NONE, df_post_cwd,    FALSE, FALSE },
+       { POST_CMD,             C_CDUP, G_NONE, df_post_cwd,    FALSE, FALSE },
+       { 0,                    NULL }
d338 1
a338 1
+// module &#9563;&#1025;&#9577;&#1108;
d342 2
a343 2
+       /* Always NULL */
+       NULL, NULL,
d345 2
a346 2
+       /* Module API version (2.0) */
+       0x20,
d348 2
a349 2
+       /* Module name */
+       "df",
d351 2
a352 2
+       /* Module configuration directive handlers */
+       df_conftab,
d354 2
a355 2
+       /* Module command handlers */
+       df_cmdtab,
d357 2
a358 2
+       /* Module authentication handlers (none in this case) */
+       NULL,
d360 2
a361 2
+       /* Module initialization */
+       df_init,
d363 2
a364 2
+       /* Session initialization */
+       df_sess_init
d367 3
a369 2
--- ./modules/mod_ls.c  Sat Dec 16 01:25:31 2006
+++ modules/mod_ls.c    Tue Jan 23 15:43:20 2007
d373 1
a373 1

d383 1
a383 1

d385 3
a387 3
     res = pr_data_xfer(listbuf, strlen(listbuf));
@@@@ -268,6 +271,13 @@@@

d389 1
a389 1

d400 4
a403 4
diff -urN ./src/netio.c .-iconv/src/netio.c
--- ./src/netio.c       2004-06-16 01:45:21.000000000 +0900
+++ src/netio.c 2004-09-25 21:42:59.000000000 +0900
@@@@ -467,9 +467,12 @@@@
d406 1
a406 1

d413 1
a413 1

d416 1
a416 1
@@@@ -481,6 +484,13 @@@@
d419 1
a419 1

d429 48
@


1.2
log
@- Fix extra-patch-mod-codeconv
- Bump portrevision

PR:		ports/114502
Reported by:	Oleg Gawriloff <barzog@@telecom.by>
Approved by:	sat (mentor)
@
text
@@


1.1
log
@- Add mode_codeconv patches and option into Makefile
  (mod_codeconv allow change filename's charsets "on the fly")
- Add "Cyrrilic charset fix" patch and option into Makefile
- Fix mode_nls patch problems
- Bump PORTREVISION

PR:             108244
Submitted by:   Denis Barov<dindin@@freebsd.org.ua>
Approved by:    maintainer
@
text
@d3 1
a3 1
+++ .-iconv/modules/mod_codeconv.c      2004-09-25 21:44:05.000000000 +0900
d236 1
a236 1
+++ .-iconv/modules/mod_df.c    2004-09-25 21:43:57.000000000 +0900
d366 1
a366 1
+++ .-iconv/modules/mod_ls.c    Tue Jan 23 15:43:20 2007
d399 1
a399 1
+++ .-iconv/src/netio.c 2004-09-25 21:42:59.000000000 +0900
a425 1

@

