lua-users home
lua-l archive

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


I would not give them direct access to any disk I/O.  In cases such as
loading maps, bind a C-function to LUA such as LoadMap( mapname ) that
will do read-only disk access in a specific directory (maps) for
specific file types (*.map).


-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of L-28C
Sent: Monday, July 30, 2007 10:26 AM
To: lua@bazar2.conectiva.com.br
Subject: Avoiding viruses?

Hello everyone!

I'm making a game that uses Lua for most of its functions. I'm making it

so that users can create their own levels/weapons/vehicles/modes in Lua,

but what if they put viruses in the script?

What are some tips to avoid this problem? I can't disable file I/O 
because, for example, the maps might need to load text terrains. Maybe 
there's a way to only allow the script to load files from a certain 
directory?

Anything else I should know about this?

Thanks!