From nobody@FreeBSD.org  Thu Apr 20 14:39:02 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21])
	by hub.freebsd.org (Postfix) with ESMTP id 4221537B544
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 20 Apr 2000 14:39:02 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.9.3/8.9.2) id OAA76447;
	Thu, 20 Apr 2000 14:38:27 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Message-Id: <200004202138.OAA76447@freefall.freebsd.org>
Date: Thu, 20 Apr 2000 14:38:27 -0700 (PDT)
From: ripper@nmia.com
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: inconsistent interface between ftp and libftpio.a
X-Send-Pr-Version: www-1.0

>Number:         18120
>Category:       bin
>Synopsis:       inconsistent interface between ftp and libftpio.a
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 20 14:40:00 PDT 2000
>Closed-Date:    Sun May 28 02:37:08 PDT 2000
>Last-Modified:  Sun May 28 02:37:25 PDT 2000
>Originator:     Ross Lippert
>Release:        FreeBSD-4.0 (RELEASE?)
>Organization:
>Environment:
FreeBSD saix8967.sandia.gov 4.0-RELEASE FreeBSD 4.0-RELEASE #2: Tue Apr 18 11:19:27 MDT 2000     root@:/usr/src/sys/compile/FREEBIE  i386

>Description:
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!
>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.	
>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"))
> 


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Sun May 28 02:37:08 PDT 2000 
State-Changed-Why:  
The correct behaviour is to default to passive mode. 
>Unformatted:
