namedpipe: rename from winpipe to keep in sync with CL299009

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2021-10-30 02:39:56 +02:00
parent eb6302c7eb
commit c07dd60cdb
7 changed files with 132 additions and 475 deletions

View File

@@ -9,8 +9,7 @@ import (
"net"
"golang.org/x/sys/windows"
"golang.zx2c4.com/wireguard/ipc/winpipe"
"golang.zx2c4.com/wireguard/ipc/namedpipe"
)
// TODO: replace these with actual standard windows error numbers from the win package
@@ -61,10 +60,9 @@ func init() {
}
func UAPIListen(name string) (net.Listener, error) {
config := winpipe.ListenConfig{
listener, err := (&namedpipe.ListenConfig{
SecurityDescriptor: UAPISecurityDescriptor,
}
listener, err := winpipe.Listen(`\\.\pipe\ProtectedPrefix\Administrators\WireGuard\`+name, &config)
}).Listen(`\\.\pipe\ProtectedPrefix\Administrators\WireGuard\` + name)
if err != nil {
return nil, err
}