4 posts
Posted 22 June 2013 - 07:17 AM
Hello again. I have to make safe environment. Like chroot in unix-like OSes. Is it possible to make and how hard it'll be to do? And will it require rewriting the io and fs?
7083 posts
Location
Tasmania (AU)
Posted 22 June 2013 - 08:58 AM
If someone gets to the point where they can attempt to browse your file system, then odds are they can undo whatever function overrides you're using to try to limit that access.
You can apply limits, but the best way to do so depends largely on what your actual end goal is.
1114 posts
Location
UK
Posted 22 June 2013 - 09:00 AM
Bomb Bloke is correct, you could do this but it would be hard to close all the loopholes and make it totally "safe"
7508 posts
Location
Australia
Posted 22 June 2013 - 09:04 AM
All that being said, the easiest way to make it "safe" is to actually put the overrides in the bios.lua file, because unlike any program the contents of these functions cannot be removed from within a computer, it requires access to the server files. And make sure that these functions are then safe from getfenv.
504 posts
Location
Seattle, WA
Posted 22 June 2013 - 07:40 PM
To add to what Bit said, you'll also want to make sure that your system is protected from people using metatables. There have been a few people who've posted programs which they believe to be protected but have actually been broken by the use of metatables. Just some food for thought, though.