The way I "understand things" standard usage of Lua is to open a Lua state,
load up the libraries that you want, and then for fine grained control, pick
out the library bits that you don't like by just setting them to nil. If
you want finer control still (i.e. runtime control of what functions are
available) then why not just store references to the questionable functions
off in the registry and set the "normal" references to nil, and copy them
back from the registry when needed. If you don't like user scripts
exploding on nil references then you could substitute stub versions of the
functions that return an appropriate error code.
This way there are no "security checks" (though obviously calling the
enable/disable operations introduces overhead).
Just curious. :-)