Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/libexec/ftpd Pull up revision 1.69 (requested by tv in ...
details: https://anonhg.NetBSD.org/src/rev/72dfbb64b7ef
branches: netbsd-1-6
changeset: 529283:72dfbb64b7ef
user: tron <tron%NetBSD.org@localhost>
date: Wed Nov 06 20:30:43 2002 +0000
description:
Pull up revision 1.69 (requested by tv in ticket #418):
We really, actually, positively want to apply the ftpd.conf "passive"
option to all possible *PSV commands. Some ftp servers are simply not
capable of passive connections, hence the option....
diffstat:
libexec/ftpd/ftpcmd.y | 40 +++++++++++++++++++++++++++-------------
1 files changed, 27 insertions(+), 13 deletions(-)
diffs (76 lines):
diff -r 79a89aa64946 -r 72dfbb64b7ef libexec/ftpd/ftpcmd.y
--- a/libexec/ftpd/ftpcmd.y Sun Nov 03 19:54:23 2002 +0000
+++ b/libexec/ftpd/ftpcmd.y Wed Nov 06 20:30:43 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpcmd.y,v 1.66.2.1 2002/06/15 03:42:33 lukem Exp $ */
+/* $NetBSD: ftpcmd.y,v 1.66.2.2 2002/11/06 20:30:43 tron Exp $ */
/*-
* Copyright (c) 1997-2001 The NetBSD Foundation, Inc.
@@ -83,7 +83,7 @@
#if 0
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
#else
-__RCSID("$NetBSD: ftpcmd.y,v 1.66.2.1 2002/06/15 03:42:33 lukem Exp $");
+__RCSID("$NetBSD: ftpcmd.y,v 1.66.2.2 2002/11/06 20:30:43 tron Exp $");
#endif
#endif /* not lint */
@@ -293,32 +293,46 @@
| LPSV check_login CRLF
{
if ($2) {
- if (epsvall)
- reply(501,
- "LPSV disallowed after EPSV ALL");
- else
- long_passive("LPSV", PF_UNSPEC);
+ if (CURCLASS_FLAGS_ISSET(passive)) {
+ if (epsvall)
+ reply(501,
+ "LPSV disallowed after EPSV ALL");
+ else
+ long_passive("LPSV", PF_UNSPEC);
+ } else
+ reply(500, "LPSV mode not available.");
}
}
| EPSV check_login SP NUMBER CRLF
{
- if ($2)
- long_passive("EPSV", epsvproto2af($4));
+ if ($2) {
+ if (CURCLASS_FLAGS_ISSET(passive))
+ long_passive("EPSV", epsvproto2af($4));
+ else
+ reply(500, "EPSV mode not available.");
+ }
}
| EPSV check_login SP ALL CRLF
{
if ($2) {
- reply(200, "EPSV ALL command successful.");
- epsvall++;
+ if (CURCLASS_FLAGS_ISSET(passive)) {
+ reply(200, "EPSV ALL command successful.");
+ epsvall++;
+ } else
+ reply(500, "EPSV mode not available.");
}
}
| EPSV check_login CRLF
{
- if ($2)
- long_passive("EPSV", PF_UNSPEC);
+ if ($2) {
+ if (CURCLASS_FLAGS_ISSET(passive))
+ long_passive("EPSV", PF_UNSPEC);
+ else
+ reply(500, "EPSV mode not available.");
+ }
}
| TYPE check_login SP type_code CRLF
Home |
Main Index |
Thread Index |
Old Index