From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 1 Dec 2008 10:25:09 -0800 From: "Roman V. Shaposhnik" In-reply-to: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-id: <1228155909.18951.33.camel@goose.sun.com> MIME-version: 1.0 Content-type: text/plain Content-transfer-encoding: 7BIT References: <1FAD6133-18F8-444F-BD6E-795999DE3170@sun.com> Subject: Re: [9fans] How to implement a moral equivalent of automounter in Plan9? Topicbox-Message-UUID: 5524c11a-ead4-11e9-9d60-3106f5b1d025 On Mon, 2008-12-01 at 09:48 -0800, Russ Cox wrote: > The automounter is symptomatic of an ill that Plan 9 has cured. > Since adding to the name space requires no special privileges, > ordinary users can mount the servers they want to use directly, > instead of needing a privileged daemon to guess their intent and > mount servers on demand. In Plan 9, scripts that care to use > a particular server simply put "9fs server" in their script. Russ, could, you please be a tad more specific as to what ill exactly are you referring to? While I agree that Plan9 completely removes the need for automounter to be a privileged application, I still don't see an easy way (expect may be bns and adsrv) to have that other property of automounter being easily implemented within Plan9 framework. The property I'm talking about is the ability of an external program to manage my namespace for me. Perhaps in response to some of my actions, or simply based on some set of rules. > One could write a user-level server that interposes on exportfs, > and if it sees a failed walk of "name" in the root, runs "9fs name" > and resends the walk, That's very similar to what I referred to as a "synthetic filesystem doing the right stuff". But as I pointed out in my original email this approach has a downside of never exporting these mounts into the namespace of the process that caused them. > but that could only work for a single user: > in general, mounting requires authentication, so hiding the mounting > requires hiding the authentication. This is easy if you're only worried > about one user--just use that user's factotum--but not really possible > when there are multiple users involved. In that case, automatic > mounting takes control of authentication away from the users. I guess I'm not quite following you here. What I'm talking about is a per-process modifications of namespace by some external agent (be it kernel driver or userspace application). As such it is not at all different from a user issuing something like "9fs name" directly. Could you, please, elaborate what exact multi-user scenario do you have in mind? Thanks, Roman. P.S. I have always wanted to be able to trade namespaces between different processes the same way file descriptors get traded using #s. On the other hand, I have never ever possessed enough insight into the overall ramification of such idea to really judge it as good or bad. If others have thought about the same thing -- I would appreciate the feedback. Now off to take a look at bns and adsrv...