Revert "Install the windows service as "NT AUTHORITY\NetworkService""

This reverts commit 17db0a658f.

On Windows, switching to user `NT AUTHORITY\NetworkService` apparently
breaks logging (reported by @Aland_123).
This commit is contained in:
Frank Denis 2019-03-14 20:09:23 +01:00
parent 707098a922
commit 8076e206e0
4 changed files with 0 additions and 16 deletions

View File

@ -36,9 +36,6 @@ func main() {
Description: "Encrypted/authenticated DNS proxy", Description: "Encrypted/authenticated DNS proxy",
WorkingDirectory: pwd, WorkingDirectory: pwd,
} }
if serviceUserName := serviceStartupUserName(); serviceUserName != nil {
svcConfig.UserName = *serviceUserName
}
svcFlag := flag.String("service", "", fmt.Sprintf("Control the system service: %q", service.ControlAction)) svcFlag := flag.String("service", "", fmt.Sprintf("Control the system service: %q", service.ControlAction))
app := &App{} app := &App{}
svc, err := service.New(app, svcConfig) svc, err := service.New(app, svcConfig)

View File

@ -12,10 +12,6 @@ import (
"github.com/jedisct1/dlog" "github.com/jedisct1/dlog"
) )
func serviceStartupUserName() *string {
return nil
}
func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) { func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
currentUser, err := user.Current() currentUser, err := user.Current()
if err != nil && currentUser.Uid != "0" { if err != nil && currentUser.Uid != "0" {

View File

@ -14,10 +14,6 @@ import (
"github.com/jedisct1/dlog" "github.com/jedisct1/dlog"
) )
func serviceStartupUserName() *string {
return nil
}
func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) { func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
currentUser, err := user.Current() currentUser, err := user.Current()
if err != nil && currentUser.Uid != "0" { if err != nil && currentUser.Uid != "0" {

View File

@ -2,9 +2,4 @@ package main
import "os" import "os"
func serviceStartupUserName() *string {
userName := "NT AUTHORITY\\NetworkService"
return &userName
}
func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {} func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {}