winpipe: use x/sys/windows instead of syscall
This commit is contained in:
parent
70f6c42556
commit
01f8ef4e84
7 changed files with 128 additions and 229 deletions
|
|
@ -8,6 +8,8 @@ package ipc
|
|||
import (
|
||||
"net"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
|
||||
"golang.zx2c4.com/wireguard/ipc/winpipe"
|
||||
)
|
||||
|
||||
|
|
@ -47,8 +49,16 @@ func (l *UAPIListener) Addr() net.Addr {
|
|||
return l.listener.Addr()
|
||||
}
|
||||
|
||||
/* SDDL_DEVOBJ_SYS_ALL from the WDK */
|
||||
var UAPISecurityDescriptor = "O:SYD:P(A;;GA;;;SY)"
|
||||
var UAPISecurityDescriptor *windows.SECURITY_DESCRIPTOR
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
/* SDDL_DEVOBJ_SYS_ALL from the WDK */
|
||||
UAPISecurityDescriptor, err = windows.SecurityDescriptorFromString("O:SYD:P(A;;GA;;;SY)")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func UAPIListen(name string) (net.Listener, error) {
|
||||
config := winpipe.PipeConfig{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue