Project

General

Profile

Actions

Bug #7169

open

lua/output: vendored lua search for modules in /usr/local/ rather than /usr/

Added by Alexandre IOOSS 4 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

I am trying Suricata 8.0.0-dev on current master and I am noticing that the new builtin Lua engine does not use the same search path as Suricata 7.0.6 for Lua modules.

If I install `lua5.4-sqlite` in Alpine Linux, then try to require lsqlite3 in a Lua output script, I get the following error:

Error: output-lua: couldn't run script 'setup' function: suricata-output-testscript.lua:17: module 'lsqlite3' not found:
  no field package.preload['lsqlite3']
  no file '/usr/local/share/lua/5.4/lsqlite3.lua'
  no file '/usr/local/share/lua/5.4/lsqlite3/init.lua'
  no file '/usr/local/lib/lua/5.4/lsqlite3.lua'
  no file '/usr/local/lib/lua/5.4/lsqlite3/init.lua'
  no file './lsqlite3.lua'
  no file './lsqlite3/init.lua'
  no file '/usr/local/lib/lua/5.4/lsqlite3.so'
  no file '/usr/local/lib/lua/5.4/loadall.so'
  no file './lsqlite3.so' [LuaScriptSetup:output-lua.c:582]

This was working fine on Suricata 7.0.6: system-wide Lua modules were available to Suricata (e.e. `apk add suricata lua5.1-sqlite`).
Alpine Linux packages Lua modules in `/usr/lib/lua/5.x/lsqlite3.so`.

Related issue and commit:

Is this behavior intended? Shouldn't https://github.com/jasonish/suricata-lua-sys search for modules in `/usr/lib/lua/5.4/` rather than `/usr/local/lib/lua/5.4/`?


Related issues 1 (1 open0 closed)

Related to Suricata - Story #7128: lua: sandboxed lua support with mimimum set of bindingsNewVictor JulienActions
Actions

Also available in: Atom PDF