aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel/winipcfg/winipcfg_test.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-09-16 23:36:49 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-09-23 15:29:18 +0200
commit6f66c7697d3bb6a259bf8d0261490cdee0ef8986 (patch)
tree1f123998f801c375674326ba7946da568be32df0 /tunnel/winipcfg/winipcfg_test.go
parentupdater: use correct length for security attributes (diff)
downloadwireguard-windows-6f66c7697d3bb6a259bf8d0261490cdee0ef8986.tar.xz
wireguard-windows-6f66c7697d3bb6a259bf8d0261490cdee0ef8986.zip
global: use SECURITY_DESCRIPTOR apis from x/sys/windows
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel/winipcfg/winipcfg_test.go')
-rw-r--r--tunnel/winipcfg/winipcfg_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tunnel/winipcfg/winipcfg_test.go b/tunnel/winipcfg/winipcfg_test.go
index 36ef2849..2b0c5ff5 100644
--- a/tunnel/winipcfg/winipcfg_test.go
+++ b/tunnel/winipcfg/winipcfg_test.go
@@ -56,7 +56,8 @@ var (
)
func runningElevated() bool {
- process, err := windows.OpenCurrentProcessToken()
+ var process windows.Token
+ err := windows.OpenProcessToken(windows.GetCurrentProcess(), windows.TOKEN_QUERY, &process)
if err != nil {
return false
}