From 1322f3193b8903fef1d0ccb21ead85ba2678eb64 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 14 Dec 2023 19:00:14 +0100 Subject: [PATCH] abi: drop check for IsRootless() it is the wrong check to do here since we need to setup the user namespace even in the case we are running as root without capabilities. [NO NEW TESTS NEEDED] this happens in nested podman Closes: https://github.com/containers/podman/issues/20908 Signed-off-by: Giuseppe Scrivano --- pkg/domain/infra/abi/system_linux.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/domain/infra/abi/system_linux.go b/pkg/domain/infra/abi/system_linux.go index 2c0f5a79eb..312021641a 100644 --- a/pkg/domain/infra/abi/system_linux.go +++ b/pkg/domain/infra/abi/system_linux.go @@ -30,10 +30,6 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, noMoveProcess bool) } } - 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 {