From d06cc0f8ee89a0142c493b33d295272ba100aaf5 Mon Sep 17 00:00:00 2001
From: Aleksey Dmitrevskiy <ad@adguard.com>
Date: Mon, 11 Mar 2019 19:18:18 +0300
Subject: [PATCH] Fix #598 - [change] service: windows: register sercive to
 work under local system user

---
 dnsfilter/dnsfilter.go | 2 +-
 service.go             | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/dnsfilter/dnsfilter.go b/dnsfilter/dnsfilter.go
index 561ccb04..b33465f9 100644
--- a/dnsfilter/dnsfilter.go
+++ b/dnsfilter/dnsfilter.go
@@ -16,8 +16,8 @@ import (
 	"sync/atomic"
 	"time"
 
-	"github.com/bluele/gcache"
 	"github.com/AdguardTeam/golibs/log"
+	"github.com/bluele/gcache"
 	"golang.org/x/net/publicsuffix"
 )
 
diff --git a/service.go b/service.go
index d0bb7f67..792e1dd9 100644
--- a/service.go
+++ b/service.go
@@ -127,11 +127,6 @@ func configureService(c *service.Config) {
 	// POSIX
 	// Redirect StdErr & StdOut to files.
 	c.Option["LogOutput"] = true
-
-	// Windows
-	if runtime.GOOS == "windows" {
-		c.UserName = "NT AUTHORITY\\NetworkService"
-	}
 }
 
 // cleanupService called on the service uninstall, cleans up additional files if needed