Remove pledge(2) support

Fixes #571
This commit is contained in:
Frank Denis 2018-08-15 17:53:36 +02:00
parent 7740e9d3bc
commit bc3215a8a6
4 changed files with 0 additions and 31 deletions

View File

@ -193,9 +193,6 @@ func ConfigLoad(proxy *Proxy, svcFlag *string) error {
flag.Parse() flag.Parse()
if *child {
PledgeChild()
}
if *svcFlag == "stop" || *svcFlag == "uninstall" { if *svcFlag == "stop" || *svcFlag == "uninstall" {
return nil return nil
} }

View File

@ -25,8 +25,6 @@ type App struct {
func main() { func main() {
dlog.Init("dnscrypt-proxy", dlog.SeverityNotice, "DAEMON") dlog.Init("dnscrypt-proxy", dlog.SeverityNotice, "DAEMON")
Pledge()
pwd, err := os.Getwd() pwd, err := os.Getwd()
if err != nil { if err != nil {
dlog.Fatal("Unable to find the path to the current directory") dlog.Fatal("Unable to find the path to the current directory")

View File

@ -1,15 +0,0 @@
// +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)
}

View File

@ -1,11 +0,0 @@
// +build !openbsd
package main
func Pledge() {
}
func PledgeChild() {
}