Merge pull request #454 from mlaventure/libcontainer-pidns

Move setns within nsexec
This commit is contained in:
Mrunal Patel
2016-02-29 15:34:19 -08:00
12 changed files with 951 additions and 342 deletions
+4 -1
View File
@@ -593,7 +593,10 @@ func setupUserNamespace(spec *specs.LinuxSpec, config *configs.Config) error {
if len(spec.Linux.UIDMappings) == 0 {
return nil
}
config.Namespaces.Add(configs.NEWUSER, "")
// do not override the specified user namespace path
if config.Namespaces.PathOf(configs.NEWUSER) == "" {
config.Namespaces.Add(configs.NEWUSER, "")
}
create := func(m specs.IDMapping) configs.IDMap {
return configs.IDMap{
HostID: int(m.HostID),