2015-11-01 10:53:15 -05:00
|
|
|
package daemon
|
|
|
|
|
|
|
|
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"
|
|
|
|
"github.com/docker/docker/libcontainerd"
|
2015-11-01 10:53:15 -05:00
|
|
|
)
|
|
|
|
|
2016-03-18 14:53:27 -04:00
|
|
|
func execSetPlatformOpt(c *container.Container, ec *exec.Config, p *libcontainerd.Process) error {
|
|
|
|
// Process arguments need to be escaped before sending to OCI.
|
2017-06-22 20:15:10 -04:00
|
|
|
if c.Platform == "windows" {
|
|
|
|
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
|
|
|
}
|