From: Arne Schwabe Date: Sun, 23 Mar 2025 21:13:53 +0000 (+0100) Subject: Fix incorrect condition for checking password related check X-Git-Tag: v2.7_alpha1~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=15e663c898fe7a2350c35f5263cbad116cd5b61a;p=thirdparty%2Fopenvpn.git 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 = (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@greenie.muc.de> URL: https://sourceforge.net/p/openvpn/mailman/message/59164222/ URL: http://gerrit.openvpn.net/c/openvpn/+/912 Signed-off-by: Gert Doering --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 67ef55bf..ab566091 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2752,8 +2752,8 @@ options_postprocess_verify_ce(const struct options *options, } 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";