add returns

This commit is contained in:
Aaron Bieber 2020-05-10 07:04:34 -06:00
parent 7443e57078
commit 38a2541667
3 changed files with 17 additions and 11 deletions

View File

@ -16,8 +16,8 @@ package protect
// Preventing access to anything else.
//
// On non-OpenBSD machines this call is a noop.
func Unveil(path string, flags string) {
unveil(path, flags)
func Unveil(path string, flags string) error {
return unveil(path, flags)
}
// UnveilBlock locks the Unveil'd paths. Preventing further changes to a
@ -32,6 +32,6 @@ func UnveilBlock() error {
// the system calls a process can make.
//
// On non-OpenBSD machines this call is a noop.
func Pledge(promises string) {
pledge(promises)
func Pledge(promises string) error {
return pledge(promises)
}

View File

@ -6,14 +6,14 @@ import (
"golang.org/x/sys/unix"
)
func unveil(path string, flags string) {
unix.Unveil(path, flags)
func unveil(path string, flags string) error {
return unix.Unveil(path, flags)
}
func unveilBlock() error {
return unix.UnveilBlock()
}
func pledge(promises string) {
unix.PledgePromises(promises)
func pledge(promises string) error {
return unix.PledgePromises(promises)
}

View File

@ -2,8 +2,14 @@
package protect
func unveil(path string, flags string) {}
func unveil(path string, flags string) error {
return nil
}
func unveilBlock() error {}
func unveilBlock() error {
return nil
}
func pledge(promises string) {}
func pledge(promises string) error {
return nil
}