Merge pull request #2608 in SNORT/snort3 from ~SHRARANG/snort3:lua_sandbox to master
Squashed commit of the following:
commit
bd0c2a888b69a9791bb2b8dd196c8a6fdd53ca1c
Author: Shravan Rangaraju <shrarang@cisco.com>
Date: Fri Jul 31 12:05:26 2020 -0400
shell: support for loading configuration in lua sandbox
Load snort configuration in a Lua sandbox. Sandbox configuration file can be specified
with the command line option "--lua-sandbox". Snort expects this file to contain a Lua
table named sandbox_env. sandbox_env should specify a list of allowed Lua functions.
This table is used as the sandbox environment. Snort loads the following in the sandbox:
- top-level configuration file specified by command line option "-c"
- subpolicy files
- all of the included files in above files and also files included in the included files
- configuration overrides specified with command line option "--lua"
If any of the above use Lua functionality not allowed in sandbox_env, snort will exit with
a fatal error.