Commit 1f542148 authored by Frank Denis's avatar Frank Denis

pledge() on OpenBSD

parent 4dc756be
......@@ -25,6 +25,8 @@ type App struct {
func main() {
dlog.Init("dnscrypt-proxy", dlog.SeverityNotice, "DAEMON")
Pledge()
pwd, err := os.Getwd()
if err != nil {
dlog.Fatal("Unable to find the path to the current directory")
......
// +build openbsd
package main
import "unix"
func Pledge() {
unix.Pledge("stdio rpath wpath cpath tmppath inet fattr flock dns getpw sendfd recvfd proc exec id",
"stdio rpath wpath cpath tmppath inet fattr flock dns recvfd")
}
// +build !openbsd
package main
func Pledge() {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment