lua-users home
lua-l archive

Re: How-to LUA script file access restrictions?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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

AltStyle によって変換されたページ (->オリジナル) /