839f73c302
Signed-off-by: David Calavera <david.calavera@gmail.com>
21 lines
542 B
Go
21 lines
542 B
Go
// +build linux freebsd
|
|
|
|
package daemon
|
|
|
|
import (
|
|
"github.com/docker/docker/api/types"
|
|
"github.com/docker/docker/container"
|
|
"github.com/docker/docker/daemon/execdriver"
|
|
)
|
|
|
|
// setPlatformSpecificExecProcessConfig sets platform-specific fields in the
|
|
// ProcessConfig structure.
|
|
func setPlatformSpecificExecProcessConfig(config *types.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
|
|
}
|