Debian Codegraph @

landlock/restrict_nonlinux.go

raw
1 //go:build !linux
2
3 package landlock
4
5 import "fmt"
6
7 func restrict(c Config, rules ...Rule) error {
8 if c.bestEffort {
9 return nil // Fallback to "nothing"
10 }
11 return fmt.Errorf("missing kernel Landlock support. Landlock is only supported on Linux")
12 }