Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Sep 2001 06:00:32 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "Brian F. Feldman" <green@FreeBSD.ORG>
Cc:        "Steve O'Hara-Smith" <steveo@eircom.net>, David Wolfskill <david@catwhisker.org>, <current@FreeBSD.ORG>
Subject:   Re: symlink(2) [Was: Re: tcsh.cat] 
Message-ID:  <20010901055331.C5355-100000@besplex.bde.org>
In-Reply-To: <200108311836.f7VIaog15767@green.bikeshed.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 31 Aug 2001, Brian F. Feldman wrote:

> Bruce Evans <bde@zeta.org.au> wrote:
> > On Fri, 31 Aug 2001, Brian F. Feldman wrote:
> >
> > > Bruce Evans <bde@zeta.org.au> 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




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