add returns
This commit is contained in:
parent
7443e57078
commit
38a2541667
@ -16,8 +16,8 @@ package protect
|
|||||||
// Preventing access to anything else.
|
// Preventing access to anything else.
|
||||||
//
|
//
|
||||||
// On non-OpenBSD machines this call is a noop.
|
// On non-OpenBSD machines this call is a noop.
|
||||||
func Unveil(path string, flags string) {
|
func Unveil(path string, flags string) error {
|
||||||
unveil(path, flags)
|
return unveil(path, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnveilBlock locks the Unveil'd paths. Preventing further changes to a
|
// 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.
|
// the system calls a process can make.
|
||||||
//
|
//
|
||||||
// On non-OpenBSD machines this call is a noop.
|
// On non-OpenBSD machines this call is a noop.
|
||||||
func Pledge(promises string) {
|
func Pledge(promises string) error {
|
||||||
pledge(promises)
|
return pledge(promises)
|
||||||
}
|
}
|
||||||
|
@ -6,14 +6,14 @@ import (
|
|||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
func unveil(path string, flags string) {
|
func unveil(path string, flags string) error {
|
||||||
unix.Unveil(path, flags)
|
return unix.Unveil(path, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
func unveilBlock() error {
|
func unveilBlock() error {
|
||||||
return unix.UnveilBlock()
|
return unix.UnveilBlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
func pledge(promises string) {
|
func pledge(promises string) error {
|
||||||
unix.PledgePromises(promises)
|
return unix.PledgePromises(promises)
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,14 @@
|
|||||||
|
|
||||||
package protect
|
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