diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-08-29 10:15:03 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-29 16:25:20 +0000 |
commit | 46acded58d71528c24f89cdef6c18a283e23cc54 (patch) | |
tree | 0224780328b5800f487d359d04e39882124e45a3 /libpod | |
parent | 2ed79f6315a35a76b405f62aa85088a5b9bd9af4 (diff) | |
download | podman-46acded58d71528c24f89cdef6c18a283e23cc54.tar.gz podman-46acded58d71528c24f89cdef6c18a283e23cc54.tar.bz2 podman-46acded58d71528c24f89cdef6c18a283e23cc54.zip |
rootless, exec: use the new function to join the userns
since we have a way for joining an existing userns use it instead of
nsenter.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1371
Approved by: rhatdan
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/oci.go | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/libpod/oci.go b/libpod/oci.go index 240f53885..e1c0d1261 100644 --- a/libpod/oci.go +++ b/libpod/oci.go @@ -691,15 +691,6 @@ func (r *OCIRuntime) execContainer(c *Container, cmd, capAdd, env []string, tty logrus.Debugf("Starting runtime %s with following arguments: %v", r.path, args) execCmd := exec.Command(r.path, args...) - if rootless.IsRootless() { - args = append([]string{"--preserve-credentials", "--user=/proc/self/fd/3", r.path}, args...) - f, err := rootless.GetUserNSForPid(uint(c.state.PID)) - if err != nil { - return nil, err - } - execCmd = exec.Command("nsenter", args...) - execCmd.ExtraFiles = append(execCmd.ExtraFiles, f) - } execCmd.Stdout = os.Stdout execCmd.Stderr = os.Stderr execCmd.Stdin = os.Stdin |