Now that sandboxing is in place, lua rule support is enabled by default.
security:
lua:
- # Allow Lua rules. Disabled by default.
- #allow-rules: false
+ # Allow Lua rules. Enabled by default.
+ #allow-rules: true
# Upper bound of allocations by a Lua rule before it will fail
#max-bytes: 500000
Lua Scripting for Detection
===========================
-.. note:: Lua is disabled by default for use in rules, it must be
- enabled in the configuration file. See the ``security.lua``
- section of ``suricata.yaml`` and enable ``allow-rules``.
-
Syntax:
::
/* 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");
return -1;
}
- @e_sysconfdir@
lua:
- # Allow Lua rules. Disabled by default.
- #allow-rules: false
+ # Allow Lua rules. Enabled by default.
+ #allow-rules: true
# Some logging modules will use that name in event as identifier. The default
# value is the hostname