- added first round of security sandboxing for lua scripts (disable the os library)

This commit is contained in:
Mark Vejvoda
2012-10-11 05:17:37 +00:00
parent 8cc9c760e1
commit e3e3832070
4 changed files with 53 additions and 13 deletions

View File

@@ -49,6 +49,7 @@
#include <locale.h>
#include "string_utils.h"
#include "auto_test.h"
#include "lua_script.h"
// To handle signal catching
#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__FreeBSD__) && !defined(BSD)
@@ -3206,6 +3207,10 @@ int glestMain(int argc, char** argv) {
Config &config = Config::getInstance();
setupGameItemPaths(argc, argv, &config);
if(config.getBool("DisableLuaSandbox","false") == true) {
LuaScript::setDisableSandbox(true);
}
Socket::setBroadCastPort(config.getInt("BroadcastPort",intToStr(Socket::getBroadCastPort()).c_str()));
Socket::disableNagle = config.getBool("DisableNagle","false");