Merge branch 'master' of github.com:jedisct1/dnscrypt-proxy
* 'master' of github.com:jedisct1/dnscrypt-proxy: Don't call PledgeChild() too early Fix pledge() usage Store the userName value again
This commit is contained in:
commit
9234014f17
|
@ -193,6 +193,9 @@ func ConfigLoad(proxy *Proxy, svcFlag *string) error {
|
|||
|
||||
flag.Parse()
|
||||
|
||||
if *child {
|
||||
PledgeChild()
|
||||
}
|
||||
if *svcFlag == "stop" || *svcFlag == "uninstall" {
|
||||
return nil
|
||||
}
|
||||
|
@ -240,6 +243,8 @@ func ConfigLoad(proxy *Proxy, svcFlag *string) error {
|
|||
proxy.logMaxAge = config.LogMaxAge
|
||||
proxy.logMaxBackups = config.LogMaxBackups
|
||||
|
||||
proxy.userName = config.UserName
|
||||
|
||||
proxy.child = *child
|
||||
proxy.xTransport = NewXTransport()
|
||||
proxy.xTransport.tlsDisableSessionTickets = config.TLSDisableSessionTickets
|
||||
|
|
|
@ -2,9 +2,14 @@
|
|||
|
||||
package main
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
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",
|
||||
"stdio rpath wpath cpath tmppath inet fattr flock dns recvfd")
|
||||
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)
|
||||
}
|
||||
|
|
|
@ -5,3 +5,7 @@ package main
|
|||
func Pledge() {
|
||||
|
||||
}
|
||||
|
||||
func PledgeChild() {
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue