|
From: Gert D. <ge...@gr...> - 2025-03-23 21:14:19
|
From: Arne Schwabe <ar...@rf...>
Commit db48cea chagned logic to move logic from a variable and repeated
checks to an if clause.
The old code had
const bool ccnr = (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 <ar...@rf...>
Acked-by: Antonio Quartulli <a...@un...>
---
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/+/912
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Antonio Quartulli <a...@un...>
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 = "--%s must be used with --management-client-auth, an --auth-user-pass-verify script, or plugin";
|