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