Subject: Two bugs in FTPD (#156) Index: etc/ftpd/ftpd.c 2.11BSD Description: There are two bugs in the FTP Daemon. One of these causes some FTP clients to hang during an ASCII mode transfer of files with bare newlines. The second is a cosmetic/aesthetic bug - the number of bare linefeeds is wrong. Repeat-By: Transfer a file in ASCII mode from using a TGV client on a VMS system to a 2.11BSD FTP server. Note that the dialogue is as indicated below and the transfer hangs: 230- WARNING 0 bare linefeeds received in ASCII mode File may not have transferred correctly. 226 Transfer completed. The problem is that the code 230- doesn't match 226 and it needs to. See RFC959 starting around the bottom of page 35. This bug exists in the FTP Daemon in 4.3BSD, the WUSTL enhanced FTPD, 4.3Reno and 4.4BSD. The second (and less serious) problem is the '0' (count of newlines). There was a missing parameter in the call to 'lreply()'. Fix: Apply the patch below. Then recompile and install the FTP Daemon. Thanks to Billy Youdelman [billy@mix.com] (who talked with Ken Adelman of TGV) for pinpointing the problem. =========================================================== *** /usr/src/etc/ftpd/ftpd.c.old Mon Jan 18 08:46:41 1993 --- /usr/src/etc/ftpd/ftpd.c Thu Nov 11 20:46:02 1993 *************** *** 872,878 **** goto file_err; transflag = 0; if (bare_lfs) { ! lreply(230, "WARNING! %d bare linefeeds received in ASCII mode"); printf(" File may not have transferred correctly.\r\n"); } return (0); --- 872,878 ---- goto file_err; transflag = 0; if (bare_lfs) { ! lreply(226, "WARNING! %d bare linefeeds received in ASCII mode", bare_lfs); printf(" File may not have transferred correctly.\r\n"); } return (0);