From nobody@FreeBSD.ORG  Mon Dec 20 02:07:30 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 65387152AB; Mon, 20 Dec 1999 02:07:30 -0800 (PST)
Message-Id: <19991220100730.65387152AB@hub.freebsd.org>
Date: Mon, 20 Dec 1999 02:07:30 -0800 (PST)
From: Joel.Faedi@esial.u-nancy.fr
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: ftp(1) file completion does not work if server is wu-ftpd 2.6.0
X-Send-Pr-Version: www-1.0

>Number:         15580
>Category:       bin
>Synopsis:       ftp(1) file completion does not work if server is wu-ftpd 2.6.0
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 20 02:10:02 PST 1999
>Closed-Date:    Mon Dec 20 08:55:58 PST 1999
>Last-Modified:  Mon Dec 20 08:56:17 PST 1999
>Originator:     Jol Faedi
>Release:        3.3-RELEASE and -current
>Organization:
ESIAL
>Environment:
FreeBSD meduse.scinfo.u-nancy.fr 3.3-RELEASE FreeBSD 3.3-RELEASE #1: Sat Oct  9 17:59:09 CEST 1999     faedi@meduse.faedi.fr:/usr/src/sys/compile/MEDUSE  i386

>Description:
ftp(1) file completion does not work if server is wu-ftpd 2.6.0. This is due to nlist (NLST) change in wu-ftpd 2.6.0. 
You can see also docs/15408 (ls = dir != nlist).
>How-To-Repeat:
% ftp -d current.freebsd.org
Connected to usw2.freebsd.org.
220 usw2.freebsd.org FTP server (Version wu-2.6.0(1) Tue Dec 7 17:24:13 CST 1999) ready.
---> USER anonymous
331 Guest login ok, send your complete e-mail address as password.
---> PASS XXXX
230 Guest login ok, access restrictions apply.
---> SYST
215 UNIX Type: L8 Version: BSD-199506
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /p   <<<<<<< TAB key pressed avec letter "p"
---> PORT 192,33,169,41,192,23
---> NLST /

550 No files found.
ftp> nlist /
---> PORT 192,33,169,41,192,24
200 PORT command successful.
---> NLST /
550 No files found.
ftp> nlist "-a /"
---> PORT 192,33,169,41,192,25
200 PORT command successful.
---> NLST -a /
150 Opening ASCII mode data connection for /bin/ls.
.
..
bin
etc
incoming
pub
usr
226 Transfer complete.
ftp> bye
---> QUIT
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 683 bytes in 1 transfers.
221-Thank you for using the FTP service on usw2.freebsd.org.
221 Goodbye.


>Fix:
When doing remote globing do a NLST "-a xxxx" (file util.c).
Here is a patch obtained with "diff -c util.c.old util.c > util.c.patch" from -current ftp/util.c ($FreeBSD: src/usr.bin/ftp/util.c,v 1.8 1999/08/28 01:01:35 peter Exp)



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed  
State-Changed-By: cpiazza 
State-Changed-When: Mon Dec 20 08:55:58 PST 1999 
State-Changed-Why:  
Superseded by PR 15581 (which has a patch) 
>Unformatted:
