Re: How-to LUA script file access restrictions?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: How-to LUA script file access restrictions?
- From: "Wim Couwenberg" <w.couwenberg@...>
- Date: 2003年3月17日 17:05:24 +0100
Hi,
> Is there any possibility to restrict file access from scripts to specified
> paths only without modifying the lua source code ?
You can redefine (in Lua) the lua functions that take a filename argument to
check for validity of the path first. In Lua 4 these would be:
dofile
openfile
readfrom
writeto
appendto
remove
rename
For lua 5.0:
loadfile
dofile
io.open
io.input
io.output
io.lines
Bye,
Wim