Quote the domain name argument passed to the wmic command
PATCH 1/1 Quote the domain name argument passed to the wmic command
From: Selva Nair <[email protected]...>
It appears wmic needs domain names containing hyphens to be quoted.
Trac #1375
Signed-off-by Selva Nair <[email protected]...>
--- src/openvpnserv/interactive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpnserv/interactive.c +1 -1
@@ -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 */
Signature · 1 line
2.1.4
Acked-by Gert Doering <[email protected]...>
From reading the ticket, this seems like a necessary change. I have not tested this, just looked at the code change, which is trivial enough.
Your patch has been applied to the master and release/2.5 branch.
commit 3338f2d5a2b7f12f314cc53bf0eaa44ba4f2e58c (master) commit 2c8ef6fd2abbaef2e8c458690be545c171e11afe (release/2.5)
Author: Selva Nair Date: Tue Feb 16 19:04:35 2021 -0500
Quote the domain name argument passed to the wmic command
Signed-off-by: Selva Nair <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg21570.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering