dify/dify-agent-runtime/internal/landlock/landlock_stub.go
Yunlu Wen 71709f03c3
feat: protect agent HOME with landlock (#39000)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-15 10:07:24 +00:00

14 lines
339 B
Go

//go:build !linux
package landlock
import "errors"
// ErrNotSupported is returned when the kernel does not support Landlock.
var ErrNotSupported = errors.New("landlock: not supported by kernel")
// Restrict is a no-op on non-Linux platforms; always returns ErrNotSupported.
func Restrict(cfg *Config) error {
return ErrNotSupported
}