Re: [RCF] [PATCH] unprivileged mount/umount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Miklos Szeredi wrote:
> >      # Make a named namespace.
> >      NSNAME='fred'
> >      mkdir /var/namespaces/$NSNAME
> >      run_in_new_namespace mount -t bind / /var/namespaces/$NSNAME
> 
> That's not going to work, since the mount will only affect the new
> namespace.

Ah, good point.  I'm still thinking in terms of shared subtrees, where
it might work.

> You'd need clone(), and then in the original namespace
> 
>    mount --bind /proc/CHILDPID/root /var/namespace/$NSNAME
> 
> and then child process can safely exit.

Or pass the file descriptor over a unix domain socket, so that it
doesn't need /proc.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux