I want to make an automated system to compile & run the source codes from different persons and to tell if the output is the same with the standard one(wich is given by me). Ok, this is quite simple, but the tricky part is,how do I avoid the "bad intentions" that may result from running those compiled sources.(Eg.: a program that should return the sum of two numbers, is designed to halt the sysyem
).Generaly speaking, how do I prevent those programms do things like: network accesing, creating to many child processes (causing a DOS), generating to much output (thus the system remains out of space), using to much memory, calling system functions, etc. How to protect my system from this kind of (posible) abuses ? (I mention that the sources submitted are , for now, c++ sources, but should work for other languages too).
Thanks, Adrian