ref: b1a6f7815ce3a1957a2d2374eeb085f158f576e5
dir: /protect_openbsd.go/
package main import ( "log" "golang.org/x/sys/unix" ) func pledge(promises string) { err := unix.PledgePromises(promises) if err != nil { log.Fatal(err) } } func unveil(path string, flags string) { err := unix.Unveil(path, flags) if err != nil { log.Fatal(err) } } func unveilBlock() { err := unix.UnveilBlock() if err != nil { log.Fatal(err) } }