add returns
This commit is contained in:
parent
7443e57078
commit
38a2541667
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user