Address PR pkg/24744 by Jarmo Jaakkola <jarmo.jaakkola@iki.fi>:

* ftp.fi.netbsd.org returns "257" in return to a "cd" command, accept that
   (in addition to 250 and 550). Seems to be allowed per RFC 959.
 * Make buffer for reply bigger (not too big, as it may hit performance).
This commit is contained in:
hubertf 2005-03-18 00:01:11 +00:00
parent 23b38e8659
commit fdbe9a372b
1 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
/* $NetBSD: ftpio.c,v 1.66 2005/01/06 11:56:39 agc Exp $ */
/* $NetBSD: ftpio.c,v 1.67 2005/03/18 00:01:11 hubertf Exp $ */
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: ftpio.c,v 1.66 2005/01/06 11:56:39 agc Exp $");
__RCSID("$NetBSD: ftpio.c,v 1.67 2005/03/18 00:01:11 hubertf Exp $");
#endif
/*-
@ -139,7 +139,7 @@ static int
expect(int fd, const char *str, int *ftprc)
{
int rc;
char buf[90];
char buf[256];
#if EXPECT_DEBUG
char *vstr;
#endif /* EXPECT_DEBUG */
@ -654,7 +654,7 @@ ftp_expand_URL(const char *base, char *pattern)
}
/* Sync - don't remove */
rc = ftp_cmd("cd .\n", "\n(550|250).*\n");
rc = ftp_cmd("cd .\n", "\n(550|250|257).*\n");
if (rc != 250) {
warnx("chdir failed!");
unlink(tmpname); /* remove clutter */