From 57edfbbaf2c52bc7c095673c9b3dc43019c35a35 Mon Sep 17 00:00:00 2001 From: Ma Shimiao Date: Thu, 30 Nov 2017 16:21:28 +0800 Subject: [PATCH] specconv: avoid skipping gidmappings applied when uidmappings is empty Signed-off-by: Ma Shimiao --- libcontainer/specconv/spec_linux.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/libcontainer/specconv/spec_linux.go b/libcontainer/specconv/spec_linux.go index fd8e92fa..9cef1476 100644 --- a/libcontainer/specconv/spec_linux.go +++ b/libcontainer/specconv/spec_linux.go @@ -618,9 +618,6 @@ func setupUserNamespace(spec *specs.Spec, config *configs.Config) error { } } if spec.Linux != nil { - if len(spec.Linux.UIDMappings) == 0 { - return nil - } for _, m := range spec.Linux.UIDMappings { config.UidMappings = append(config.UidMappings, create(m)) }