Skip to content

Commit

Permalink
abi: drop check for IsRootless()
Browse files Browse the repository at this point in the history
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: containers#20908

Signed-off-by: Giuseppe Scrivano <[email protected]>
(cherry picked from commit 1322f31)
  • Loading branch information
giuseppe committed Jan 30, 2024
1 parent b2d2261 commit c6d198e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/domain/infra/abi/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c6d198e

Please sign in to comment.