diff --git a/main.go b/main.go index d84aca7..e8e11a4 100644 --- a/main.go +++ b/main.go @@ -24,7 +24,7 @@ func main() { os.Exit(0) } - openbsd.Pledge("stdio rpath proc exec getpw") + openbsd.Pledge("stdio rpath proc exec getpw unix tty") log.SetFormatter(&log.TextFormatter{FullTimestamp: true}) if isVerbose { diff --git a/openbsd/openbsd.go b/openbsd/openbsd.go index 77c1f9e..2d02b1b 100644 --- a/openbsd/openbsd.go +++ b/openbsd/openbsd.go @@ -6,5 +6,5 @@ import "golang.org/x/sys/unix" // Pledge allowed system calls func Pledge(promises string) { - unix.Pledge(promises, "") + unix.PledgePromises(promises) }