diff --git a/main.go b/main.go index 7adc1d6..9731070 100644 --- a/main.go +++ b/main.go @@ -44,6 +44,7 @@ func main() { flag.Parse() + pledge("stdio unveil rpath wpath cpath flock dns inet tty") unveil("/etc/resolv.conf", "r") unveil("/etc/ssl/cert.pem", "r") unveil(db, "rwc") @@ -89,6 +90,9 @@ func main() { log.Fatalln(err) } + // No longer need tty now that we have our info + pledge("stdio unveil rpath wpath cpath flock dns inet") + store.set("account", "username", username) store.set("account", "access_token", resp.AccessToken) store.set("account", "user_id", resp.UserID) diff --git a/protect_openbsd.go b/protect_openbsd.go index 405982d..8f94ae0 100644 --- a/protect_openbsd.go +++ b/protect_openbsd.go @@ -14,7 +14,6 @@ func unveilBlock() { unix.UnveilBlock() } -func plegde(promises string) { +func pledge(promises string) { unix.PledgePromises(promises) - }