]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
uapi: windows: work out pipe semantics
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 8 Mar 2019 00:40:54 +0000 (01:40 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 8 Mar 2019 00:40:54 +0000 (01:40 +0100)
Pipes can be arranged like this, so that's fine. We also apply a strict
SDDL that can't be inherited and only gives access to local system.

Developed-with: Odd Stranne <odd@mullvad.net>

ipc/uapi_windows.go

index 209d0d2592130b827ef261ff419901971f5df406..158c5a826e55f2bec933182ea9e04429db7014e3 100644 (file)
@@ -48,9 +48,9 @@ func (l *UAPIListener) Addr() net.Addr {
 
 func UAPIListen(name string) (net.Listener, error) {
        config := winio.PipeConfig{
-               SecurityDescriptor: "", //TODO: we want this to be a very locked down pipe.
+               SecurityDescriptor: "O:SYD:P(A;;GA;;;SY)", /* Local System only, not inheritable */
        }
-       listener, err := winio.ListenPipe("\\\\.\\pipe\\wireguard\\"+name, &config) //TODO: choose sane name.
+       listener, err := winio.ListenPipe("\\\\.\\pipe\\WireGuard\\"+name, &config)
        if err != nil {
                return nil, err
        }