Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2001 02:31:17 +0900
From:      "Eugene M. Kim" <ab@astralblue.net>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: ftpd weirdness; CWD/RETR/... handles {} specially?
Message-ID:  <20010709023117.A41476@the-7.net>
In-Reply-To: <200107081650.SAA75246@lurza.secnetix.de>; from olli@secnetix.de on Sun, Jul 08, 2001 at 06:50:05PM %2B0200
References:  <20010709005808.A41058@the-7.net> <200107081650.SAA75246@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 08, 2001 at 06:50:05PM +0200, Oliver Fromme wrote:
> Eugene M. Kim <ab@astralblue.net> wrote:
>  > On Sun, Jul 08, 2001 at 05:33:23PM +0200, Oliver Fromme wrote:
>  > > Note that shell globbing is only performed on LIST.
>  > > I just tried -- CWD and RETR don't expand them.
>  > [...]
>  > ftp> cd /roo?
>  > ---> CWD /roo?
>  > 250 CWD command successful.
>  > ftp> pwd
>  > ---> PWD
>  > 257 "/root" is current directory.
> 
> I get this:
> 
> ftp> cd /roo?
> ---> CWD /roo?
> 550 /roo?: No such file or directory.
> 
> (There is, of course, a directory /root.)
> 
> This is the ftpd(8) from 4.3-Release.  If the behaviour
> changed in 4-stable after 4.3-Release, then that's a
> serious incopatibility indeed.  It should be backouted
> immediately.

It is strange.  There's nothing related to the problem committed to
4-stable after 4.3-release (according to the cvsweb on www.freebsd.org).

> 
> In particular, globbing upon RETR is _definitely_ not
> the job of the server.  That's what the clients' mget
> command is for (which sends an NLST, then performs
> globbing on the client side, and then uses RETR to get
> the actual files).  Globbing upon CWD could be subject
> to discussion, but at least it should be an option that
> defaults to off.

At this moment, the globbing feature does almost nothing that the
globbing itself was intended for; it just returns the `550 ambiguous'
error when more than one entry match the glob pattern, e.g.  CWD /*.
After all, a single RETR/STOR/CWD command is designed to be used on a
single file or directory.  IMO the globbing can be thought as nothing
other than a convenient shorthand (i.e. we can do /usr/src/sbin/merge*),
and if it is the only reason I'd say we move the globbing feature
entirely to the client side.

And actually the globbing is done at the yacc level so *all* on-the-wire
pathnames are subject to globbing (see the pathstring-to-pathname
production in ftpcmd.y), which is just gross.

Eugene

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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