From owner-freebsd-bugs Sun Apr 30 13:10: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id AE00337BE50 for ; Sun, 30 Apr 2000 13:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA45219; Sun, 30 Apr 2000 13:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sun, 30 Apr 2000 13:10:03 -0700 (PDT) Message-Id: <200004302010.NAA45219@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "George W. Dinolt" Subject: Re: bin/18103: [PATCH] FTP_PASSIVE_MODE and libftpio Reply-To: "George W. Dinolt" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/18103; it has been noted by GNATS. From: "George W. Dinolt" To: freebsd-gnats-submit@FreeBSD.org, efutch@nyct.net Cc: Subject: Re: bin/18103: [PATCH] FTP_PASSIVE_MODE and libftpio Date: Sun, 30 Apr 2000 13:02:53 -0700 I too have been recently "bitten" by this problem. I suggest that the documentation of FTP_PASSIVE_MODE in libftpio be fixed to describe what the possible legal values are and that the various programs which use libftpio either copy the same information or refer back to it. Here is a possible fix to the the ftpio documentation The following patch might be appropriate for ftpio.3 *** /usr/src/lib/libftpio/ftpio.3 Thu Mar 2 18:16:58 2000 --- ftpio.3 Sun Apr 30 12:38:04 2000 *************** *** 194,200 **** .Tn FTP connection. .It Ev FTP_PASSIVE_MODE ! Force the use of passive mode .Tn FTP . .El .Sh BUGS --- 194,202 ---- .Tn FTP connection. .It Ev FTP_PASSIVE_MODE ! If set and is not zero and does not match the regular expression ! .Em {Nn}{Oo} ! force the use of passive mode .Tn FTP . .El .Sh BUGS With this patch to the documentation one might want to change the patch to the code in ftpio.c as follows: *** /usr/src/lib/libftpio/ftpio.c Sun Apr 23 20:19:53 2000 --- ftpio.c Sun Apr 30 12:57:47 2000 *************** *** 499,506 **** check_passive(FILE *fp) { char *cp = getenv("FTP_PASSIVE_MODE"); ! ! ftpPassive(fp, (cp && !strncmp(cp, "YES", 3))); } static void --- 499,506 ---- check_passive(FILE *fp) { char *cp = getenv("FTP_PASSIVE_MODE"); ! /* str routines return zero if comparisons are true */ ! ftpPassive(fp, cp && strncasecmp(cp, "no", 2) && strcmp(cp, "0") ); } static void This business of setting "logical' nvironment variables "rationally" is a pain at best. I suspect athat it would be nice to have a system standard for such things, but we would spend years arguing about it. Regards, George Dinolt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message