]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Quote the domain name argument passed to the wmic command
authorSelva Nair <selva.nair@gmail.com>
Wed, 17 Feb 2021 00:04:35 +0000 (19:04 -0500)
committerGert Doering <gert@greenie.muc.de>
Wed, 24 Feb 2021 07:15:00 +0000 (08:15 +0100)
It appears wmic needs domain names containing hyphens to
be quoted.

Trac #1375

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1613520275-28637-1-git-send-email-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21570.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpnserv/interactive.c

index 65bb10629152fc5659284832c63fc17dbf1f53a3..5d5cbfe60324944eab4316d123438641a62b2d5d 100644 (file)
@@ -1104,7 +1104,7 @@ wmic_nicconfig_cmd(const wchar_t *action, const NET_IFINDEX if_index,
     }
     else
     {
-       fmt = L"wmic nicconfig where (InterfaceIndex=%ld) call %s %s";
+       fmt = L"wmic nicconfig where (InterfaceIndex=%ld) call %s \"%s\"";
     }
 
     size_t ncmdline = wcslen(fmt) + 20 + wcslen(action) /* max 20 for ifindex */