Date: Sun, 30 Apr 2000 13:10:03 -0700 (PDT) From: "George W. Dinolt" <gdinolt@pacbell.net> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/18103: [PATCH] FTP_PASSIVE_MODE and libftpio Message-ID: <200004302010.NAA45219@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/18103; it has been noted by GNATS.
From: "George W. Dinolt" <gdinolt@pacbell.net>
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004302010.NAA45219>
