Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Aug 2002 16:42:12 +0400
From:      Yar Tikhiy <yar@FreeBSD.org>
To:        Ruslan Ermilov <ru@FreeBSD.org>
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>
In-Reply-To: <20020801065112.GB67507@sunbay.com>; from ru@FreeBSD.org on Thu, Aug 01, 2002 at 09:51:12AM %2B0300
References:  <200207311104.g6VB4htZ013835@freefall.freebsd.org> <20020801065112.GB67507@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020801164212.A54038>