Bug 8225

Summary: ncftp reports incorrect file timestamps for Microsoft FTP 4.0 servers
Product: [Retired] Red Hat Linux Reporter: Rob McMillin <rlm>
Component: ncftpAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: mgleason
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: ftp://ftp.quantum.com
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-01-06 16:56:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rob McMillin 2000-01-06 04:53:21 UTC
ncftp seems to report incorrect file timestamps for Microsoft FTP servers,
in particular, Microsoft FTP Service Version 4.0 (IIS under WinNT?). The
time reported is several months in the future. The regular ftp client
reports the correct time.

Following is a sample.

[rlm@www rlm]$ ncftp ftp://ftp.quantum.com
NcFTP 3.0.0 beta 19 (June 11, 1999) by Mike Gleason.
Connecting to
204.212.103.137...
service Microsoft FTP Service (Version 4.0).
Logging
in...
Anonymous user logged in.
Logged in to
ftp.quantum.com.
Current remote directory is /.
ncftp / > ls
Disk_Firmware/     Tape_Firmware/     Utilities/         h_group/
ncftp / > ls -l
d---------   1 ftpuser  ftpusers            0 Sep  6 08:15 Disk_Firmware
d---------   1 ftpuser  ftpusers            0 Jan 24  2000 Tape_Firmware
d---------   1 ftpuser  ftpusers            0 Mar  5  2000 Utilities
d---------   1 ftpuser  ftpusers            0 Feb 20  2000 h_group
ncftp / > quit



        Thank you for using NcFTP.
        Ask your system administrator to try NcFTPd Server!
        http://www.ncftp.com



[rlm@www rlm]$ ftp ftp.quantum.com
Connected to service.quantum.com.
220 service Microsoft FTP Service (Version 4.0).
Name (ftp.quantum.com:rlm): anonymous
331 Anonymous access allowed, send identity (e-mail name) as password.
Password:
230 Anonymous user logged in.
Remote system type is Windows_NT.
ftp> ls -l
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
07-06-99  08:15AM       <DIR>          Disk_Firmware
12-20-99  03:35PM       <DIR>          h_group
11-24-99  03:27PM       <DIR>          Tape_Firmware
01-05-00  03:25PM       <DIR>          Utilities
226 Transfer complete.
ftp> quit
221

Comment 1 Mike Gleason 2000-01-06 07:58:59 UTC
I can confirm that bug which includes betas up through beta 21.  Since I may
not be getting beta 22 finished soon enough, here is a quick patch to apply to
the libncftp/glob.c source file:

*** glob.c	Thu Jan  6 01:44:38 2000
--- glob.c.new	Thu Jan  6 01:44:52 2000
***************
*** 208,214 ****
  		(void) memset(&ftm, 0, sizeof(struct tm));
  		ftm.tm_isdst = -1;
  		cp[2] = '\0';
! 		ftm.tm_mon = atoi(cp + 0) + 1;
  		cp[5] = '\0';
  		ftm.tm_mday = atoi(cp + 3);
  		cp[8] = '\0';
--- 208,214 ----
  		(void) memset(&ftm, 0, sizeof(struct tm));
  		ftm.tm_isdst = -1;
  		cp[2] = '\0';
! 		ftm.tm_mon = atoi(cp + 0) - 1;
  		cp[5] = '\0';
  		ftm.tm_mday = atoi(cp + 3);
  		cp[8] = '\0';

Comment 2 Jeff Johnson 2000-01-06 16:56:59 UTC
Fixed in ncftp-3.0beta21-2. Thanks for the patch.