Messages in this thread | | | From | (Eric W. Biederman) | Date | Sun, 16 Oct 2011 02:42:14 -0700 | Subject | Re: Detecting if you are running in a container |
| |
"H. Peter Anvin" <hpa@zytor.com> writes:
> On 10/14/2011 11:04 AM, Eric W. Biederman wrote: >> >> I have found and merged a solution that allows us to name namespaces >> without needing a namespaces for namespaces. >> > > Something based on UUIDs, perhaps? > > UUIDs are kind of exactly this, after all... a single namespace designed > to be large and random enough to be globally unique without a central > registration authority.
mount --bind /proc/self/ns/net /var/run/netns/<name>
When we want to refer to the namespace in syscalls we pass a file descriptor we received from opening the namespace reference object.
That moves the entire naming problem into the file namespace.
Eric
| |