From df0f4f1786dabda4e1b815caa668c7a10fe1e30d Mon Sep 17 00:00:00 2001 From: Selva Nair Date: Wed, 13 Feb 2019 14:41:50 -0500 Subject: [PATCH] A fixup for script-security error message and parse the error msg from OpenVPN proposed in patch #688 (patchwork) (to be squashed with previous commit c7462ab) Signed-off-by: Selva Nair --- openvpn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openvpn.c b/openvpn.c index a6be2ca..1cbb55a 100644 --- a/openvpn.c +++ b/openvpn.c @@ -141,8 +141,9 @@ static void SaveLastError(connection_t *c, const char *msg) { /* If we have enforced script security and there is script error, translate/re-word the error */ - if (get_script_security(c) != SSEC_UNDEF - && strstr(msg, "'--script-security 2' or higher is required to call user-defined scripts")) + if (!o.disable_ssec_override + && get_script_security(c) != SSEC_UNDEF + && strstr(msg, "disallowed by script-security setting")) { _sntprintf_0(c->last_error, LoadLocalizedString(IDS_ERR_SCRIPT_OVERRIDE)); }