This repository has been archived on 2026-03-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
greywall/internal/sandbox/linux_features_stub.go

46 lines
1.0 KiB
Go

//go:build !linux
package sandbox
// LinuxFeatures describes available Linux sandboxing features.
// This is a stub for non-Linux platforms.
type LinuxFeatures struct {
HasBwrap bool
HasSocat bool
HasSeccomp bool
SeccompLogLevel int
HasLandlock bool
LandlockABI int
HasEBPF bool
HasCapBPF bool
HasCapRoot bool
CanUnshareNet bool
KernelMajor int
KernelMinor int
}
// DetectLinuxFeatures returns empty features on non-Linux platforms.
func DetectLinuxFeatures() *LinuxFeatures {
return &LinuxFeatures{}
}
// Summary returns an empty string on non-Linux platforms.
func (f *LinuxFeatures) Summary() string {
return "not linux"
}
// CanMonitorViolations returns false on non-Linux platforms.
func (f *LinuxFeatures) CanMonitorViolations() bool {
return false
}
// CanUseLandlock returns false on non-Linux platforms.
func (f *LinuxFeatures) CanUseLandlock() bool {
return false
}
// MinimumViable returns false on non-Linux platforms.
func (f *LinuxFeatures) MinimumViable() bool {
return false
}