Explicitly sandbox Lua instances (3/4)

This allows UI scripts (saved in preferences) to access
os.* functions (non-sandboxed), while preventing other
scripts to do so.

Lua scripts that can run os commands can execute arbitrary
code on the system. While this is a nice feature, it can be
equally dangerous.
This commit is contained in:
Robin Gareus 2023-10-04 02:07:13 +02:00
parent 6b3f25eb2a
commit c1be897eed
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
9 changed files with 46 additions and 40 deletions

View file

@ -1869,6 +1869,7 @@ ProcessorEntry::PluginInlineDisplay::display_frame (cairo_t* cr, double w, doubl
ProcessorEntry::LuaPluginDisplay::LuaPluginDisplay (ProcessorEntry& e, std::shared_ptr<ARDOUR::LuaProc> p, uint32_t max_height)
: PluginInlineDisplay (e, p, max_height)
, _luaproc (p)
, lua_gui (true, true)
, _lua_render_inline (0)
{
p->setup_lua_inline_gui (&lua_gui);