Messages in this thread | | | From | Bryan Donlan <> | Date | Thu, 17 Dec 2009 14:53:00 -0500 | Subject | Re: Network isolation with RLIMIT_NETWORK, cont'd. |
| |
On Thu, Dec 17, 2009 at 2:35 PM, Bernie Innocenti <bernie@codewiz.org> wrote: > On Thu, 2009-12-17 at 13:24 -0500, Bryan Donlan wrote: >> Can this be done using openat() and friends currently? It would seem >> the natural way to implement this; open /proc/(pid)/root, then >> openat() things from there (or even chdir to it and see the mounts >> that it sees from there...) > > Yeah, but /proc/<pid>/root is just a symlink. It's correct for chroots, > but I doubt it can be meaningful for per-process namespaces.
The files in /proc/<pid>/fs are 'just symlinks', but opening them can provide access to objects (eg, deleted files) not accessible through the normal filesystem namespace. I see no reason, API-wise, why /proc/<pid>/root couldn't be extended similarly - but I've not looked at the namespaces implementation, so maybe there's some reason it'd be difficult to implement...
| |