From: "cron2 (Code Review)" Date: Mon, 24 Mar 2025 07:20:37 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., antonio@...2726... Message-ID: <3cddf1d0c22b0df5763cff2053df0e8952032609-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="Za+tDmfZZYo="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Fix incorrect condition for checking password related check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: flichtenheld , openvpn-devel --Za+tDmfZZYo= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/91= 2?usp=3Demail ) Change subject: Fix incorrect condition for checking password related check ...................................................................... Fix incorrect condition for checking password related check Commit db48cea chagned logic to move logic from a variable and repeated checks to an if clause. The old code had const bool ccnr =3D (options->auth_user_pass_verify_script || PLUGIN_OPTION_LIST(options) || MAN_CLIENT_AUTH_ENABLED(options)); followed by several condition that checked !ccnr This commit fixes the if clause by correctly applying De Morgan's law. Github: closes OpenVPN/openvpn#706 Change-Id: I28a8abd0ee3fa9168a716171b0a405476089c4a1 Signed-off-by: Arne Schwabe Acked-by: Antonio Quartulli Message-Id: <20250323211359.14117-1-gert@...1296...> URL: https://sourceforge.net/p/openvpn/mailman/message/59164222/ URL: http://gerrit.openvpn.net/c/openvpn/+/912 Signed-off-by: Gert Doering --- M src/openvpn/options.c 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 67ef55b..ab56609 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2752,8 +2752,8 @@ } if (!options->auth_user_pass_verify_script - || PLUGIN_OPTION_LIST(options) - || MAN_CLIENT_AUTH_ENABLED(options)) + && !PLUGIN_OPTION_LIST(options) + && !MAN_CLIENT_AUTH_ENABLED(options)) { const char *use_err =3D "--%s must be used with --management-c= lient-auth, an --auth-user-pass-verify script, or plugin"; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/912?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: I28a8abd0ee3fa9168a716171b0a405476089c4a1 Gerrit-Change-Number: 912 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: ordex Gerrit-CC: openvpn-devel Gerrit-MessageType: merged --Za+tDmfZZYo= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 submitted this change.

View Change

Fix incorrect condition for checking password =
related check

Commit db48cea chagned logic to move logic from a vari= able and repeated
checks to an if clause.

The old code had
const bool ccnr =3D (options->auth_user_pass_verify_script<= br> || PLUGIN_OPTION_LIST(options)
= || MAN_CLIENT_AUTH_ENABLED(options));

foll= owed by several condition that checked !ccnr

This commit fixes the i= f clause by correctly applying De Morgan's law.

Github: closes O= penVPN/openvpn#706

Change-Id: I28a8abd0ee3fa9168a716171b0a405476089c= 4a1
Signed-off-by: Arne Schwabe <arne@...1227...>
Acked-by: Ant= onio Quartulli <antonio@...2726...>
Message-Id: <20250323211359= .14117-1-gert@...1296...>
URL: https://sourceforge.net/p/openvpn/mail= man/message/59164222/
URL: http://gerrit.openvpn.net/c/openvpn/+/912
= Signed-off-by: Gert Doering <gert@...1296...>
---
M src/openvpn= /options.c
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 67ef55b..ab56609 100644
--- a/src/openvpn/options.= c
+++ b/src/openvpn/options.c
@@ -2752,8 +2= 752,8 @@

}
= if (!options->auth_user_pass_verify_script
- || PLUGIN_OPTION_LIST(options)
- || MAN_CLIENT_= AUTH_ENABLED(options))
+ && !MAN_CLIENT_AUTH_= ENABLED(options))
{
c= onst char *use_err =3D "--%s must be used with --management-client-aut= h, an --auth-user-pass-verify script, or plugin";


To view, visit change 912. To unsubscribe, or = for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I28a8abd0ee3fa9168a716171b0a= 405476089c4a1
Gerrit-Change-Number: 912
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: ordex <antonio@...2726...&= gt;
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: merged
--Za+tDmfZZYo=--