From 7b4afbf621a787ead00ae83bdaebabeec3b0c707 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 12 Jul 2022 11:47:30 +0200 Subject: podman: always call into SetupRootless Signed-off-by: Giuseppe Scrivano --- pkg/domain/infra/abi/system.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/domain') diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go index 0faae01c8..eed80dd79 100644 --- a/pkg/domain/infra/abi/system.go +++ b/pkg/domain/infra/abi/system.go @@ -67,6 +67,10 @@ func (ic *ContainerEngine) Info(ctx context.Context) (*define.Info, error) { } func (ic *ContainerEngine) SetupRootless(_ context.Context, noMoveProcess bool) error { + if !rootless.IsRootless() { + return nil + } + // do it only after podman has already re-execed and running with uid==0. hasCapSysAdmin, err := unshare.HasCapSysAdmin() if err != nil { -- cgit v1.2.3-54-g00ecf