From d34a7e252f03f13e378c03f178f5bfb3251b67b1 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Fri, 8 May 2020 07:38:58 -0600 Subject: [PATCH] return error from UnveilBlock --- protect.go | 2 +- protect_openbsd.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/protect.go b/protect.go index e2e5672..0e90d2d 100644 --- a/protect.go +++ b/protect.go @@ -25,7 +25,7 @@ func Unveil(path string, flags string) {} // processes filesystem view. // // On non-OpenBSD machines this call is a noop. -func UnveilBlock() {} +func UnveilBlock() error {} // Pledge wraps OpenBSD's pledge(2) system call. One can use this to limit // the system calls a process can make. diff --git a/protect_openbsd.go b/protect_openbsd.go index aa90bad..254f303 100644 --- a/protect_openbsd.go +++ b/protect_openbsd.go @@ -31,8 +31,8 @@ func Unveil(path string, flags string) { // processes filesystem view. // // On non-OpenBSD machines this call is a noop. -func UnveilBlock() { - unix.UnveilBlock() +func UnveilBlock() error { + return unix.UnveilBlock() } // Pledge wraps OpenBSD's pledge(2) system call. One can use this to limit