From patchwork Tue Feb 16 13:04:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 1598 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id GL2PCfpdLGBcbwAAIUCqbw (envelope-from ) for ; Tue, 16 Feb 2021 19:06:18 -0500 Received: from proxy6.mail.iad3b.rsapps.net ([172.31.255.6]) by director10.mail.ord1d.rsapps.net with LMTP id kCQ9CfpdLGCIVwAApN4f7A (envelope-from ) for ; Tue, 16 Feb 2021 19:06:18 -0500 Received: from smtp16.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy6.mail.iad3b.rsapps.net with LMTPS id IJiyA/pdLGBYFAAARawThA (envelope-from ) for ; Tue, 16 Feb 2021 19:06:18 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp16.gate.iad3b.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: f49b8254-70b3-11eb-88d9-5254004ed364-1-1 Received: from [216.105.38.7] ([216.105.38.7:35526] helo=lists.sourceforge.net) by smtp16.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 73/9F-06823-9FD5C206; Tue, 16 Feb 2021 19:06:17 -0500 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1lCALK-0007AR-Gu; Wed, 17 Feb 2021 00:05:22 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCALF-00079s-Sz for openvpn-devel@lists.sourceforge.net; Wed, 17 Feb 2021 00:05:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Vmc1zYYrXteAPX1zDGNYp63p8qXVNY6AzgcRBBEHeWI=; b=GozIbePollgIBxq0JZ/9XLQHMb ASSY7rl3yTSLwNsKXcQ9ECB0dt2K0x9njb0fA0zR2DY8Yps/HXlwQy0UlVi7ymwHKqPVbJ0TCRZkH kzJeDpfzGfdwo5T+devUbMi50xxXy/2Cwl2Wb/XhH3lSpckeCb2/o+tyg7qEe7w8enWc=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Vmc1zYYrXteAPX1zDGNYp63p8qXVNY6AzgcRBBEHeWI=; b=PAoheWUQ9DT/3GlQFbMmTgfUz6 i6mmOtaqMrQrSq+iNSaM9NwDEDBMkFkDl/pW+dfgDskgC4lsJcFeFabLUYXuQv3Ug3fkaE+tHhYjF lernLcImGopZrFQp5LhkL7tvdPmJw/oKVRgm2GK7un5y4f3g3FaCIywhauykhmdh4ON8=; Received: from mail-qk1-f181.google.com ([209.85.222.181]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) id 1lCAL8-0004z3-1i for openvpn-devel@lists.sourceforge.net; Wed, 17 Feb 2021 00:05:17 +0000 Received: by mail-qk1-f181.google.com with SMTP id q85so11247289qke.8 for ; Tue, 16 Feb 2021 16:05:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Vmc1zYYrXteAPX1zDGNYp63p8qXVNY6AzgcRBBEHeWI=; b=E0iICVjpBCnscaV6URjfUralldDD3c3mOYw6pyBk7K0LHrrqzYt8ha4nCmbIbTYiYz NhCRvm6jdGSwQLyya/m+iaieZ2S4rXIVEDuqc19woNBSur61o5MP/0KVMLm5JWWnxKUE Uv3bhaQtP0I2O68D2M7ISYaip/m6N2RUGkopsl4SKZOGgTlsx1LFwOa4vbWe2R0HAnV+ smXDCbuGyQz0FdrWEdqPR6HOIIo3Msrm/U2/4DSDjTYv/v/W02BXw2N5kLwxSx4hadlG 0JnPMXiC0mQkn+khNpekwKj34kqy5t34e1UMsX6tWub/IaMAjTSvD5l+3YkNWZeOHlTt jhGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Vmc1zYYrXteAPX1zDGNYp63p8qXVNY6AzgcRBBEHeWI=; b=cmfStkRe7Aoeo+ZPctvxr2zVGcXVFDoaXSPzNt16C1eWF4AH3rXaL6MO3eZ9YiPxRS y4uvdlzb54Qc1aV5zCCimbsn2mJX6P/0EZwUep5KDznjQltZ3BHcUWd1Gl+DsuDrHCZq 5VnSYYs8pUzUePuOCcPf0kxgyZXQ4nh5MeN9c5tod112aEkGo5P1xsY63ouVcJrIWZVz j4+QCCvgJYLvWv2QlhbFE4wRT2TuMQTW/uQ2dCZvdp+Jf1zwT1kriDq/mW+QSETBiLQV 4l+mzPKUfmaeEErlGwnebDY7NBJ8PODWpMQw3d95WXxVpmcrLQ14INjGMeSgwDhCu9Qx rYsg== X-Gm-Message-State: AOAM531rSHAVCBw234rhv/lfsyCBQEa3vtl/zJRZpLqhOxZkivmMwBb5 qjigZHtHke8E33sFfsy9kpimzZ1NdZU= X-Google-Smtp-Source: ABdhPJwKrFBsdZZJAbVWLdD+u7pHyWn7LS3+qPGfBgjeuPPNT6vV0ZF4FAdHqUsPVpUCVPhK/URTFg== X-Received: by 2002:a37:7641:: with SMTP id r62mr22829055qkc.227.1613520304099; Tue, 16 Feb 2021 16:05:04 -0800 (PST) Received: from saturn.home.sansel.ca (cpe788df74daaa3-cm788df74daaa0.cpe.net.cable.rogers.com. [99.229.145.159]) by smtp.gmail.com with ESMTPSA id 126sm435714qkn.70.2021.02.16.16.05.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Feb 2021 16:05:03 -0800 (PST) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Tue, 16 Feb 2021 19:04:35 -0500 Message-Id: <1613520275-28637-1-git-send-email-selva.nair@gmail.com> X-Mailer: git-send-email 2.1.4 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.222.181 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (selva.nair[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.222.181 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1lCAL8-0004z3-1i Subject: [Openvpn-devel] [PATCH] Quote the domain name argument passed to the wmic command X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Selva Nair It appears wmic needs domain names containing hyphens to be quoted. Trac #1375 Signed-off-by: Selva Nair Acked-by: Gert Doering --- src/openvpnserv/interactive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 65bb106..5d5cbfe 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 */