Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2000 01:36:25 -0400 (EDT)
From:      "Eric D. Futch" <efutch@nyct.net>
To:        Tim Liddelow <tim@esec.com.au>
Cc:        freebsd-current@freebsd.org
Subject:   Re: FTP_PASSIVE_MODE and libftpio
Message-ID:  <Pine.BSF.4.21.0004200123260.68290-100000@bsd1.nyct.net>
In-Reply-To: <38FE93E9.656E5306@esec.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Maybe I didn't make it clear enough that fetch(1), and others uknown to
me, that use libftpio behave differently than ftp(1). I could imagine that
the current behaviour would cause confusion since ftp(1) checks the value
of FTP_PASSIVE_MODE and acts appropriately and programs using
libftpio do not.  My whole point was getting ftp(1) and programs using
libftpio to behave in the same manner.  Maybe I'm just not explaining it
right :), take a look at the following snippets...

From src/usr.bin/ftp/main.c:
        if ((s = getenv("FTP_PASSIVE_MODE")) != NULL
            && strcasecmp(s, "no") != 0)
                passivemode = 1;
        if (strcmp(cp, "pftp") == 0)
                passivemode = 1;

From src/lib/libftpio/ftpio.c
    if (getenv("FTP_PASSIVE_MODE"))
        ftpPassive(fp, TRUE);

You can see how they differ in handling FTP_PASSIVE_MODE.

Someone (sorry I can't remember your name :)) suggested a better
way of doing the if... take a look at:
http://quake.nyct.net/~efutch/FreeBSD/ftpio.c.patch-2

--
Eric Futch              New York Connect.Net, Ltd.
efutch@nyct.net         Technical Support Staff
http://www.nyct.net     (212) 293-2620
"Bringing New York The Internet Access It Deserves"


On Thu, 20 Apr 2000, Tim Liddelow wrote:

>Looking at the patch, the only mod I would suggest is to preserve the current
>behaviour;  make it set passive mode if the variable is just defined (without
>any value).  If it is NO, sure, dont set passive mode, but set passive  mode if
>the variable is YES or no value.  i.e. looking at the patch, change the last if
>statement to just if (cp) and don't do the strncmp().
>
>Just my $0.02.
>
>Cheers
>Tim.
>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004200123260.68290-100000>