From: Jason A. Donenfeld Date: Sat, 31 Aug 2019 13:48:42 +0000 (-0600) Subject: ipc: windows: use protected prefix X-Git-Tag: 0.0.20190908~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7937840f9631fbaaab33bdbad67040b28f5d0387;p=thirdparty%2Fwireguard-go.git ipc: windows: use protected prefix --- diff --git a/ipc/uapi_windows.go b/ipc/uapi_windows.go index 4073c97..784b2a8 100644 --- a/ipc/uapi_windows.go +++ b/ipc/uapi_windows.go @@ -54,7 +54,7 @@ func UAPIListen(name string) (net.Listener, error) { config := winpipe.PipeConfig{ SecurityDescriptor: UAPISecurityDescriptor, } - listener, err := winpipe.ListenPipe("\\\\.\\pipe\\WireGuard\\"+name, &config) + listener, err := winpipe.ListenPipe(`\\.\pipe\ProtectedPrefix\Administrators\WireGuard\`+name, &config) if err != nil { return nil, err } diff --git a/ipc/winpipe/sd.go b/ipc/winpipe/sd.go index 4456917..64728ba 100644 --- a/ipc/winpipe/sd.go +++ b/ipc/winpipe/sd.go @@ -33,4 +33,4 @@ func SddlToSecurityDescriptor(sddl string) ([]byte, error) { sd := make([]byte, getSecurityDescriptorLength(sdBuffer)) copy(sd, (*[0xffff]byte)(unsafe.Pointer(sdBuffer))[:len(sd)]) return sd, nil -} \ No newline at end of file +}