mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
6bb0d1816a
So other packages don't need to import the daemon package when they want to use this struct. Signed-off-by: David Calavera <david.calavera@gmail.com> Signed-off-by: Tibor Vass <tibor@docker.com>
21 lines
546 B
Go
21 lines
546 B
Go
// +build linux freebsd
|
|
|
|
package daemon
|
|
|
|
import (
|
|
"github.com/docker/docker/container"
|
|
"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.Container, pc *execdriver.ProcessConfig) {
|
|
user := config.User
|
|
if len(user) == 0 {
|
|
user = container.Config.User
|
|
}
|
|
|
|
pc.User = user
|
|
pc.Privileged = config.Privileged
|
|
}
|