Re: [PATCH] private mounts
From: Bodo Eggert <harvested.in.lkml@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon Apr 25 2005 - 10:43:34 EST
Jan Hudec <bulb@xxxxxx> wrote:
> On Mon, Apr 25, 2005 at 11:58:50 +0200, Miklos Szeredi wrote:
>> How do you bind mount it from a different namespace? You _do_ need
>> bind mount, since a new mount might require password input, etc...
>
> Yes, I would need one thing from kernel. That one thing would be to
> mount bind a directory handle, instead of path.
>
> And if you wonder how I get the handle, that's what SCM_RIGHTS message
> of unix-domain sockets is for.
You'll need something to get the FD from. What will that be if the mount
was done from a subshell of the midnight commander run in a screen session?
What about X sessions? Open a xterm, do the mount and then do what to get
the mount working for the programs run from the window manager?
Relogin? The xterm with the mount will be gone.
Use a daemon to keep an additional reference to the namespace? That's UGLY.
With attachable namespaces, the whole thing should be as simple as
(pseudocode)
mknamespace -p users/$UID # (like mkdir -p)
setnamespace users/$UID # (like cd)
Optionally, the namespaces and their private mounts might be scheduled to
be removed if the last user is gone, or they need to be persistent,
depending on the applicaton (e.g. ssh used as rexec or shared mounts).
--
Remember, a retreating enemy is probably just falling back and regrouping.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/