Package: pure-ftpd
Version: 1.0.28-3+squeeze1

With pure-ftpd, the FTP command LIST <directory> does not work when
the directory name contains blank characters.

Here is an example session, where a direcory "Test 1" with three
files test2, test3, test4 exists.

# ftp localhost
Connected to localhost.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
[...]
220 You will be disconnected after 15 minutes of inactivity.
Name (localhost:root): user
331 User user OK. Password required
Password:
230 OK. Current directory is /home/user
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir "Test 1"
200 PORT command successful
150 Connecting to port 58344
226-Options: -l
226 0 matches total
ftp> dir "Test*1"
200 PORT command successful
150 Connecting to port 38561
-rw-r--r--    1 user   user          0 Jul 24 11:12 test2
-rw-r--r--    1 user   user          0 Jul 24 11:12 test3
-rw-r--r--    1 user   user          0 Jul 24 11:12 test4
226-Options: -l
226 3 matches total
ftp> exit
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.


The output of strace shows that pure-ftpd treats "Test 1" as
two separate directories.

7003  read(6, "LIST Test 1\r\n", 4112)  = 13
7003  connect(10, {sa_family=AF_INET, sin_port=htons(36000), 
sin_addr=inet_addr("127.0.0.1")}, 16) = 0
7003  setsockopt(10, SOL_IP, IP_TOS, [8], 4) = 0
7003  setsockopt(10, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
7003  alarm(86400)                      = 1800
7003  write(6, "150 Connecting to port 36000\r\n", 30) = 30
7003  alarm(17)                         = 86400
7003  lstat("Test", 0x7fffb07b20e0)     = -1 ENOENT (No such file or directory)
7003  alarm(0)                          = 17
7003  alarm(17)                         = 0
7003  lstat("1", 0x7fffb07b20e0)        = -1 ENOENT (No such file or directory)
7003  alarm(0)                          = 17
7003  close(10)                         = 0
7003  close(10)                         = -1 EBADF (Bad file descriptor)
7003  chdir("/")                        = 0
7003  write(6, "226-Options: -l \r\n226 0 matches "..., 39) = 39


The same bug is also present in the current squeeze pure-ftpd
package (verion 1.0.36-1).

Best regards,
Harald


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to