diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-08-08 20:58:43 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-08-08 20:58:43 +0100 |
commit | e71b67fdc40ef28e83378e0fa48e241c1ba9354d (patch) | |
tree | 9b2aa227521a8edaede656f546193ba891d11456 | |
parent | c8d90d2839fd5826b06ca5f2e5a70eae3ba04dc4 (diff) | |
download | supple-e71b67fdc40ef28e83378e0fa48e241c1ba9354d.tar.gz |
HOST: Simple loadstring for the sandbox
-rw-r--r-- | lib/supple/host.lua | 5 |
1 files changed, 5 insertions, 0 deletions
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, |