From 01f8ef4e84a0354d33c32130f11c88d37d5f514d Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 16 Sep 2019 23:39:16 -0600 Subject: winpipe: use x/sys/windows instead of syscall --- tun/wintun/namespace_windows.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tun') 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 { -- cgit v1.2.3