增强判题和 docker 安全性

This commit is contained in:
virusdefender 2015-09-25 15:05:17 +08:00
parent e3d3fa7eb4
commit 4ab1107627
2 changed files with 3 additions and 1 deletions

View File

@ -62,6 +62,8 @@ class JudgeClient(object):
" --max-real-time " + str(self._max_real_time / 1000.0 * 2) + \
" --max-memory " + str(self._max_memory * 1000 * 1000) + \
" --network false" + \
" --remount-dev true " + \
" --reset-env true " + \
" --syscalls '" + self._language["syscalls"] + "'" + \
" --max-nprocess 20" + \
" --uid " + str(lrun_uid) + \

View File

@ -14,7 +14,7 @@ def judge(submission_id, time_limit, memory_limit, test_case_id):
command = "%s run --privileged --rm " \
"--link mysql " \
"-v %s:/var/judger/test_case/:ro " \
"-v %s:/var/judger/code/ " \
"-v %s:/var/judger/code/:ro " \
"-v %s:/var/judger/code/log/ " \
"--device /dev/null:/dev/null " \
"%s " \