summaryrefslogtreecommitdiffhomepage
path: root/tun
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-09-16 23:39:16 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-09-16 23:39:16 -0600
commit01f8ef4e84a0354d33c32130f11c88d37d5f514d (patch)
tree62c251433f8a4e3a163821d6a442a3549d67ee38 /tun
parent70f6c42556afad75fa5c9734fe02cd8d2679ed0b (diff)
winpipe: use x/sys/windows instead of syscall
Diffstat (limited to 'tun')
-rw-r--r--tun/wintun/namespace_windows.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/tun/wintun/namespace_windows.go b/tun/wintun/namespace_windows.go
index de781a5..4530aee 100644
--- a/tun/wintun/namespace_windows.go
+++ b/tun/wintun/namespace_windows.go
@@ -16,7 +16,6 @@ import (
"golang.org/x/sys/windows"
"golang.org/x/text/unicode/norm"
- "golang.zx2c4.com/wireguard/ipc/winpipe"
"golang.zx2c4.com/wireguard/tun/wintun/namespaceapi"
)
@@ -32,13 +31,13 @@ func initializeNamespace() error {
if hasInitializedNamespace {
return nil
}
- sd, err := winpipe.SddlToSecurityDescriptor("O:SYD:P(A;;GA;;;SY)")
+ sd, err := windows.SecurityDescriptorFromString("O:SYD:P(A;;GA;;;SY)")
if err != nil {
return fmt.Errorf("SddlToSecurityDescriptor failed: %v", err)
}
wintunObjectSecurityAttributes = &windows.SecurityAttributes{
Length: uint32(unsafe.Sizeof(windows.SecurityAttributes{})),
- SecurityDescriptor: uintptr(unsafe.Pointer(&sd[0])),
+ SecurityDescriptor: uintptr(unsafe.Pointer(sd)),
}
sid, err := windows.CreateWellKnownSid(windows.WinLocalSystemSid)
if err != nil {