From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 14 05:38:03 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63C05101 for ; Fri, 14 Feb 2014 05:38:03 +0000 (UTC) Received: from mail-oa0-f48.google.com (mail-oa0-f48.google.com [209.85.219.48]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2406010CA for ; Fri, 14 Feb 2014 05:38:02 +0000 (UTC) Received: by mail-oa0-f48.google.com with SMTP id l6so13988267oag.35 for ; Thu, 13 Feb 2014 21:37:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=4QWLzZORTjSAzfx9gnB5cJwJfYlDR8w1xYs0PgB7HoI=; b=dW43OXdrjraSsrd1cKA+BE8Kz1+C+AgFkOkfbsUGIyqlTwbWXJOrcpr+isTAp+eNqV TNGrDoPXPi6P6mfMy1WC3cPawk8fazzx2Ny97fFG8bZ00SR4Nnl6YwfhFhHiohtyekBj 07jMgU5nSnLy40348OT3WWFghYYic7KviMLf1LfQns6U2VL+f6de+MlmgN6uylWaeQRP X58zGQDbcbWkn3GU7uK7QbmlXKsmN/My/oEA2rKTaeKWx4I+qMyXY/kpUNP0it+A+0Qx cbjO8DVKJ7RtuCF/3NHAkXJ5GIpFBFHSrgoFWf8Oo6EAv/dYBte1peslJDBt82MTNLtA AKhQ== X-Gm-Message-State: ALoCoQmXcvxGXrawZmRrymW796TEgpJTAQTJnlcK76GbWWDJSEWjfBhTfQou/AzgxE19jvF2XPmB X-Received: by 10.60.231.194 with SMTP id ti2mr4776993oec.41.1392356276289; Thu, 13 Feb 2014 21:37:56 -0800 (PST) Received: from [172.21.0.93] (67-198-60-238.static.grandenetworks.net. [67.198.60.238]) by mx.google.com with ESMTPSA id tr7sm29054794oec.0.2014.02.13.21.37.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Feb 2014 21:37:50 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: Thoughts on Multi-Symlink Concept From: Jim Thompson In-Reply-To: Date: Thu, 13 Feb 2014 23:37:49 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <40637D5C-EBBB-49C0-BE82-BA644C32D778@netgate.com> References: To: Jordan Hubbard X-Mailer: Apple Mail (2.1827) Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 05:38:03 -0000 On Feb 12, 2014, at 11:17 PM, Jordan Hubbard = wrote: >=20 > On Feb 12, 2014, at 9:08 PM, Jordan Hubbard = wrote: >=20 >> Globbing is done in user land (by the shell) - you wouldn=92t want to = push that down into the kernel, which is either what you=92d have to do = or you=92d need a user land daemon which did round-trips with the kernel = to do the translation, which would also need to make sure to get all of = the process permission stuff right since the user id / gid / $CWD would = all potentially affect the expansion of the =93symlink=94. >=20 > Actually, just to correct myself, there is a third way, which is that = you could make the shell also do the expansion of the symlink (or = interpose it into libc), but now you=92d just be stacking one weird hack = on top of another weird hack. It=92s still not a good idea for all the = reasons I mentioned, at least not as a =93symlink=94. Maybe some new = type of shell builtin, though I=92m not sure how/where you=92d use it. There is a fourth way. Just embed a (call to a) shell script in the = symlink. If Pyramid=92s conditional symbolic links were the computed = goto of the filesystem, and variant symlinks are a modern .. er=85 = variant of same, =20 then embedding a call to an external program has to be the = Turing-complete =85 er=85 variant. amiright? What could go wrong? :-) OK, seriously.. once upon a time there was an OS named Mach. It had = the concept of a name server. Pathname resolution worked like this: consider /mnt/readme.txt where /mnt is a mounted filesystem. =95 libc asks the root filesystem server about /mnt/readme.txt. =95 The root filesystem returns a port to the mnt filesystem = server (matching /mnt) and the retry name /readme.txt. =95 libc asks the mnt filesystem server about /readme.txt. =95 The mnt filesystem server returns a port to itself and = records that this port refers to the regular file /readme.txt. While a regular filesystem server will just serve the data as stored in = a filesystem on disk, on Mach there can be servers providing purely = virtual information, or a mixture of both. In Mach-land, it is up to the server to behave and provide consistent = and useful data on each remote procedure call. If it does not, the = results may not match the expectations of the user and confuse him. You are lost in a maze of twisty little filesystems, all alike=85. OK, more seriously. This seems straight-forward to implement via FUSE. You might look at = fsfipl & filterFS http://sourceforge.net/projects/fsfipi/ http://filterfs.sourceforge.net.=