On Thu, Jul 01, 1999 at 03:03:12PM +0200, Dag-Erling Smorgrav wrote:
> Ruslan Ermilov <[EMAIL PROTECTED]> writes:
> > On Thu, Jul 01, 1999 at 01:51:24PM +0200, Eivind Eklund wrote:
> > > On Thu, Jul 01, 1999 at 04:33:37AM -0700, Ruslan Ermilov wrote:
> > > >   - separate the pftp and FTP_PASSIVE_MODE tests so gate mode works again
> > > >     PR:         bin/12070
> > > >   
> > > >   - specifically check that FTP_PASSIVE_MODE is set to YES, rather than
> > > >     just checking if it is defined
> > > 
> > > We elected to change our defaults to having passive mode enabled - it
> > > sounds to me like it should explicitly check for FTP_PASSIVE_MODE=NO,
> > > not vice versa.
> 
> [for some reason, Eivind's mail hasn't reached me yet]

This is because my mail was a private mail to Ruslan, because I didn't
feel that the issue was worth filling the committers list with (or
really, interesting for anybody but me and the author of the code,
which I thought was Ruslan).  As it seems Ruslan feels differently,
I'm keeping a public Cc:, but moving to -hackers.

> Eivind: what Ruslan just did was MFC some patches I committed a week
> or two ago but hadn't come around to MFCing yet (these were the
> patches I mentioned yesterday). If you had any objections, you should
> have raised them back then...

Sorry; didn't notice back then.

>  * 'unset FTP_PASSIVE_MODE' (or hack login.conf), which always worked
> 
>  * set FTP_PASSIVE_MODE=NO, which didn't work before the patch,
>    because ftp(1) would just notice that FTP_PASSIVE_MODE was defined
>    and assume it meant it should use passive mode.
> 
> Some may find the second solution more obvious than the first; hence
> the PR and my patches.
> 
> Changing ftp(1) to check for FTP_PASSIVE_MODE=NO rather than the
> reverse would gratuitously change ftp's reaction to its environment.

Not at the first point this was done; it would avoid gratiously
changing the reaction.  Ie:

Index: main.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/ftp/main.c,v
retrieving revision 1.18
diff -u -r1.18 main.c
--- main.c      1999/06/25 14:11:15     1.18
+++ main.c      1999/07/01 14:41:35
@@ -135,7 +135,7 @@
        cp = strrchr(argv[0], '/');
        cp = (cp == NULL) ? argv[0] : cp + 1;
        if ((s = getenv("FTP_PASSIVE_MODE")) != NULL
-           && strcasecmp(s, "yes") == 0)
+           && strcasecmp(s, "no") != 0)
                passivemode = 1;
        if (strcmp(cp, "pftp") == 0)
                passivemode = 1;

... compared to the sources as of today.  This gives minimal semantic
difference from the way it worked before the change (which was that if
FTP_PASSIVE_MODE existed, ftp used passive mode).

Eivind.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to