summaryrefslogblamecommitdiffstats
path: root/unveil.go
blob: 99b662926af1f434b7b32073afac59fa773080f6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10




                  
        
                               


                                              





                                       
 





                                                      
         
                            
 
//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()
}