From owner-freebsd-current Mon Jun 18 10:46:33 2001 Delivered-To: freebsd-current@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 661FA37B403 for ; Mon, 18 Jun 2001 10:46:30 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.3/8.11.2) id f5IHkRE16410; Mon, 18 Jun 2001 10:46:27 -0700 (PDT) (envelope-from dillon) Date: Mon, 18 Jun 2001 10:46:27 -0700 (PDT) From: Matt Dillon Message-Id: <200106181746.f5IHkRE16410@earth.backplane.com> To: Garrett Wollman Cc: "Andrey A. Chernov" , current@FreeBSD.ORG, FreeBSD-standards@bostonradio.org Subject: Re: Ok, try this patch. (was Re: symlink(2) [Was: Re: tcsh.cat]) References: <200106180149.f5I1nma09752@earth.backplane.com> <200106181553.LAA56935@khavrinen.lcs.mit.edu> <20010618205944.A6595@nagual.pp.ru> <200106181722.NAA57757@khavrinen.lcs.mit.edu> <20010618213516.A7179@nagual.pp.ru> <200106181740.NAA58004@khavrinen.lcs.mit.edu> 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 :< said: : :>> > ./foo/ .// :>> > ./foo/bar .//bar :>> :>> No, because the ``resulting filename'' begins with a slash. : :> It seems resulting filename (pathname?) begins with "./" (not a slash). : :No, it doesn't. The ``resulting filename'' is "/" in the first case, :and "/bar" in the second case. Both begin with a slash, and so are :resolved relative to the root. There is no "./" involved anywhere in :the process. : :The value of the symbolic link is not somehow inserted into the path :being resolved. Once a symbolic link is encountered, pathname :resolution *starts over* with the last directory searched in the old :path used as the current working directory. : :-GAWollman Right, and since "" is an illegal path name... In anycase, I can't imagine that POSIX actually intended null symlinks to act in any particular way, and obviously they are cause for a great deal of confusion, and I don't know a single person who uses a null symlink on purpose. So I say we simply disallow them, hence the patch. If someone wants a symlink to point to / they can make it point to "/". If someone wants a symlink to point to the current directory they can make it point to ".". -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message