From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Tue, 2 Dec 2008 20:36:27 -0500 From: "Dan Cross" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: <1aac8590e5d726419683d3f01a9d11f1@quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1aac8590e5d726419683d3f01a9d11f1@quanstro.net> Subject: Re: [9fans] How to implement a moral equivalent of automounter in Plan9? Topicbox-Message-UUID: 56cf9de6-ead4-11e9-9d60-3106f5b1d025 On Tue, Dec 2, 2008 at 7:07 PM, erik quanstrom wrote: > currently one can prevent external changes to a > namespace by creating a unique ns with rfork. > if /proc/$pid/ns were writable, one would not not > be possible without yet another mechanism. chmod? I guess it comes back to, "How do you define external." If you mean another process owned by the same user, then it breaks down (hello trojan horse). There are many things that would be *possible* with /proc, some of them ill advised. For instance, why can't I 'mkdir /proc/n/' and have it create a new process? I can think of a number of potential reasons, one of the most obvious ones is 'how do I choose n'; something more reasonable would probable be a /proc/ctl or /proc/fork or /proc/new or something that, when read, gives me a file directory name corresponding to a new process in some 'new' state. Maybe copying a binary onto /proc/n/text would and writing 'go' would be the moral equivalent of a 'spawn'-like call. Who knows. I guess the point is, "what does that *mean*?" Ie, it would fundamentally change the process model from something fork-based to something radically different. Is that good? Is that bad? Beats me. I'm not sure it's worth exploring. I suspect opening up /proc/n/ns for tinkering would be similar. As Russ says, no one's felt motivated to do it. There's no good reason you can't explore it, but you may find it isn't as cool as you'd originally hoped. An aside: One of the nice things about Plan 9 is that a lot of the things you sort of have to work around in Unix just work in Plan 9. They applied a few fundamental principles aggressively and in so fixed a lot of warts that had begun to glare on Unix as it aged. I can see the utility of an autofs-like thing, but I wouldn't get too wrapped up in the semantics of making it look like Unix; that's not a profitable thing in this environment, since this environment *is* different. It's funny, the feeling you described when talking about the Sun intranet is exactly how I felt when first working with plan 9. That being said, one of the biggest challenges the Linux/Unix community faces these days is a mental entrenchment and clinging to bad technology because "that's the way it's always been." The Plan 9 community should work hard to make sure that doesn't happen to it. - Dan C.