From: "cron2 (Code Review)" Date: Sat, 28 Jun 2025 16:30:42 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., heiko@...515..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277... Message-ID: <63d5c9784708079815828a5e83a4748bbff5acae-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="lIo42EYL4vo="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: dns: create NRPT registry key if it doesn't exist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: d12fk , plaisthos , flichtenheld , stipa Cc: openvpn-devel --lIo42EYL4vo= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#4) to the change originally created by= d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1069?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by stipa Change subject: dns: create NRPT registry key if it doesn't exist ...................................................................... dns: create NRPT registry key if it doesn't exist 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 Message-Id: <20250627082500.17075-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 001.html Signed-off-by: Gert Doering --- M src/openvpnserv/interactive.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/69/1069/4 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 =3D=3D ERROR_FILE_NOT_FOUND) { *gpol =3D FALSE; - err =3D RegOpenKeyExA(HKEY_LOCAL_MACHINE, sys_key, 0, KEY_ALL_ACCE= SS, &nrpt); + err =3D RegCreateKeyExA(HKEY_LOCAL_MACHINE, sys_key, 0, NULL, 0, K= EY_ALL_ACCESS, NULL, &nrpt, NULL); if (err) { nrpt =3D INVALID_HANDLE_VALUE; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1069?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I46132ebaf3bf3b16798b6f2416f7bf7272f5646b Gerrit-Change-Number: 1069 Gerrit-PatchSet: 4 Gerrit-Owner: d12fk Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-Reviewer: stipa Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --lIo42EYL4vo= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #4 to the change originally cr= eated by d12fk.

View Change

The following approvals got outdated an= d were removed: Code-Review+2 by stipa

dns: create NRPT registry key if it doesn't exis=
t

Windows 2019 Server by default does not have the key where local s= ystem
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: I46132ebaf3bf3b16798b6f24= 16f7bf7272f5646b
Signed-off-by: Heiko Hund <heiko@...2662...>
A= cked-by: Lev Stipakov <lstipakov@...277...>
Message-Id: <202506= 27082500.17075-1-gert@...1296...>
URL: https://www.mail-archive.com/o= penvpn-devel@lists.sourceforge.net/msg32001.html
Signed-off-by: Gert Doe= ring <gert@...1296...>
---
M src/openvpnserv/interactive.c
1= file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerri=
t.openvpn.net:29418/openvpn refs/changes/69/1069/4
diff --git a/src=
/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
= index 3bd2722..628a96b 100644
--- a/src/openvpnserv/interac= tive.c
+++ b/src/openvpnserv/interactive.c
= @@ -2662,7 +2662,7 @@
if (err =3D=3D ERROR_FILE_NOT_FO= UND)
{
*gpol =3D FALSE;
- err =3D RegOpenKeyE= xA(HKEY_LOCAL_MACHINE, sys_key, 0, KEY_ALL_ACCESS, &nrpt);
+ err =3D RegCreateKeyExA(= HKEY_LOCAL_MACHINE, sys_key, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &nrpt, N= ULL);

if (err)
{ nrpt =3D INVALID_HANDLE_VALUE;
=

To view, visit change 1069. To unsubscribe, or for help writing ma= il filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I46132ebaf3bf3b16798b6f2416f= 7bf7272f5646b
Gerrit-Change-Number: 1069
Gerrit-PatchSet: 4
Gerrit-Owner: d12fk <heiko@...515...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-Reviewer: stipa <lstipakov@...277...= >
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--lIo42EYL4vo=--