From owner-freebsd-current Wed Apr 19 23:54:14 2000 Delivered-To: freebsd-current@freebsd.org Received: from lynx.aba.net.au (lynx.esec.com.au [203.21.84.1]) by hub.freebsd.org (Postfix) with SMTP id 1F55E37BDB5 for ; Wed, 19 Apr 2000 23:54:10 -0700 (PDT) (envelope-from tim@esec.com.au) Received: (qmail 7337 invoked from network); 20 Apr 2000 06:50:48 -0000 Received: from feline.esec.com.au (203.21.85.202) by lynx.esec.com.au with SMTP; 20 Apr 2000 06:50:48 -0000 Received: from esec.com.au (localhost [127.0.0.1]) by feline.esec.com.au (8.9.3/8.9.3) with ESMTP id QAA00320; Thu, 20 Apr 2000 16:56:17 +1000 (EST) (envelope-from tim@esec.com.au) Message-ID: <38FEAA11.1A742C82@esec.com.au> Date: Thu, 20 Apr 2000 16:56:17 +1000 From: Tim Liddelow Organization: eSec Ltd X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: "Eric D. Futch" Cc: freebsd-current@freebsd.org Subject: Re: FTP_PASSIVE_MODE and libftpio References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Eric D. Futch" wrote: > [snippets deleted] > 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 Actually that is wrong, as the above patch has the wrong default behaviour. It should read something like: + cp = getenv("FTP_PASSIVE_MODE"); + if (cp && strncasecmp(cp, "NO", 2)==0) + ftpPassive(fp, FALSE); + else if (cp) + ftpPassive(fp, TRUE); Or basically just use the same code from src/lib/libftpio/ftpio.c :) Cheers Tim. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message