From owner-freebsd-current Mon Jun 18 10: 0: 8 2001 Delivered-To: freebsd-current@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id E2A4437B403 for ; Mon, 18 Jun 2001 10:00:04 -0700 (PDT) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.11.4/8.11.4) id f5IGxkk06886; Mon, 18 Jun 2001 20:59:46 +0400 (MSD) (envelope-from ache) Date: Mon, 18 Jun 2001 20:59:45 +0400 From: "Andrey A. Chernov" To: Garrett Wollman Cc: Bruce Evans , current@FreeBSD.ORG, FreeBSD-standards@bostonradio.org Subject: Re: Ok, try this patch. (was Re: symlink(2) [Was: Re: tcsh.cat]) Message-ID: <20010618205944.A6595@nagual.pp.ru> References: <200106180149.f5I1nma09752@earth.backplane.com> <200106181553.LAA56935@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200106181553.LAA56935@khavrinen.lcs.mit.edu>; from wollman@khavrinen.lcs.mit.edu on Mon, Jun 18, 2001 at 11:53:59AM -0400 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 Mon, Jun 18, 2001 at 11:53:59 -0400, Garrett Wollman wrote: > < said: > > > NetBSD committed essentially this patch 4 years ago (as part of rev.1.23). > > I like it, except it seems to be incompatible with POSIX.1-200x. > > I think I agree with your interpretation. Quoting from XBDd7, page > 101, lines 3153ff: > > # In all other cases, the system shall prefix the remaining pathname, > # if any, with the contents of the symbolic link. [...] [T]he > # resolved pathname shall be the resolution of the pathname just > # created. If the resulting pathname does not begin with a slash, the > # predecessor of the first filename of the pathname is taken to be the > # directory containing the symbolic link. > > So, if we have a symbolic link ``foo'' with contents ``'' (i.e., the > empty string): > > Pathname Resolves to > ./foo ./foo (i.e., the link itself), iff condition 3 > on lines 3151-2 is met; otherwise [ENOENT] > ./foo/ / > ./foo/bar /bar > Maybe it is just my bad English understanding, but it seems last two cases must be ./foo/ .// ./foo/bar .//bar per POSIX (i.e. "the predecessor of the first filename of the pathname is taken" since the symlink itself is filename too). -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message