diff --git a/dnscrypt-proxy/config.go b/dnscrypt-proxy/config.go index 586435f6..72b212bd 100644 --- a/dnscrypt-proxy/config.go +++ b/dnscrypt-proxy/config.go @@ -193,6 +193,9 @@ func ConfigLoad(proxy *Proxy, svcFlag *string) error { flag.Parse() + if *child { + PledgeChild() + } if *svcFlag == "stop" || *svcFlag == "uninstall" { return nil } diff --git a/dnscrypt-proxy/privilege_others.go b/dnscrypt-proxy/privilege_others.go index 58725582..9779de5f 100644 --- a/dnscrypt-proxy/privilege_others.go +++ b/dnscrypt-proxy/privilege_others.go @@ -39,7 +39,6 @@ func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) { } SystemDNotify() - PledgeChild() args = args[1:] args = append(args, "-child")