From owner-freebsd-current Tue Feb 4 9:52:32 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CDB737B401 for ; Tue, 4 Feb 2003 09:52:31 -0800 (PST) Received: from comp.chem.msu.su (comp-ext.chem.msu.su [158.250.32.157]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82EBE43F43 for ; Tue, 4 Feb 2003 09:52:29 -0800 (PST) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.3/8.12.3) with ESMTP id h14HqQsA037436; Tue, 4 Feb 2003 20:52:27 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.3/8.12.3/Submit) id h14HqPTf037435; Tue, 4 Feb 2003 20:52:25 +0300 (MSK) (envelope-from yar) Date: Tue, 4 Feb 2003 20:52:25 +0300 From: Yar Tikhiy To: Mike Heffner Cc: David Rhodus , freebsd-current@FreeBSD.ORG Subject: Re: ftpd mkdir problems Message-ID: <20030204175224.GB34907@comp.chem.msu.su> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Feb 04, 2003 at 03:05:31AM -0500, Mike Heffner wrote: > > On 31-Jan-2003 David Rhodus wrote: > | Using the default ftpd that comes with FreeBSD, in the mkdir command, > | why doesn't it expand '~', the cd and rmdir commands seem to. Passing > | over the code it just calls the c function with should expand it. > > No, the system calls don't expand a tilde. The expansion is done in > ftpcmd.y under the 'pathname' directive using glob(3), but glob(3) won't > expand the tilde when the directory doesn't exist. Lukemftpd works around > this by implementing its own '~' expansion code. Yar has been working on > ftpd recently, you might want to ask him if he has any plans to address > this. I've got inspiration to fix this bug in CURRENT today :-) Would everyone concerned mind testing my change to ftpd(8) and giving me your feedback? Thanks. > | ftp> cd ~will > | 250 CWD command successful. > | ftp> mkdir ~will/test > | 550 ~will/test: No such file or directory. > | ftp> mkdir test > | 257 "test" directory created. > | ftp> rmdir ~will/test > | 250 RMD command successful. > | ftp> -- Yar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message