From owner-freebsd-hackers Thu Jul 1 7:44:41 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id EB0C0157A4; Thu, 1 Jul 1999 07:44:32 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id QAA28235; Thu, 1 Jul 1999 16:44:31 +0200 (CEST) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id QAA94189; Thu, 1 Jul 1999 16:44:30 +0200 (MET DST) Date: Thu, 1 Jul 1999 16:44:30 +0200 From: Eivind Eklund To: Dag-Erling Smorgrav Cc: Ruslan Ermilov , 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> References: <199907011133.EAA64244@freefall.freebsd.org> <19990701135124.I92508@bitbox.follo.net> <19990701154210.A12020@relay.ucb.crimea.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: ; from Dag-Erling Smorgrav on Thu, Jul 01, 1999 at 03:03:12PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jul 01, 1999 at 03:03:12PM +0200, Dag-Erling Smorgrav wrote: > Ruslan Ermilov 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