lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On 21.12.2012 9:49, Philipp Kraus wrote:
Hello,

I use from the C API a set of tables for storing function pointers in it.
On the Lua side, I can call the function from the table, but I would like
to deny any modification on the table from the Lua script.

I use a luaL_newlib and a lua_setglobal for setting my
function table, but the script can set the global
variable to nil or something else. Can I
deny this, so that the table can not be overwritten?

Thanks

Phil
So, you want a Sandbox? Restrict untrusted scripts from modifying stuff? Or does your C-side implementation rely on the table and the variable name, which it shouldn't?

--
Best regards,
Sergey Rozhenko                 mailto:sergroj@mail.ru