lkml.org 
[lkml]   [2005]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RCF] [PATCH] unprivileged mount/umount
From
Date
> Still easy.
>
> To keep persistent named namespaces in /var/namespaces, thus:
>
> # Just once please!
> mount -t tmpfs none /var/namespaces
>
> # 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. 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.

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

\
 
 \ /
  Last update: 2005-05-11 23:39    [W:0.046 / U:13.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site