diff options
Diffstat (limited to 'libpod/container_exec.go')
-rw-r--r-- | libpod/container_exec.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libpod/container_exec.go b/libpod/container_exec.go index f5f54c7cc..fce26acb0 100644 --- a/libpod/container_exec.go +++ b/libpod/container_exec.go @@ -980,11 +980,6 @@ func prepareForExec(c *Container, session *ExecSession) (*ExecOptions, error) { capList = capabilities.AllCapabilities() } - user := c.config.User - if session.Config.User != "" { - user = session.Config.User - } - if err := c.createExecBundle(session.ID()); err != nil { return nil, err } @@ -995,7 +990,7 @@ func prepareForExec(c *Container, session *ExecSession) (*ExecOptions, error) { opts.Env = session.Config.Environment opts.Terminal = session.Config.Terminal opts.Cwd = session.Config.WorkDir - opts.User = user + opts.User = session.Config.User opts.PreserveFDs = session.Config.PreserveFDs opts.DetachKeys = session.Config.DetachKeys opts.ExitCommand = session.Config.ExitCommand |