Bug 20236

Summary: fetch(1) on 4.1 requires MDTM
Product: Base System Reporter: taguchi <taguchi>
Component: binAssignee: Dag-Erling Smørgrav <des>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description taguchi 2000-07-28 10:00:00 UTC
Since 4.1R, fetch requires MTDM supports to ftpd.
Because in /usr/src/lib/libfetch/ftp.c:

static int
_ftp_stat(int cd, char *file, struct url_stat *us)
{
                ......
   if ((e = _ftp_cmd(cd, "MDTM %s", s)) != FTP_FILE_STATUS) {
	_ftp_seterr(e);
	return -1; /* HERE!! */
   }
                ......
}

So if ftpd does not support MTDM, then connection will be
closed.

MTDM is NOT RFC yet.
And some ftpds do NOT support MTDM.
Such as Solaris2.8's one, and MS ftpd version4.
This means fetch(1) on 4.1R can not talk them!

Fix: 

Sorry, I can't make patch.

I think

   if ((e = _ftp_cmd(cd, "MDTM %s", s)) != FTP_FILE_STATUS) {
	/* _ftp_seterr(e);
	return -1;  */
             ln = "000000000000"; /* or more better value */
   }

may be work.... Is this correct?
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-07-28 10:42:43 UTC
Responsible Changed
From-To: freebsd-bugs->des

Over to the maintainer.
Comment 2 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2000-07-28 11:36:19 UTC
State Changed
From-To: open->closed

Already fixed.