all repos — legit @ 4aa8cbff320b669fc07f356409b05d6b1795c342

web frontend for git

unveil.go (view raw)

 1//go:build openbsd
 2// +build openbsd
 3
 4package main
 5
 6import (
 7	"golang.org/x/sys/unix"
 8)
 9
10func Unveil(path string, perms string) error {
11	return unix.Unveil(path, perms)
12}
13
14func UnveilBlock() error {
15	return unix.UnveilBlock()
16}
17
18func UnveilPaths(paths []string, perms string) error {
19	for _, path := range paths {
20		err := Unveil(path, perms)
21		if err != nil {
22			return err
23		}
24	}
25	return UnveilBlock()
26}