Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jul 1999 16:44:30 +0200
From:      Eivind Eklund <eivind@FreeBSD.org>
To:        Dag-Erling Smorgrav <des@flood.ping.uio.no>
Cc:        Ruslan Ermilov <ru@FreeBSD.org>, hackers@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/ftp Makefile fetch.c ftp.1 ftp.c ftp_var.h main.c util.c
Message-ID:  <19990701164430.O92508@bitbox.follo.net>
In-Reply-To: <xzp4sjozfn3.fsf@flood.ping.uio.no>; from Dag-Erling Smorgrav on Thu, Jul 01, 1999 at 03:03:12PM %2B0200
References:  <199907011133.EAA64244@freefall.freebsd.org> <19990701135124.I92508@bitbox.follo.net> <19990701154210.A12020@relay.ucb.crimea.ua> <xzp4sjozfn3.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 01, 1999 at 03:03:12PM +0200, Dag-Erling Smorgrav wrote:
> Ruslan Ermilov <ru@FreeBSD.org> 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990701164430.O92508>