diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-08-24 12:15:34 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-26 07:22:42 +0000 |
commit | c5753f57c1a929f80fb768ff62bd35f383584aed (patch) | |
tree | ece117393325d5a26d1fc7dfc23ad6b2c6f48631 /libpod/container_api.go | |
parent | 720eb85ba55d8c825262e9b2e058ec8a8e0e4d9f (diff) | |
download | podman-c5753f57c1a929f80fb768ff62bd35f383584aed.tar.gz podman-c5753f57c1a929f80fb768ff62bd35f383584aed.tar.bz2 podman-c5753f57c1a929f80fb768ff62bd35f383584aed.zip |
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
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r-- | libpod/container_api.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index 56947eb3a..5df7e2f0e 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -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) |