From owner-freebsd-current Mon Jun 18 8:54:15 2001 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 86EBF37B403 for ; Mon, 18 Jun 2001 08:54:06 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id LAA56935; Mon, 18 Jun 2001 11:53:59 -0400 (EDT) (envelope-from wollman) Date: Mon, 18 Jun 2001 11:53:59 -0400 (EDT) From: Garrett Wollman Message-Id: <200106181553.LAA56935@khavrinen.lcs.mit.edu> To: Bruce Evans Cc: current@FreeBSD.ORG, FreeBSD-standards@bostonradio.org Subject: Re: Ok, try this patch. (was Re: symlink(2) [Was: Re: tcsh.cat]) In-Reply-To: References: <200106180149.f5I1nma09752@earth.backplane.com> 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: > 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 -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message