2015-11-01 10:53:15 -05:00
|
|
|
// +build linux freebsd
|
|
|
|
|
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
2015-12-18 13:17:54 -05:00
|
|
|
"github.com/docker/docker/api/types"
|
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"
|
|
|
|
)
|
|
|
|
|
|
|
|
// setPlatformSpecificExecProcessConfig sets platform-specific fields in the
|
|
|
|
// ProcessConfig structure.
|
2015-12-18 13:17:54 -05:00
|
|
|
func setPlatformSpecificExecProcessConfig(config *types.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
|
|
|
|
}
|