2023-01-14 06:16:00 -07:00
|
|
|
//go:build openbsd
|
|
|
|
// +build openbsd
|
2020-05-08 07:36:29 -06:00
|
|
|
|
|
|
|
package protect
|
|
|
|
|
|
|
|
import (
|
|
|
|
"golang.org/x/sys/unix"
|
|
|
|
)
|
|
|
|
|
2020-05-10 07:04:34 -06:00
|
|
|
func unveil(path string, flags string) error {
|
|
|
|
return unix.Unveil(path, flags)
|
2020-05-08 07:36:29 -06:00
|
|
|
}
|
|
|
|
|
2020-05-08 07:55:32 -06:00
|
|
|
func unveilBlock() error {
|
2020-05-08 07:38:58 -06:00
|
|
|
return unix.UnveilBlock()
|
2020-05-08 07:36:29 -06:00
|
|
|
}
|
|
|
|
|
2020-05-10 07:04:34 -06:00
|
|
|
func pledge(promises string) error {
|
|
|
|
return unix.PledgePromises(promises)
|
2020-05-08 07:36:29 -06:00
|
|
|
}
|