On Fri, Dec 28, 2012 at 01:54:45PM +0100, Ángel González wrote: > On 20/12/12 19:22, Neil Horman wrote: > > case 'm': > > - unshare_flags |= CLONE_NEWNS; > > + ns = "mount"; > > + if (!optarg) > > + unshare_flags |= CLONE_NEWNS; > > break; > > Is this right? I don't have a /proc/<task>/ns/mount locally nor is it > documented in > http://git.kernel.org/?p=docs/man-pages/man-pages.git;a=blob;f=man5/proc.5 > > However looking at > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=fs/proc/namespaces.c > there is a reference to mntns_operations, which is defined in > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=fs/proc/namespaces.c > > but seems to be called "mnt", not "mount" > Shoot, I thought Biederman was going to call it mount, not mnt, I'll fix that shortly. > There are also pid and user namespaces there, but support for those are > better handled in a different patch IMHO. > I'm not really sure what you mean by a different patch here. Why would I add support for setns for other pid/uts namespaces in a different patch? > > > + sprintf(path, "/proc/%d/ns/%s", (int)pid, ns); > > + ns_pids[nscount] = open(path, O_RDONLY); > > + if (ns_pids[nscount] < 0) > > + err(EXIT_FAILURE, _("could not open %s"), path); > > + nscount++; > > What about err(EXIT_FAILURE, _("The kernel doesn't seem to support %s > migrations: could not open %s"), ns, path); ? > Sure, I can do that. > Mention in the man page the kernel version from which each namespace can > be migrated. > Yeah, ok Neil > -- > To unsubscribe from this list: send the line "unsubscribe util-linux" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html