From anarcat@anarcat.dyndns.org  Sat Mar 23 11:36:03 2002
Return-Path: <anarcat@anarcat.dyndns.org>
Received: from tomts6-srv.bellnexxia.net (tomts6.bellnexxia.net [209.226.175.26])
	by hub.freebsd.org (Postfix) with ESMTP id 526D337B417
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 23 Mar 2002 11:36:02 -0800 (PST)
Received: from khan.anarcat.dyndns.org ([65.94.191.9])
          by tomts6-srv.bellnexxia.net
          (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP
          id <20020323193601.KCIJ3513.tomts6-srv.bellnexxia.net@khan.anarcat.dyndns.org>;
          Sat, 23 Mar 2002 14:36:01 -0500
Received: from lenny.anarcat.dyndns.org (lenny.anarcat.dyndns.org [192.168.0.4])
	by khan.anarcat.dyndns.org (Postfix) with SMTP
	id EC6251891; Sat, 23 Mar 2002 14:35:58 -0500 (EST)
Received: by lenny.anarcat.dyndns.org (sSMTP sendmail emulation); Sat, 23 Mar 2002 14:35:00 -0500
Message-Id: <20020323193559.EC6251891@khan.anarcat.dyndns.org>
Date: Sat, 23 Mar 2002 14:35:00 -0500
From: The Anarcat <anarcat@anarcat.dyndns.org>
Reply-To: The Anarcat <anarcat@anarcat.dyndns.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: anarcat@anarcat.dyndns.org
Subject: [patch] ftp/wget doesn't respect FTP_PASSIVE_MODE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         36238
>Category:       ports
>Synopsis:       [patch] ftp/wget doesn't respect FTP_PASSIVE_MODE
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    sf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 23 11:40:01 PST 2002
>Closed-Date:    Sun Mar 02 17:16:32 PST 2003
>Last-Modified:  Sun Mar 02 17:16:32 PST 2003
>Originator:     The Anarcat
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Nada, Inc.
>Environment:
System: FreeBSD lenny.anarcat.dyndns.org 4.5-STABLE FreeBSD 4.5-STABLE #0: Thu Mar 7 20:12:50 EST 2002 anarcat@lenny.anarcat.dyndns.org:/usr/obj/usr/src/sys/LENNY i386

wget-1.8.1

>Description:

wget doesn't establish ftp sessions in passive mode even when the
FTP_PASSIVE_MODE environment variable is set.

>How-To-Repeat:

Behind a firewall:

unsetenv FTP_PASSIVE_MODE
wget -r ftp://ftp.geocities.com/

>Fix:

Might not be done in the proper place...

Port might also need a portrevision bump, but since this pr is cc'd to
the wget patch team, I hope it will be included in a future release. :)

--- src/main.c.orig	Sat Mar 23 14:23:36 2002
+++ src/main.c	Sat Mar 23 14:26:12 2002
@@ -679,6 +679,9 @@
 	}
     }
 
+  if (getenv("FTP_PASSIVE_MODE"))
+    setval ("passiveftp", "on");
+
   /* All user options have now been processed, so it's now safe to do
      interoption dependency checks. */
 
>Release-Note:
>Audit-Trail:

From: The Anarcat <anarcat@anarcat.dyndns.org>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports@FreeBSD.org
Cc:  
Subject: Re: ports/36238: [patch] ftp/wget doesn't respect FTP_PASSIVE_MODE
Date: Sat, 23 Mar 2002 14:45:12 -0500

 --pvezYHf7grwyp3Bc
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Thinking back, and looking at libfetch, this would be better:
 
 
 --- main.c.orig	Mon Dec 10 00:31:44 2001
 +++ main.c	Sat Mar 23 14:41:35 2002
 @@ -239,6 +239,8 @@
    char **url, **t;
    int i, c, nurl, status, append_to_log;
 =20
 +  char *s;
 +
    static struct option long_options[] =3D
    {
      /* Options without arguments: */
 @@ -678,6 +680,10 @@
  	  break;
  	}
      }
 +
 +  if ((s =3D getenv("FTP_PASSIVE_MODE")) !=3D NULL &&
 +    strncasecmp(s, "no", 2) !=3D 0)
 +    setval ("passiveftp", "on");
 =20
    /* All user options have now been processed, so it's now safe to do
       interoption dependency checks. */
 
 --pvezYHf7grwyp3Bc
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iEYEARECAAYFAjyc20cACgkQttcWHAnWiGcf8QCdFo+NqE8aNfq2/ryY+xJTxKJv
 v1AAoJzLCIE67TAyGb8kiT7rY3PP2Ilm
 =cQLV
 -----END PGP SIGNATURE-----
 
 --pvezYHf7grwyp3Bc--
Responsible-Changed-From-To: freebsd-ports->sf 
Responsible-Changed-By: pat 
Responsible-Changed-When: Sat Mar 23 14:10:35 PST 2002 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36238 
State-Changed-From-To: open->closed 
State-Changed-By: sf 
State-Changed-When: Sun Mar 2 17:13:59 PST 2003 
State-Changed-Why:  
FTP_PASSIVE_MODE is application dependent feature. 
even /usr/bin/ftp (in -CURRENT) does not support it. 
So please configure each applications in their own way. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36238 
>Unformatted:
