ziliang
June 28th, 2009, 11:33 AM
I'm writing a online judge system, which let clients submit C++ codes, compile it locally, and then run it to generate results. But I encouter a problem.
the (client submitted)program should read a input file then do calculationg to generate result.
I'm using windows pipe to redirect input so the program doesn't really need to read a file.
there's some thing about security to be considered.
I want the user-submitted program to only do calculations, and do not do any other operations like file access, create multi-thread, etc.
what can I do to prevent the program from doing such operations?
Is there any APIs? or any machanism to achieve it?
the (client submitted)program should read a input file then do calculationg to generate result.
I'm using windows pipe to redirect input so the program doesn't really need to read a file.
there's some thing about security to be considered.
I want the user-submitted program to only do calculations, and do not do any other operations like file access, create multi-thread, etc.
what can I do to prevent the program from doing such operations?
Is there any APIs? or any machanism to achieve it?