Long overdue: make passive mode the default for ftp.

This commit is contained in:
Dag-Erling Smørgrav 2011-09-27 18:23:58 +00:00
parent 29da75477b
commit 4f411f8601

View File

@ -638,8 +638,8 @@ ftp_transfer(conn_t *conn, const char *oper, const char *file,
/* passive mode */
if (!pasv)
pasv = ((s = getenv("FTP_PASSIVE_MODE")) != NULL &&
strncasecmp(s, "no", 2) != 0);
pasv = ((s = getenv("FTP_PASSIVE_MODE")) == NULL ||
strncasecmp(s, "no", 2) == 0);
/* isolate filename */
filename = ftp_filename(file, &filenamelen, &type);