aboutsummaryrefslogtreecommitdiffstats
path: root/tun/wintun/namespace_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'tun/wintun/namespace_windows.go')
-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 {