From e71b67fdc40ef28e83378e0fa48e241c1ba9354d Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Wed, 8 Aug 2012 20:58:43 +0100 Subject: HOST: Simple loadstring for the sandbox --- lib/supple/host.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/supple/host.lua b/lib/supple/host.lua index 6fbac05..617b365 100644 --- a/lib/supple/host.lua +++ b/lib/supple/host.lua @@ -129,6 +129,10 @@ local function run_sandbox(codestr, codename, ...) end end +local function sandboxed_loadstring(codestr, codename) + return comms.call("supple:loadstring", "__call", codestr, codename) +end + local function set_hostname(newname) hostname = newname counter = 0 @@ -144,6 +148,7 @@ end return { run = run_sandbox, + loadstring = sandboxed_loadstring, set_name = set_hostname, set_limits = set_limits, set_globals = set_globals, -- cgit v1.2.1