Declare OpenBSD pledge(2) (#5)
This commit is contained in:
7
openbsd/generic.go
Normal file
7
openbsd/generic.go
Normal file
@@ -0,0 +1,7 @@
|
||||
// +build !openbsd
|
||||
|
||||
package openbsd
|
||||
|
||||
// Pledge allowed system calls, available only on OpenBSD systems
|
||||
func Pledge(promises string) {
|
||||
}
|
10
openbsd/openbsd.go
Normal file
10
openbsd/openbsd.go
Normal file
@@ -0,0 +1,10 @@
|
||||
// +build openbsd
|
||||
|
||||
package openbsd
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
// Pledge allowed system calls
|
||||
func Pledge(promises string) {
|
||||
unix.Pledge(promises, nil)
|
||||
}
|
Reference in New Issue
Block a user