unveil_landlock.go (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | //go:build linux // +build linux package main import ( "fmt" "github.com/landlock-lsm/go-landlock/landlock" ) var ll = landlock.V5 func Unveil(path string, perms string) error { return nil } func UnveilBlock() error { return nil } func UnveilPaths(paths []string, perms string) error { switch perms { case "r": return ll.RestrictPaths(landlock.RODirs(paths...)) default: return fmt.Errorf("perms '%s' not handled", perms) } } |