Merge pull request #672 from rajasec/userns-validation
handling error for userns
This commit is contained in:
commit
d5574d1a4c
|
@ -540,10 +540,6 @@ func setupUserNamespace(spec *specs.Spec, config *configs.Config) error {
|
||||||
if len(spec.Linux.UIDMappings) == 0 {
|
if len(spec.Linux.UIDMappings) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// 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 {
|
create := func(m specs.IDMapping) configs.IDMap {
|
||||||
return configs.IDMap{
|
return configs.IDMap{
|
||||||
HostID: int(m.HostID),
|
HostID: int(m.HostID),
|
||||||
|
|
Loading…
Reference in New Issue