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

This reverts commit a24cb0d900.
This commit is contained in:
Frank Denis 2018-08-23 00:44:32 +02:00
parent 0ff066c80b
commit 844057d9df
4 changed files with 0 additions and 31 deletions

View File

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

View File

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

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() {
}