Skip to content

Commit 8076e20

Browse files
committed
Revert "Install the windows service as "NT AUTHORITY\NetworkService""
This reverts commit 17db0a6. On Windows, switching to user `NT AUTHORITY\NetworkService` apparently breaks logging (reported by @Aland_123).
1 parent 707098a commit 8076e20

4 files changed

Lines changed: 0 additions & 16 deletions

File tree

dnscrypt-proxy/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ func main() {
3636
Description: "Encrypted/authenticated DNS proxy",
3737
WorkingDirectory: pwd,
3838
}
39-
if serviceUserName := serviceStartupUserName(); serviceUserName != nil {
40-
svcConfig.UserName = *serviceUserName
41-
}
4239
svcFlag := flag.String("service", "", fmt.Sprintf("Control the system service: %q", service.ControlAction))
4340
app := &App{}
4441
svc, err := service.New(app, svcConfig)

dnscrypt-proxy/privilege_linux.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ import (
1212
"github.com/jedisct1/dlog"
1313
)
1414

15-
func serviceStartupUserName() *string {
16-
return nil
17-
}
18-
1915
func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
2016
currentUser, err := user.Current()
2117
if err != nil && currentUser.Uid != "0" {

dnscrypt-proxy/privilege_others.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ import (
1414
"github.com/jedisct1/dlog"
1515
)
1616

17-
func serviceStartupUserName() *string {
18-
return nil
19-
}
20-
2117
func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
2218
currentUser, err := user.Current()
2319
if err != nil && currentUser.Uid != "0" {

dnscrypt-proxy/privilege_windows.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,4 @@ package main
22

33
import "os"
44

5-
func serviceStartupUserName() *string {
6-
userName := "NT AUTHORITY\\NetworkService"
7-
return &userName
8-
}
9-
105
func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {}

0 commit comments

Comments
 (0)