mirror of
https://github.com/KusakabeShi/EtherGuard-VPN.git
synced 2025-08-14 10:14:50 +02:00
winpipe: use x/sys/windows instead of syscall
This commit is contained in:
@ -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{
|
||||
|
Reference in New Issue
Block a user