]> git.ipfire.org Git - thirdparty/suricata.git/commit
lua: add "builtins" file to consolidate registration 12462/head
authorJason Ish <jason.ish@oisf.net>
Wed, 22 Jan 2025 22:32:35 +0000 (16:32 -0600)
committerVictor Julien <victor@inliniac.net>
Thu, 23 Jan 2025 18:10:50 +0000 (19:10 +0100)
commitd63ad75d91014018acd950b0a35e03e23c38e8cc
treee64b4a68f8584f49632d6d41e17bfaac7bd97a9a
parentc8b28b1512141c57e1d5cf5216aea07ba13371bf
lua: add "builtins" file to consolidate registration

Use a single array of built-ins and provide 2 functions for
registering them:

- SCLuaLoadBuiltIn: for loading built-in modules in sandboxed
  environments.

- SCLuaRequirefBuiltIns: registers built-in modules with the standard
  package tool, allows built-ins to be loaded by output scripts that are
  not restricted

I hope to refactor the sandbox so they can use SCLuaRequirefBuiltIns
as well.
src/Makefile.am
src/output-lua.c
src/util-lua-builtins.c [new file with mode: 0644]
src/util-lua-builtins.h [new file with mode: 0644]
src/util-lua-dataset.c
src/util-lua-dataset.h
src/util-lua-sandbox.c