Don't call PledgeChild() too early

This commit is contained in:
Frank Denis 2018-07-07 21:03:08 +02:00
parent 127d4f0e68
commit dc602512ff
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -39,7 +39,6 @@ func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
}
SystemDNotify()
PledgeChild()
args = args[1:]
args = append(args, "-child")