diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-09-16 23:36:49 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-09-23 15:29:18 +0200 |
commit | 6f66c7697d3bb6a259bf8d0261490cdee0ef8986 (patch) | |
tree | 1f123998f801c375674326ba7946da568be32df0 /elevate/shellexecute.go | |
parent | updater: use correct length for security attributes (diff) | |
download | wireguard-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 '')
-rw-r--r-- | elevate/shellexecute.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/elevate/shellexecute.go b/elevate/shellexecute.go index 2c4190e0..b1dcc155 100644 --- a/elevate/shellexecute.go +++ b/elevate/shellexecute.go @@ -45,7 +45,8 @@ func ShellExecute(program string, arguments string, directory string, show int32 } }() - processToken, err := windows.OpenCurrentProcessToken() + var processToken windows.Token + err = windows.OpenProcessToken(windows.GetCurrentProcess(), windows.TOKEN_QUERY|windows.TOKEN_DUPLICATE, &processToken) if err != nil { return } |