Files
virtual-kubelet/vendor/github.com/hyperhq/hypercli/daemon/exec_unix.go
2017-12-22 00:30:03 +08:00

22 lines
548 B
Go

// +build linux freebsd
package daemon
import (
"github.com/hyperhq/hyper-api/types"
"github.com/hyperhq/hypercli/container"
"github.com/hyperhq/hypercli/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
}