Revert "Revert "Remove pledge(2) support""
This reverts commit a24cb0d900
.
This commit is contained in:
parent
0ff066c80b
commit
844057d9df
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
// +build !openbsd
|
||||
|
||||
package main
|
||||
|
||||
func Pledge() {
|
||||
|
||||
}
|
||||
|
||||
func PledgeChild() {
|
||||
|
||||
}
|
Loading…
Reference in New Issue