Re: os.execute is scary;
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: os.execute is scary;
- From: Paul Smith <paullocal@...>
- Date: 2004年1月29日 09:31:20 +0000
At 19:38 28/01/2004, you wrote:
> A lua script can call a function 'io.enablesecurity("password")' which will
> disable all these functions, until 'io.disablesecurity("password")' is
> called.
Wouldn't a better solution be something like this:
function secure_wrapper(user_code, ...)
local execute = os.execute
os.execute = nil
local r = user_code(unpack(arg))
os.execute = execute
return r
end
Yes, this would be better - I'd need to do some wrapping around that since
that code would need to be written by a user (an 'administrator' user), so
it'd be nicer for us if it was easier to use for a novice - but that's a
simple 'wrapping' problem - not too hard I don't expect.
Paul VPOP3 - Internet Email Server/Gateway
support@pscs.co.uk http://www.pscs.co.uk/