actually add the protect stuff
This commit is contained in:
parent
aa6e22ff39
commit
10a5e5eecf
7
protect.go
Normal file
7
protect.go
Normal file
@ -0,0 +1,7 @@
|
||||
//+build !openbsd
|
||||
|
||||
package main
|
||||
|
||||
func unveil(path string, flags string) {}
|
||||
func unveilBlock() {}
|
||||
func pledge(promises string) {}
|
20
protect_openbsd.go
Normal file
20
protect_openbsd.go
Normal file
@ -0,0 +1,20 @@
|
||||
//+build openbsd
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func unveil(path string, flags string) {
|
||||
unix.Unveil(path, flags)
|
||||
}
|
||||
|
||||
func unveilBlock() {
|
||||
unix.UnveilBlock()
|
||||
}
|
||||
|
||||
func plegde(promises string) {
|
||||
unix.PledgePromises(promises)
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user