diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go index d31a3435..01781f36 100644 --- a/libcontainer/container_linux.go +++ b/libcontainer/container_linux.go @@ -1064,6 +1064,9 @@ func (c *linuxContainer) currentState() (*State, error) { state.NamespacePaths[ns.Type] = ns.GetPath(pid) } for _, nsType := range configs.NamespaceTypes() { + if !configs.IsNamespaceSupported(nsType) { + continue + } if _, ok := state.NamespacePaths[nsType]; !ok { ns := configs.Namespace{Type: nsType} state.NamespacePaths[ns.Type] = ns.GetPath(pid)