From owner-freebsd-stable Sun Jul 8 10:31:22 2001 Delivered-To: freebsd-stable@freebsd.org Received: from the-7.net (the-7.net [211.232.190.152]) by hub.freebsd.org (Postfix) with ESMTP id 3AB4E37B403 for ; Sun, 8 Jul 2001 10:31:19 -0700 (PDT) (envelope-from ab@the-7.net) Received: (from ab@localhost) by the-7.net (8.11.3/8.11.3) id f68HVHx41517 for freebsd-stable@FreeBSD.ORG; Mon, 9 Jul 2001 02:31:17 +0900 (KST) (envelope-from ab) Date: Mon, 9 Jul 2001 02:31:17 +0900 From: "Eugene M. Kim" To: freebsd-stable@FreeBSD.ORG Subject: Re: ftpd weirdness; CWD/RETR/... handles {} specially? Message-ID: <20010709023117.A41476@the-7.net> Reply-To: freebsd-stable@FreeBSD.ORG, "Eugene M. Kim" References: <20010709005808.A41058@the-7.net> <200107081650.SAA75246@lurza.secnetix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200107081650.SAA75246@lurza.secnetix.de>; from olli@secnetix.de on Sun, Jul 08, 2001 at 06:50:05PM +0200 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Jul 08, 2001 at 06:50:05PM +0200, Oliver Fromme wrote: > Eugene M. Kim 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