[lxc-devel] [PATCH] Add option to lxc-attach to select specific namespaces
Serge Hallyn
serge.hallyn at canonical.com
Fri May 18 14:09:07 UTC 2012
Quoting Christian Seiler (christian at iwakd.de):
> + int flags[] = { CLONE_NEWPID, CLONE_NEWNS, CLONE_NEWNET, CLONE_NEWIPC, CLONE_NEWUTS };
...
> -static char *namespaces_list[] = {
> - "MOUNT", "PID", "UTSNAME", "IPC",
> - "USER", "NETWORK"
> -};
> -static int cloneflags_list[] = {
> - CLONE_NEWNS, CLONE_NEWPID, CLONE_NEWUTS, CLONE_NEWIPC,
> - CLONE_NEWUSER, CLONE_NEWNET
> -};
These should be commonized. I'm surprised this patch worked for you, as
the indices for network don't match up.
CLONE_NEWUSER may be available pretty soon, no reason to blacklist it
in attach. Just have it gracefully fail if unavailable, just as PID
still needs to do.
thanks,
-serge
More information about the lxc-devel
mailing list