Commit 844057d9 authored by Frank Denis's avatar Frank Denis

Revert "Revert "Remove pledge(2) support""

This reverts commit a24cb0d9.
parent 0ff066c8
......@@ -193,9 +193,6 @@ func ConfigLoad(proxy *Proxy, svcFlag *string) error {
flag.Parse()
if *child {
PledgeChild()
}
if *svcFlag == "stop" || *svcFlag == "uninstall" {
return nil
}
......
......@@ -25,8 +25,6 @@ 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 (
"golang.org/x/sys/unix"
)
func Pledge() {
unix.Pledge("stdio rpath wpath cpath tmppath inet fattr flock dns getpw sendfd recvfd proc exec id", nil)
}
func PledgeChild() {
unix.Pledge("stdio rpath wpath cpath tmppath inet fattr flock dns recvfd", nil)
}
// +build !openbsd
package main
func Pledge() {
}
func PledgeChild() {
}
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