Bug 178440 - ftp directory listing gives parse error
ftp directory listing gives parse error
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: mc (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-20 11:38 EST by Radek Bíba
Modified: 2013-07-02 19:13 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-27 16:46:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Radek Bíba 2006-01-20 11:38:32 EST
Description of problem:
If a directory on an FTP server contains a file or directory whose name begins
with a number that looks like a year, mc thinks it's the year of mtime and takes
the rest as name, which results in an invalid and unusable item in the directory
listing.

Version-Release number of selected component (if applicable):
mc-4.6.1a-4.FC4

How reproducible:
Always

Steps to Reproduce:
1. on an FTP server: touch "2000 a"
2. on local host: run mc, cd /#ftp:USER@HOST, go to the directory with the
'specially crafted' file name and scroll down to see it (if necessary)
  
Actual results:
You'll see a file named 'a' with mtime set to current day and month but year
2000. Additionally, it won't be possible to copy this file because it really
doesn't exist on the server as 'a'.

It's similar if you create a directory with name like `YYYY something'.

Expected results:
Well, guess what... :)

Additional info:
It seems to me like it's confused by the output from server which looks like:
-rw-rw-r--    1 500      500             0 Jan 20 16:35 2000 a
and there is a bug in mc's mtime parsing code.
Comment 1 Leonard den Ottolander 2006-02-01 12:04:49 EST
This is now fixed in CVS. We do not longer attempt to parse more than 3 date
elements.
Comment 2 Jindrich Novy 2006-02-02 12:00:54 EST
Hi Leonard, unfortunately I cannot find any fix for this in the CVS commit
history in upstream CVS for ftpfs.c. Is the fix for this present elsewhere?
Comment 4 Radek Bíba 2006-02-28 09:32:13 EST
Indeed, mc from upstream cvs behaves as expected. Hopefully the fix will make it
into a future update in FC, along with some more important fixes.

Thanks Leonard.

Note You need to log in before you can comment on or make changes to this bug.