ARTEX-English/server/execpriv_other.go
Sean Kilfoy edaf7e323a Package BaaRai v0.7.0 as the operator distribution.
The application tree is BaaRai/ARTEX v0.7.0 (22ae88af), imported as one commit because that history is not in this repository. This commit adds the cloud installer, a defender pack for the console and the known-bad image names, and a supply-chain check. The opt-in update banner points at this fork and stays off in the cloud compose file.
2026-11-26 07:33:09 +00:00

45 lines
1.3 KiB
Go

//go:build !unix
package server
import (
"errors"
"os/exec"
)
// Without unix credentials the privilege drop cannot be applied. ResolveExecPrivilege
// never enables it here, so these stubs only keep the package compiling; the
// functions that would act on an enabled drop return an error to fail closed.
var errExecUnsupported = errors.New("agent process isolation is not supported on this platform")
func execPrivilegeSupported() bool { return false }
func serverIsRoot() bool { return false }
func applyExecCredential(c *exec.Cmd, p ExecPrivilege) {}
func prepareExecScript(p ExecPrivilege, path string) error { return nil }
func shareRestoredTaskDir(p ExecPrivilege, taskDir string) error { return nil }
func shareRestoredSpillDir(p ExecPrivilege, dir string) error { return nil }
// PrepareExecPrivilege fails when a drop is enabled; a disabled one does nothing.
func PrepareExecPrivilege(p *ExecPrivilege, dataDir, keyDir, configPath string) error {
if p.Enabled {
return errExecUnsupported
}
return nil
}
// InstallBashShim fails when a drop is enabled; a disabled one does nothing.
func InstallBashShim(p ExecPrivilege) error {
if p.Enabled {
return errExecUnsupported
}
return nil
}
// RunExecShimIfRequested does nothing: no shim is ever installed on this platform.
func RunExecShimIfRequested(argv []string) {}