From 19364f02eb1f2d6f70d0c618e0bbb88c121f1c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sat, 3 Jul 1999 10:10:50 +0000 Subject: [PATCH] Reverse the FTP_PASSIVE_MODE check, so it checks for "is not NO" rather than "is YES". --- usr.bin/ftp/ftp.1 | 9 +++++---- usr.bin/ftp/main.c | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/usr.bin/ftp/ftp.1 b/usr.bin/ftp/ftp.1 index 18c7be08e96..05981aec01c 100644 --- a/usr.bin/ftp/ftp.1 +++ b/usr.bin/ftp/ftp.1 @@ -1,4 +1,4 @@ -.\" $Id: ftp.1,v 1.9 1999/06/25 14:11:12 ru Exp $ +.\" $Id: ftp.1,v 1.10 1999/07/01 14:32:07 ru Exp $ .\" $NetBSD: ftp.1,v 1.21 1997/06/10 21:59:58 lukem Exp $ .\" .\" Copyright (c) 1985, 1989, 1990, 1993 @@ -1346,9 +1346,10 @@ By default, this is bound to the TAB key. utilizes the following environment variables. .Bl -tag -width "FTP_PASSIVE_MODE" .It Ev FTP_PASSIVE_MODE -If set to -.Sq YES , -use passive mode FTP by default. +If this variable is set to something else than +.Sq NO , +.Nm +will use passive mode by default. .It Ev FTPSERVER Host to use as gate-ftp server when .Ic gate diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 034846208e8..f8b21d71deb 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.17 1999/06/07 16:35:15 des Exp $ */ +/* $Id: main.c,v 1.18 1999/06/25 14:11:15 ru Exp $ */ /* $NetBSD: main.c,v 1.26 1997/10/14 16:31:22 christos Exp $ */ /* @@ -44,7 +44,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 1989, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -__RCSID("$Id: main.c,v 1.17 1999/06/07 16:35:15 des Exp $"); +__RCSID("$Id: main.c,v 1.18 1999/06/25 14:11:15 ru Exp $"); __RCSID_SOURCE("$NetBSD: main.c,v 1.26 1997/10/14 16:31:22 christos Exp $"); #endif #endif /* not lint */ @@ -135,7 +135,7 @@ main(argc, argv) 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;