Bug 15580

Summary: ftp(1) file completion does not work if server is wu-ftpd 2.6.0
Product: Base System Reporter: Joel Faedi <Joel.Faedi>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-RELEASE   
Hardware: Any   
OS: Any   

Description Joel Faedi 1999-12-20 10:10:02 UTC
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).

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)
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.
Comment 1 cpiazza freebsd_committer freebsd_triage 1999-12-20 16:55:58 UTC
State Changed
From-To: open->closed

Superseded by PR 15581 (which has a patch)