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 <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2023-12-14 19:00:14 +01:00
parent c324dbb8b4
commit 1322f3193b
No known key found for this signature in database
GPG Key ID: 67E38F7A8BA21772
1 changed files with 0 additions and 4 deletions

View File

@ -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 {