mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
rootless: exec handle processes that create an user namespace
Manage the case where the main process of the container creates and joins a new user namespace. In this case we want to join only the first child in the new hierarchy, which is the user namespace that was used to create the container. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1331 Approved by: rhatdan
This commit is contained in:

committed by
Atomic Bot

parent
720eb85ba5
commit
c5753f57c1
@ -335,11 +335,7 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user string) e
|
||||
|
||||
execCmd, err := c.runtime.ociRuntime.execContainer(c, cmd, capList, env, tty, hostUser, sessionID)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error creating exec command for container %s", c.ID())
|
||||
}
|
||||
|
||||
if err := execCmd.Start(); err != nil {
|
||||
return errors.Wrapf(err, "error starting exec command for container %s", c.ID())
|
||||
return errors.Wrapf(err, "error exec %s", c.ID())
|
||||
}
|
||||
|
||||
pidFile := c.execPidPath(sessionID)
|
||||
|
Reference in New Issue
Block a user