summaryrefslogtreecommitdiffhomepage
path: root/ipc/uapi_windows.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-07-19 15:34:26 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-07-19 15:34:26 +0200
commit2f101fedec51ac87e53fc9c00720f0069893b9ee (patch)
tree24f188e2b34623c0a41d9bf7cc23c85f62ff9c8d /ipc/uapi_windows.go
parent3341e2d4448e51152c2e919f0a694c5667fa91dd (diff)
ipc: windows: match SDDL of WDK and make monkeyable
Diffstat (limited to 'ipc/uapi_windows.go')
-rw-r--r--ipc/uapi_windows.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/ipc/uapi_windows.go b/ipc/uapi_windows.go
index 32d5524..4073c97 100644
--- a/ipc/uapi_windows.go
+++ b/ipc/uapi_windows.go
@@ -47,20 +47,12 @@ func (l *UAPIListener) Addr() net.Addr {
return l.listener.Addr()
}
-func GetSystemSecurityDescriptor() string {
- //
- // SDDL encoded.
- //
- // (system = SECURITY_NT_AUTHORITY | SECURITY_LOCAL_SYSTEM_RID)
- // owner: system
- // grant: GENERIC_ALL to system
- //
- return "O:SYD:(A;;GA;;;SY)"
-}
+/* SDDL_DEVOBJ_SYS_ALL from the WDK */
+var UAPISecurityDescriptor = "O:SYD:P(A;;GA;;;SY)"
func UAPIListen(name string) (net.Listener, error) {
config := winpipe.PipeConfig{
- SecurityDescriptor: GetSystemSecurityDescriptor(),
+ SecurityDescriptor: UAPISecurityDescriptor,
}
listener, err := winpipe.ListenPipe("\\\\.\\pipe\\WireGuard\\"+name, &config)
if err != nil {