Author |
Message |
Panphobia
![](http://compsci.ca/v3/uploads/user_avatars/62033050050c6b61548706.png)
|
Posted: Thu Jun 11, 2015 6:01 pm Post subject: Creating Online Judge from scratch |
|
|
I am starting a programming contest at my university and I have been writing an online judge for it recently. It came to my attention that I need to sandbox the programs that I am writing so that they don't do damage to the server. So I know that ulimit can limit the amount of memory and cpu time a process has, but how would I limit other things like, preventing them from doing something like system("rm -rf ~")? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
|
|
|
![](images/spacer.gif) |
Panphobia
![](http://compsci.ca/v3/uploads/user_avatars/62033050050c6b61548706.png)
|
Posted: Wed Jun 17, 2015 10:41 pm Post subject: RE:Creating Online Judge from scratch |
|
|
What about the sandboxing programs you find on the internet like libsandbox and EasySandBox(https://github.com/daveho/EasySandbox). They block system calls, don't allow internet access (at least not with curl) etc. I am only looking to have support for Java/C/C++ since this is an ACM styled contest. |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Jun 18, 2015 12:08 pm Post subject: RE:Creating Online Judge from scratch |
|
|
That might work for your purposes. I'm not familiar with that project though. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
|