Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!gatech!bloom-beacon!think!ames!oliveb!sun!rose!nowicki From: nowicki%rose@Sun.COM (Bill Nowicki) Newsgroups: comp.bugs.4bsd Subject: FTP Daemon has trouble with bad rename commands Message-ID: <23545@sun.uucp> Date: Wed, 15-Jul-87 15:37:26 EDT Article-I.D.: sun.23545 Posted: Wed Jul 15 15:37:26 1987 Date-Received: Fri, 17-Jul-87 07:27:24 EDT Sender: news@sun.uucp Lines: 39 Keywords: FTP, ftpd, rename Index: etc/ftpd/ftpcmd.y 4.3BSD Description: If a rename command is given to the FTP daemon with an invalid first file name, the parser gets confused and refuses to accept any more commands. Repeat-By: Try a rename command with a bogus file name: . . . 230 User nowicki logged in. ftp> rename foo bar ---> RNFR foo 550 foo: No such file or directory. ftp> binary ---> TYPE I 500 'TYPE I': command not understood. ftp> dir ---> PORT 192,9,90,58,4,243 421 Service not available, remote server has closed connection Fix: Just add the case of a rename_from (RNFR) command by itself to the YACC grammar (ftpcmd.y): *************** *** 254,259 **** --- 254,260 ---- free((char *) $4); } | rename_cmd + | rename_from | HELP CRLF = { help((char *) 0);