[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: Mon, 17 Mar 2003 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