mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
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:
parent
6b3f25eb2a
commit
c1be897eed
9 changed files with 46 additions and 40 deletions
|
|
@ -33,7 +33,7 @@ int main (int argc, char **argv)
|
|||
{
|
||||
#ifdef LUABINDINGDOC
|
||||
luabridge::setPrintBindings (true);
|
||||
LuaState lua;
|
||||
LuaState lua (false, false);
|
||||
lua_State* L = lua.getState ();
|
||||
#ifdef LUADOCOUT
|
||||
printf ("-- %s\n", ARDOUR::revision);
|
||||
|
|
@ -42,7 +42,7 @@ int main (int argc, char **argv)
|
|||
printf ("[\n");
|
||||
printf ("{\"version\" : \"%s\"},\n\n", ARDOUR::revision);
|
||||
#endif
|
||||
LuaInstance::register_classes (L);
|
||||
LuaInstance::register_classes (L, false);
|
||||
LuaInstance::register_hooks (L);
|
||||
ARDOUR::LuaBindings::dsp (L);
|
||||
#ifdef LUADOCOUT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue