moby/daemon/exec_unix.go
John Howard 5fa2e4d4f2 Refactor ProcessConfig
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-09 09:51:09 -08:00

20 lines
498 B
Go

// +build linux freebsd
package daemon
import (
"github.com/docker/docker/daemon/execdriver"
"github.com/docker/docker/runconfig"
)
// setPlatformSpecificExecProcessConfig sets platform-specific fields in the
// ProcessConfig structure.
func setPlatformSpecificExecProcessConfig(config *runconfig.ExecConfig, container *Container, pc *execdriver.ProcessConfig) {
user := config.User
if len(user) == 0 {
user = container.Config.User
}
pc.User = user
pc.Privileged = config.Privileged
}