aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/manager
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-08-05 16:04:39 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-05 20:12:19 +0200
commitc1ee46faae672e8024cb114450d974232fe44a8b (patch)
tree161840e31285965c1aae7f51e7a769522ba22d58 /manager
parentelevate: require builtin admins group and proper reg key (diff)
downloadwireguard-windows-c1ee46faae672e8024cb114450d974232fe44a8b.tar.xz
wireguard-windows-c1ee46faae672e8024cb114450d974232fe44a8b.zip
elevate: move service/token into proper module
Diffstat (limited to 'manager')
-rw-r--r--manager/service.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/manager/service.go b/manager/service.go
index d6c7d922..585078fb 100644
--- a/manager/service.go
+++ b/manager/service.go
@@ -22,6 +22,7 @@ import (
"golang.org/x/sys/windows/svc"
"golang.zx2c4.com/wireguard/windows/conf"
+ "golang.zx2c4.com/wireguard/windows/elevate"
"golang.zx2c4.com/wireguard/windows/ringlogger"
"golang.zx2c4.com/wireguard/windows/services"
"golang.zx2c4.com/wireguard/windows/version"
@@ -102,7 +103,7 @@ func (service *managerService) Execute(args []string, r <-chan svc.ChangeRequest
if err != nil {
return
}
- if !services.TokenIsMemberOfBuiltInAdministrator(userToken) {
+ if !elevate.TokenIsMemberOfBuiltInAdministrator(userToken) {
userToken.Close()
return
}