all repos — legit @ 4aa8cbff320b669fc07f356409b05d6b1795c342

fork of git.icyphox.sh/legit

unveil.go

//go:build openbsd
// +build openbsd

package main

import (
	"golang.org/x/sys/unix"
)

func Unveil(path string, perms string) error {
	return unix.Unveil(path, perms)
}

func UnveilBlock() error {
	return unix.UnveilBlock()
}

func UnveilPaths(paths []string, perms string) error {
	for _, path := range paths {
		err := Unveil(path, perms)
		if err != nil {
			return err
		}
	}
	return UnveilBlock()
}