From: Selva Nair Date: Wed, 17 Feb 2021 00:04:35 +0000 (-0500) Subject: Quote the domain name argument passed to the wmic command X-Git-Tag: v2.6_beta1~622 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3338f2d5a2b7f12f314cc53bf0eaa44ba4f2e58c;p=thirdparty%2Fopenvpn.git Quote the domain name argument passed to the wmic command It appears wmic needs domain names containing hyphens to be quoted. Trac #1375 Signed-off-by: Selva Nair Acked-by: Gert Doering 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 --- diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 65bb10629..5d5cbfe60 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -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 */