2018-02-05 16:05:59 -05:00
|
|
|
package daemon // import "github.com/docker/docker/daemon"
|
2015-11-01 10:53:15 -05:00
|
|
|
|
|
|
|
import (
|
2015-11-12 14:55:17 -05:00
|
|
|
"github.com/docker/docker/container"
|
2016-03-18 14:53:27 -04:00
|
|
|
"github.com/docker/docker/daemon/exec"
|
2017-09-22 09:52:41 -04:00
|
|
|
specs "github.com/opencontainers/runtime-spec/specs-go"
|
2015-11-01 10:53:15 -05:00
|
|
|
)
|
|
|
|
|
2017-09-22 09:52:41 -04:00
|
|
|
func (daemon *Daemon) execSetPlatformOpt(c *container.Container, ec *exec.Config, p *specs.Process) error {
|
2016-03-18 14:53:27 -04:00
|
|
|
// Process arguments need to be escaped before sending to OCI.
|
2017-08-08 15:43:48 -04:00
|
|
|
if c.OS == "windows" {
|
2017-06-22 20:15:10 -04:00
|
|
|
p.Args = escapeArgs(p.Args)
|
|
|
|
p.User.Username = ec.User
|
|
|
|
}
|
2016-03-18 14:53:27 -04:00
|
|
|
return nil
|
2015-11-01 10:53:15 -05:00
|
|
|
}
|