From c6d198e443e7548ae0be6c334db7ea3988786065 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 (cherry picked from commit 1322f3193b8903fef1d0ccb21ead85ba2678eb64) --- pkg/domain/infra/abi/system.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go index 95bf5d38ca..24ee64d298 100644 --- a/pkg/domain/infra/abi/system.go +++ b/pkg/domain/infra/abi/system.go @@ -78,10 +78,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 {