mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-11-03 09:37:34 +00:00
Merge pull request #21433 from openshift-cherrypick-robot/cherry-pick-20769-to-v4.9
[v4.9] system: enhance check for re-exec into rootless userns
This commit is contained in:
commit
96e2b96f6e
1 changed files with 2 additions and 1 deletions
|
|
@ -87,7 +87,8 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, noMoveProcess bool)
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if hasCapSysAdmin {
|
||||
// check for both euid == 0 and CAP_SYS_ADMIN because we may be running in a container with CAP_SYS_ADMIN set.
|
||||
if os.Geteuid() == 0 && hasCapSysAdmin {
|
||||
ownsCgroup, err := cgroups.UserOwnsCurrentSystemdCgroup()
|
||||
if err != nil {
|
||||
logrus.Infof("Failed to detect the owner for the current cgroup: %v", err)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue