diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2001-03-17 22:54:21 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2001-03-17 22:54:21 +0000 |
commit | a9577c6fe519dee1c9da648d6d4e3eb831836ff6 (patch) | |
tree | 1f2388bf22a7c21eaea081fa2d4cb28fbe632766 /sys/netinet | |
parent | 3fad248be961f356cfbc72fe1edcb8d503aaa5cf (diff) |
Handle ftp services that don't ask for a password, only a username.
This appears to be allowed by RFC and is apparently used by some
banks in the netherlands (shudder).
Patch courtesy Ramses de Beer <rbdebeer@yahoo.com>.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_ftp_pxy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/ip_ftp_pxy.c b/sys/netinet/ip_ftp_pxy.c index c450ddb7c0d..8cedf2807a1 100644 --- a/sys/netinet/ip_ftp_pxy.c +++ b/sys/netinet/ip_ftp_pxy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ftp_pxy.c,v 1.12 2001/01/17 04:47:14 fgsch Exp $ */ +/* $OpenBSD: ip_ftp_pxy.c,v 1.13 2001/03/17 22:54:20 beck Exp $ */ /* * Simple FTP transparent proxy for in-kernel use. For use with the NAT @@ -515,6 +515,8 @@ int dlen; if ((ftp->ftp_passok == 1) && !strncmp(rptr, "331", 3)) ftp->ftp_passok = 2; + else if ((ftp->ftp_passok == 1) && !strncmp(rptr, "230", 3)) + ftp->ftp_passok = 4; else if ((ftp->ftp_passok == 3) && !strncmp(rptr, "230", 3)) ftp->ftp_passok = 4; else if ((ftp->ftp_passok == 3) && !strncmp(rptr, "530", 3)) |