runtime: move pause process to scope

make sure the pause process is moved to its own scope as well as what
we do when we join an existing user+mount namespace.

Closes: https://github.com/containers/podman/issues/11560

[NO TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2021-09-16 12:46:21 +02:00
parent 72534a74b3
commit a2c8b5d9d6
No known key found for this signature in database
GPG key ID: E4730F97F60286ED

View file

@ -35,6 +35,7 @@ import (
"github.com/containers/podman/v3/pkg/rootless"
"github.com/containers/podman/v3/pkg/systemd"
"github.com/containers/podman/v3/pkg/util"
"github.com/containers/podman/v3/utils"
"github.com/containers/storage"
"github.com/containers/storage/pkg/unshare"
"github.com/docker/docker/pkg/namesgenerator"
@ -543,6 +544,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
return err
}
if became {
utils.MovePauseProcessToScope(pausePid)
os.Exit(ret)
}
}