Files
Privatae e4c9b69b46
ci / personal-data (push) Successful in 5s
ci / test (push) Successful in 3m4s
ci / fuzz (push) Successful in 3m45s
bastion 0.53.2
2026-10-20 04:42:14 +00:00

28 lines
756 B
Go

//go:build !linux
package main
import "syscall"
// Only Linux watches where a root command connects. Elsewhere every command
// reads as not watched, so the host treats its output as untrusted.
func rootExecWatchStartKernel(sessionID string) *rootExecWatch {
_ = sessionID
return &rootExecWatch{fd: -1, Err: "this machine is not Linux, where the watch runs"}
}
func rootExecWatchStopKernel(w *rootExecWatch) ([]rootExecConn, string) {
if w == nil {
return nil, "no watch was started"
}
return nil, w.Err
}
func rootExecWatchSweep() {}
// No cgroup of its own here: the process-group kill is all there is.
func rootExecWatchKillKernel(w *rootExecWatch) { _ = w }
func rootExecIntoCgroup(attr *syscall.SysProcAttr, fd int) { _, _ = attr, fd }