use pledge \o/

This commit is contained in:
Aaron Bieber 2020-02-03 20:42:19 -07:00
parent da445b59e9
commit 94c9645820
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -14,7 +14,6 @@ func unveilBlock() {
unix.UnveilBlock()
}
func plegde(promises string) {
func pledge(promises string) {
unix.PledgePromises(promises)
}