diff options
author | des <des@FreeBSD.org> | 2000-05-26 12:56:53 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2000-05-26 12:56:53 +0000 |
commit | 2a39533c003007b1c26ce9ae8ce4ee9cf5a59884 (patch) | |
tree | d085d73479132baa6c62c69b3326a702957d944a /lib/libfetch/ftp.c | |
parent | b7c41fbb0dacbc4490e68d1eadd21cd4895c35f2 (diff) | |
download | FreeBSD-src-2a39533c003007b1c26ce9ae8ce4ee9cf5a59884.zip FreeBSD-src-2a39533c003007b1c26ce9ae8ce4ee9cf5a59884.tar.gz |
Honor FTP_PASSIVE_MODE so caller doesn't need to.
Diffstat (limited to 'lib/libfetch/ftp.c')
-rw-r--r-- | lib/libfetch/ftp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 64feb37..a8a4146 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -218,6 +218,10 @@ _ftp_transfer(int cd, char *oper, char *file, high = (flags && strchr(flags, 'h')); verbose = (flags && strchr(flags, 'v')); + /* passive mode */ + if (!pasv && (s = getenv("FTP_PASSIVE_MODE")) != NULL) + pasv = (strncasecmp(s, "no", 2) != 0); + /* change directory */ if (((s = strrchr(file, '/')) != NULL) && (s != file)) { *s = 0; |