Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jun 1999 14:33:44 +0100
From:      Dom Mitchell <Dom.Mitchell@palmerharvey.co.uk>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        pst@FreeBSD.org, lukem@netbsd.org
Subject:   bin/12070: FTP_PASSIVE_MODE exposes bug in ftp(1).
Message-ID:  <E10qzX6-000B4p-00@voodoo.pandhm.co.uk>

next in thread | raw e-mail | index | archive | help

>Number:         12070
>Category:       bin
>Synopsis:       FTP_PASSIVE_MODE exposes bug in ftp(1).
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun  7 06:30:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Dominic Mitchell
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Palmer & Harvey McLane Ltd.
>Environment:

FreeBSD voodoo.pandhm.co.uk 4.0-CURRENT FreeBSD 4.0-CURRENT #15: Thu Jun  3 08:51:09 BST 1999     root@voodoo.pandhm.co.uk:/usr/src/sys/compile/VOODOO  i386

>Description:

Since we have enabled FTP_PASSIVE_MODE in /etc/login.conf, my gate-ftp
no longer works properly.  It starts in non-gate mode even when called
as gate-ftp.

I've CC'd pst@freebsd.org as the last person to check in a change to
ftp(1), and also lukem@netbsd.org as the original author.

>How-To-Repeat:

You can demonstrate the problem fairly easily:

% env FTPSERVER=ftp-gw gate-ftp
ftp> status
Not connected.
No proxy connection.
Gate ftp: off, server ftp-gw, port 21.
          ^^^
Passive mode: on.
Mode: ; Type: ; Form: ; Structure: .
Verbose: on; Bell: off; Prompting: on; Globbing: on.
Store unique: off; Receive unique: off.
Preserve modification times: on.
Case: off; CR stripping: on.
Ntrans: off.
Nmap: off.
Hash mark printing: off; Mark count: 1024; Progress bar: on.
Use of PORT cmds: on.
Command line editing: on.

>Fix:
	
Apply this patch in /usr/src/usr.bin/ftp:

--- main.c.orig	Mon Jun  7 14:20:36 1999
+++ main.c	Mon Jun  7 14:21:19 1999
@@ -131,7 +131,9 @@
 
 	cp = strrchr(argv[0], '/');
 	cp = (cp == NULL) ? argv[0] : cp + 1;
-	if (getenv("FTP_PASSIVE_MODE") || strcmp(cp, "pftp") == 0)
+	if (getenv("FTP_PASSIVE_MODE"))
+		passivemode = 1;
+	if (strcmp(cp, "pftp") == 0)
 		passivemode = 1;
 	else if (strcmp(cp, "gate-ftp") == 0)
 		gatemode = 1;
-- 
**********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please notify 
the system manager.

This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.
**********************************************************************

>Release-Note:
>Audit-Trail:
>Unformatted:


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?E10qzX6-000B4p-00>