From patchwork Fri Jun 27 08:24:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4293 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:3846:b0:671:5a2c:6455 with SMTP id n6csp745857mal; Fri, 27 Jun 2025 01:25:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVoxUx+aVSjDMP1JAACwYpubOGncEPczzhds7BIUHYFAmvo1PyxZ1xeWFaQV1scZycEUan0uGNnijQ=@openvpn.net X-Google-Smtp-Source: AGHT+IF21tO49E0gZ7ImAfcK8SVRzVjh4DDg4oJDtfb2jOCw4VeYpADL2A/NH/6RCNkh0W3I2C7g X-Received: by 2002:a05:6602:27c4:b0:86c:cf7e:d85d with SMTP id ca18e2360f4ac-876883a5390mr331559939f.12.1751012725490; Fri, 27 Jun 2025 01:25:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1751012725; cv=none; d=google.com; s=arc-20240605; b=jihcp0GM4dUKcAWW69Fh0RrKbQGYH+wFcp5qEn6Y03XJkpXfhCH4V4xKCuGwzCpuO7 ytfo8JSlVZbow2DMkrJOVwB0rYM2OBCd5Q5s25ZnQ7oP2VIhnbL23eE/zIfHh1ntJ1tW 8K315C1KMrYSWE6Dv9LWLnu9R/Tl/5o0Cb+GYz48XwdBLxrEvkWtyF+IW+r9o3gGOZvB Yo5W+8DLrH2t6roqEQl9n41LdYOFBdx+1Fm4QBWQ0oY+Diq1ngn6E9L1B8PRmADUEO1w XswMHCGmcVAjyq7nmQ5ygogEdDmIs2//An+vZ10r2DoI99eVf+uQOIlNQmYN8R7DO14Q 0YDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=hrrjkKh9pyrPtYPW78COnMuczx1p5NRST+DMmkXj3lw=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=AI4lEgEnabu24KY1XpGLgECuJeiM+5exsLol+QCVnhXF0r9nLVPI4arrOTmT6UbjWe 5hKKzE7dDfykeDODYcC+Cya8U0mSum+5JjXyT/mqPUc62MfaIlihJrSHPSOlh9NPKDUa xYyekdrX2RDAiJuc8y9VhwUFDXKRBMbF2YqB+ViI5Im+OnY4J6TLLzoDXHkpsu3wjaze XA4C5Z52co/Zrj9Ly0U9maxHpjJmRhlSXiq8/eMV4u/7flvlq7XxrK5uRct8CwbqNFmo uTtp2/2BzpfYimIzKTv4NuIE5pOjYyaq1kIBkzw3AJrtsfn5qH0MsoR6hmik0SmEHlr4 MAaA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=NgKp61WN; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=kTJcg9+r; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="V5t/Vyq5"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id ca18e2360f4ac-87687ae2edesi223581739f.80.2025.06.27.01.25.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jun 2025 01:25:25 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=NgKp61WN; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=kTJcg9+r; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="V5t/Vyq5"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hrrjkKh9pyrPtYPW78COnMuczx1p5NRST+DMmkXj3lw=; b=NgKp61WNqasLHqVxvTo1qTwkTt fl0J21DY+TVMlincrY8drG0rSeR7N+ZcqnBuqlWckwXKlI7Yq6RqBpf3V4MwoFiygymXP8px3SD4p csYAL0L8XR9X+HctUcuTraAtUznrGxrmo8BIL9VKcrPmQG+Fs//JYHmUqweEUu50WQvM=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1uV4Oc-0004Wx-9g; Fri, 27 Jun 2025 08:25:18 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uV4OY-0004Wn-Io for openvpn-devel@lists.sourceforge.net; Fri, 27 Jun 2025 08:25:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vbDQ9+v2kT5fn1CIC6w/qna0Qws8q4Tm3U22LEV0Pho=; b=kTJcg9+rwLMjMQ+LwNnj5N3hl3 hf5GdJFDXXgwnED93UMSLRPBH0xBG9tJjirC04nWGUxtKBX/ENccDSeMNxuR1yqWlZeh9ekgXUYYM lxhgyDzVdkHqCXdV8NlBK80SigI0Qz8y9tKUi3bKVKygeyG10MBOCfvc1e6wvjpZbxiE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=vbDQ9+v2kT5fn1CIC6w/qna0Qws8q4Tm3U22LEV0Pho=; b=V5t/Vyq5gw6Q8AXq8dM8y5oQJb KtRRrM6MmW5XH8eJfFYnHVYWIXUxL/wqxZ64s9gJR3+h7NDWSgi7x6lMUFSR6ipRjWm6+FgeGcZz4 uGvj9xfvj2BYSNPhVL4/yct5Dn1Wi6sJKKOca4hDocPlIZ1b2WrMFvz9vqHEBuAwwtQY=; Received: from [193.149.48.143] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1uV4OX-0000jp-0S for openvpn-devel@lists.sourceforge.net; Fri, 27 Jun 2025 08:25:14 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 55R8P1fa017133 for ; Fri, 27 Jun 2025 10:25:01 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 55R8P0BW017132 for openvpn-devel@lists.sourceforge.net; Fri, 27 Jun 2025 10:25:00 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 27 Jun 2025 10:24:53 +0200 Message-ID: <20250627082500.17075-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Heiko Hund Windows 2019 Server by default does not have the key where local system NRPT rules are stored. Tests have determined that NRPT is actually working when rules are created under the key. So, instead of [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1uV4OX-0000jp-0S Subject: [Openvpn-devel] [PATCH v3] dns: create NRPT registry key if it doesn't exist 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1836069919894960821?= X-GMAIL-MSGID: =?utf-8?q?1836069919894960821?= From: Heiko Hund Windows 2019 Server by default does not have the key where local system NRPT rules are stored. Tests have determined that NRPT is actually working when rules are created under the key. So, instead of failing if the key doesn't exist, we create it, and things will start working. Github: OpenVPN/openvpn#768 Change-Id: I46132ebaf3bf3b16798b6f2416f7bf7272f5646b Signed-off-by: Heiko Hund Acked-by: Lev Stipakov --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1069 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Lev Stipakov diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 3bd2722..628a96b 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2662,7 +2662,7 @@ if (err == ERROR_FILE_NOT_FOUND) { *gpol = FALSE; - err = RegOpenKeyExA(HKEY_LOCAL_MACHINE, sys_key, 0, KEY_ALL_ACCESS, &nrpt); + err = RegCreateKeyExA(HKEY_LOCAL_MACHINE, sys_key, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &nrpt, NULL); if (err) { nrpt = INVALID_HANDLE_VALUE;