From c0abfaa7c38a8fc897a4c1f64392ace40a5a10c1 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 16 Aug 2018 17:31:09 +0200 Subject: Revert "spec: bind mount /sys only for rootless containers" It breaks "podman run --net=host --uidmap=0:1:70000 --gidmap=0:20000:70000 busybox echo hi" Signed-off-by: Giuseppe Scrivano Closes: #1285 Approved by: rhatdan --- pkg/spec/spec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index 231cb59fc..bceae4677 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -35,7 +35,7 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint Options: []string{"nosuid", "noexec", "nodev", "rw"}, } g.AddMount(sysMnt) - } else if rootless.IsRootless() && !config.UsernsMode.IsHost() && config.NetMode.IsHost() { + } else if !config.UsernsMode.IsHost() && config.NetMode.IsHost() { addCgroup = false g.RemoveMount("/sys") sysMnt := spec.Mount{ -- cgit v1.2.3-54-g00ecf