[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: How-to LUA script file access restrictions?
- From: Benoit Germain <bgermain@...>
- Date: Mon, 17 Mar 2003 16:36:08 +0100
In lua, you could do something like this before any of the client scripts
try to open a file:
local io_open = io.open
-- this replacement ensures that the unrestricted version becomes
unavailable
io.open=function(<args>)
--restrict paths here
if <path is authorized>
then
return io_open(<args>)
else
return nil
end
end
Cheers,
Benoit.
-----Message d'origine-----
De : Zdenek Stangl [mailto:ptaczek@svamberk.net]
Envoyé : lundi 17 mars 2003 16:13
À : Multiple recipients of list
Objet : How-to LUA script file access restrictions?
Is there any possibility to restrict file access from scripts to specified
paths only without modifying the lua source code ?
Ptaczek.