A Kit task runs worker and harness in one container, separated by user: the worker keeps its credentials as root, and every harness invocation runs as the Kit's user with only its declared environment. A nil env would inherit the worker's, so the runner always passes an explicit one; root is refused as a harness user, and a root worker refuses to start a harness with no user. The PRD's container layout now says one container per run, with the relay forwarding the proxy, NATS and the State Store.
22 lines
518 B
Go
22 lines
518 B
Go
//go:build !unix
|
|
|
|
package agentexec
|
|
|
|
import (
|
|
"errors"
|
|
"os/exec"
|
|
)
|
|
|
|
// setProcessGroup falls back to killing the harness process alone where
|
|
// process groups are unavailable.
|
|
func setProcessGroup(*exec.Cmd) {}
|
|
|
|
// runAsHarnessUser refuses a named harness user where user switching is
|
|
// unavailable, rather than running the harness as the worker.
|
|
func runAsHarnessUser(_ *exec.Cmd, name string) error {
|
|
if name != "" {
|
|
return errors.New("harness user switching is unsupported on this platform")
|
|
}
|
|
return nil
|
|
}
|