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