Bug 18120

Summary: inconsistent interface between ftp and libftpio.a
Product: Base System Reporter: ripper <ripper>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description ripper 2000-04-20 22:40:00 UTC
libftpio dertermines whether ftp is to be passive by seeing if 
FTP_PASSIVE_MODE is set.
ftp determines whether ftp is to be passive by seeing is
FTP_PASSIVE_MODE is set and not eq to "no".

One effect: fetch, which uses libftpio, will ftp passively and ftp will
ftp actively whenever FTP_PASSIVE_MODE="NO", which is LAME!

Fix: 

apply the following patch to /usr/src/lib/libftpio/ftpio.c

> diff ftpio.c ftpio.c.old
501,504c501
<     char *s;
< 
<     if ((s = getenv("FTP_PASSIVE_MODE")) != NULL
<       && strcasecmp(s,"no") !=0 )
---
>     if (getenv("FTP_PASSIVE_MODE"))
>
How-To-Repeat: I am not sure.  I am behind a gateway/firewall which has trouble with
passive FTP.  My advice is: get yourself in a sitch where passive does
not work right and then compare the results of fetch and ftp.
Comment 1 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2000-05-28 10:37:08 UTC
State Changed
From-To: open->closed

The correct behaviour is to default to passive mode.