From: "plaisthos (Code Review)" Date: Sun, 23 Mar 2025 12:06:42 +0000 References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="af5a6DpR5O0="; 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: flichtenheld Cc: openvpn-devel --af5a6DpR5O0= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/912?usp=3Demail to review the following change. 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 Margan's law. Change-Id: I28a8abd0ee3fa9168a716171b0a405476089c4a1 Signed-off-by: Arne Schwabe --- M src/openvpn/options.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/12/912/1 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: 1 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --af5a6DpR5O0= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld.

plaisthos would like flichtenheld to review this change.

Vi= ew Change

Fix incorrect condition for checking password related check
Commit db48cea chagned logic to move logic from a variable and repeat= ed
checks to an if clause.

The old code had

co= nst 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 cor= rectly applying De Margan's law.

Change-Id: I28a8abd0ee3fa9168a7= 16171b0a405476089c4a1
Signed-off-by: Arne Schwabe <arne@...1227...>= ;
---
M src/openvpn/options.c
1 file changed, 2 insertions(+), 2 d= eletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/=
changes/12/912/1
diff --git a/src/openvpn/options.c b/src/openvpn/o=
ptions.c
index 67ef55b..ab56609 100644
--- = a/src/openvpn/options.c
+++ b/src/openvpn/options.c<= br>@@ -2752,8 +2752,8 @@

}=
if (!options->auth_user_pass_verify_script
- || PLUGIN_OPT= ION_LIST(options)
- = || MAN_CLIENT_AUTH_ENABLED(options))
+ && !PLUGIN_OPTION_LIST(options= )
+ &&= amp; !MAN_CLIENT_AUTH_ENABLED(options))
{ const char *use_err =3D "--%s must be used with -= -management-client-auth, 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: 1
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--af5a6DpR5O0=--