From owner-cvs-all Thu Aug 1 5:48:58 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5BA837B41A; Thu, 1 Aug 2002 05:48:30 -0700 (PDT) Received: from comp.chem.msu.su (comp-ext.chem.msu.su [158.250.32.157]) by mx1.FreeBSD.org (Postfix) with ESMTP id C64134441D; Thu, 1 Aug 2002 05:42:44 -0700 (PDT) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.11.6/8.11.6) id g71CgCg60652; Thu, 1 Aug 2002 16:42:12 +0400 (MSD) (envelope-from yar) Date: Thu, 1 Aug 2002 16:42:12 +0400 From: Yar Tikhiy To: Ruslan Ermilov Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/libexec/ftpd ftpd.c Message-ID: <20020801164212.A54038@comp.chem.msu.su> References: <200207311104.g6VB4htZ013835@freefall.freebsd.org> <20020801065112.GB67507@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020801065112.GB67507@sunbay.com>; from ru@FreeBSD.org on Thu, Aug 01, 2002 at 09:51:12AM +0300 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi Ruslan, On Thu, Aug 01, 2002 at 09:51:12AM +0300, Ruslan Ermilov wrote: > > Is there a way to make ftpd(8) CWD into a dir with the \0xff character in > its name? I can't find anywhere in standards why this does not work. I > have verified this does not work with both ftpd(8) and lukemftpd(8). I'm afraid it's not solely an ftpd(8) problem--it's ftp(1) that is to blame for it as well. According to RFC 959, the FTP control connection must follow the Telnet protocol. The \0xff character is IAC, "Interpret as Command", in Telnet, and it must be doubled to be sent as data. Currently, both ftpd(8) and ftp(1) don't escape outgoing \0xff characters at all while interpreting incoming IACs. That's the root of the evil. The situation becomes even more complicated granted ftpd(8) may call external programs (e.g., /bin/ls; its internal version mades little difference as to this issue) that have no notion of Telnet. Unfortunately, the above also applies to the lukem* versions, as well as to a number of other FTP implementations (e.g., ProFTPD.) The particular CWD problem has obviously to do with ftp(1). Just try to double \0xff in the command argument. P.S. Curiously enough, I can see no open PR on this issue. -- Yar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message