diff --git a/src/detect-transform-luaxform.c b/src/detect-transform-luaxform.c index 75629f9f4a..5ed0c0de89 100644 --- a/src/detect-transform-luaxform.c +++ b/src/detect-transform-luaxform.c @@ -261,8 +261,7 @@ static int DetectTransformLuaxformSetup(DetectEngineCtx *de_ctx, Signature *s, c /* First check if Lua rules are enabled, by default Lua in rules * is disabled. */ int enabled = 0; - (void)SCConfGetBool("security.lua.allow-rules", &enabled); - if (!enabled) { + if (SCConfGetBool("security.lua.allow-rules", &enabled) == 1 && !enabled) { SCLogError("Lua rules disabled by security configuration: security.lua.allow-rules"); SCReturnInt(-1); }