[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Implementing a simple sandbox -- another quirk
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 25 Jun 2003 03:24:19 -0300
>Therefore, sandbox is safe as long as functions
>that I put into it's env. are safe. This is probably not a problem,
>since I know what functions are in that env.
Sure, that's by definition of sandbox, right? You *give* your *chosen*
execution environment. In your example, if you don't trust cheat, don't
add it to the environment.
>Still, it'd be nice to be able to restrict env. of the functions like
>cheat.
In your example, I guess the best that could be done would be
to setfenv(g,B) for all Lua functions g in B. This can be done
automatically in a for loop in sandbox. Is this what you meant?
--lhf