From owner-freebsd-current Fri Aug 31 13: 0:50 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 20D2C37B401; Fri, 31 Aug 2001 13:00:47 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id GAA07709; Sat, 1 Sep 2001 06:00:44 +1000 Date: Sat, 1 Sep 2001 06:00:32 +1000 (EST) From: Bruce Evans X-X-Sender: To: "Brian F. Feldman" Cc: "Steve O'Hara-Smith" , David Wolfskill , Subject: Re: symlink(2) [Was: Re: tcsh.cat] In-Reply-To: <200108311836.f7VIaog15767@green.bikeshed.org> Message-ID: <20010901055331.C5355-100000@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Fri, 31 Aug 2001, Brian F. Feldman wrote: > Bruce Evans wrote: > > On Fri, 31 Aug 2001, Brian F. Feldman wrote: > > > > > Bruce Evans wrote: > > > > Here's an example of a standard utility being clueless about symlinks to > > > > nothing: > > > > > > > > $ ln -s '' foo > > > > $ cp foo bar > > > > cp: foo is a directory (not copied) > > > > > > > > foo is certainly not a directory. The bug seems to be in fts. > > > > > > No, "foo" certainly _is_ a directory. It is precisely the same thing as > > > ".". > > > > No, the empty pathname has been invalid and not an alias for "." since at > > least the first version of POSIX. > > I didn't read the rest of the thread til later ;) The fact remains that > FreeBSD interprets it as such in namei(), and is it not an undefined > behavior according to POSIX? See Garrett's reply. The empty pathname is certainly invalid when passed from userland, but POSIX apparently requires it to "work" when it came from a symlink to "". I concluded the rest of the thread that the POSIX spec is natural, what a lot of namei()'s do, and wrong. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message