From owner-freebsd-hackers Mon Jul 6 23:28:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA06089 for freebsd-hackers-outgoing; Mon, 6 Jul 1998 23:28:26 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp02.primenet.com (daemon@smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA06083 for ; Mon, 6 Jul 1998 23:28:23 -0700 (PDT) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id XAA18452; Mon, 6 Jul 1998 23:26:10 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp02.primenet.com, id smtpd018425; Mon Jul 6 23:26:09 1998 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id XAA02268; Mon, 6 Jul 1998 23:25:57 -0700 (MST) From: Terry Lambert Message-Id: <199807070625.XAA02268@usr06.primenet.com> Subject: Re: Variant Link implementation, continued To: rivers@dignus.com (Thomas David Rivers) Date: Tue, 7 Jul 1998 06:25:57 +0000 (GMT) Cc: mike@smith.net.au, rivers@dignus.com, drosih@rpi.edu, hackers@FreeBSD.ORG, wjw@surf.IAE.nl In-Reply-To: <199807061332.JAA26291@lakes.dignus.com> from "Thomas David Rivers" at Jul 6, 98 09:32:48 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Seems reasonable... [and, nope, I don't have file names like that, > fortunately :-)]. > > However, can someone with the POSIX spec in-hand speak to the POSIX > ramifications here? I mean, if we essentially "steal" this space, > does it break any (future) POSIX conformance? Is "SOLO" good enough? Do you need specific rationale quoted? It's pretty obvious from context that the POSIX namespace doesn't apply below the system call (or library) impelementation of the POSIX interface, so long as the time update guarantees aren't affected by the implementation. The POSIX namespace escape is a dual "/" prefix. FreeBSD, of course, buggers this up, because it can't inherit the namespace escape down multiple iterations of path components; for example: //apple_hfs_semantic:rsrc/, where somepath: relative_path | absolute_path To access the resource fork of a file. This means that the escape is one path component, which is inadequate. The problem is in: 1) The use of mutual recustion to allow expansion into the path buffer (which also leads to prematurely reaching the MAXPATHLEN -- 1024 -- limit on some types of relative symlink expansion). 2) The non-opacity of the cn_pathbuf, et. al. values to the underlying FS, making it impossible to seperate an escaped lookup from an unescaped lookup. 3) The lack of a third "void *" context component for implementing various escape mechanisms. 4) The reset of the root because of the leading "/", even though it is part of the "//" token which is a namespace escape introducer. Of course, other OS's have also peed in the pool: I. Any Microsoft OS takes the "//" to mean "escape to the LanMan namespace", which is bogus as hell, since it leaves no room for other namespaces (perhaps this was their intent, but I prefer to ascribe it to stupidity). II. Intel Xenix, and similar OS's (such as PrimeOS using the Touch Communications, Inc. implementation) implementing Intel's "OpenNET", which implys the "//" to mean "escape to the OpenNET namespace" -- similarly bogus as hell. So at least we're not alone. The POSIX question boils down to whether or not you are permitted to implement a non-POSIX namespace in a POSIX system call. The technical anser is "no, but...". Because the expansion occurs at link expansion time, then the component reported to the POSIX evaluation of a path that contains a symlink that contains a variant target... is defined by the FS. This means that variant links are allowed. If you wanted to get entirely anal, you could always insist on a link target for a variant link beginning with: "//variant_link_semantic:freebsd/" But I think you can justify ommitting this prefix through the readlink(2)/symlink(2) "undefined" behaviours. After all, whose to say that the the implementation defined behaviour is not "variant links at all times". 8-). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message