summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libfetch/fetch.36
-rw-r--r--lib/libfetch/ftp.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libfetch/fetch.3 b/lib/libfetch/fetch.3
index 5f5acb0..9c21fcd 100644
--- a/lib/libfetch/fetch.3
+++ b/lib/libfetch/fetch.3
@@ -422,9 +422,9 @@ and message, e.g. "File is not available (404 Not Found)"
.Sh ENVIRONMENT
.Bl -tag -width FTP_PASSIVE_MODE
.It Ev FTP_PASSIVE_MODE
-The FTP code selects passive mode by default.
-To force active mode FTP, set this variable to
-.Ql no .
+If set to anything but
+.Ql no ,
+forces the FTP code to use passive mode.
.It Ev FTP_PASSWORD
Default FTP password if the remote server requests one and none was
provided in the URL.
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index d9f624e..59d7190 100644
--- a/lib/libfetch/ftp.c
+++ b/lib/libfetch/ftp.c
@@ -464,7 +464,7 @@ _ftp_transfer(int cd, char *oper, char *file,
/* passive mode */
if (!pasv)
- pasv = ((s = getenv("FTP_PASSIVE_MODE")) == NULL ||
+ pasv = ((s = getenv("FTP_PASSIVE_MODE")) != NULL &&
strncasecmp(s, "no", 2) != 0);
/* find our own address, bind, and listen */
OpenPOWER on IntegriCloud