java 不再使用沙箱
This commit is contained in:
@@ -91,7 +91,7 @@ class JudgeClient(object):
|
|||||||
out_file=os.path.join(self._judge_base_path, str(test_case_id) + ".out"),
|
out_file=os.path.join(self._judge_base_path, str(test_case_id) + ".out"),
|
||||||
args=execute_command[1:],
|
args=execute_command[1:],
|
||||||
env=["PATH=" + os.environ["PATH"]],
|
env=["PATH=" + os.environ["PATH"]],
|
||||||
use_sandbox=True)
|
use_sandbox=self._language["use_sandbox"])
|
||||||
if run_result["flag"] == 0:
|
if run_result["flag"] == 0:
|
||||||
output_md5, r = self._compare_output(test_case_id)
|
output_md5, r = self._compare_output(test_case_id)
|
||||||
if r:
|
if r:
|
||||||
|
|||||||
@@ -7,21 +7,24 @@ languages = {
|
|||||||
"src_name": "main.c",
|
"src_name": "main.c",
|
||||||
"code": 1,
|
"code": 1,
|
||||||
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -std=c99 {src_path} -lm -o {exe_path}/main",
|
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -std=c99 {src_path} -lm -o {exe_path}/main",
|
||||||
"execute_command": "{exe_path}/main"
|
"execute_command": "{exe_path}/main",
|
||||||
|
"use_sandbox": True
|
||||||
},
|
},
|
||||||
2: {
|
2: {
|
||||||
"name": "cpp",
|
"name": "cpp",
|
||||||
"src_name": "main.cpp",
|
"src_name": "main.cpp",
|
||||||
"code": 2,
|
"code": 2,
|
||||||
"compile_command": "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -std=c++11 {src_path} -lm -o {exe_path}/main",
|
"compile_command": "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -std=c++11 {src_path} -lm -o {exe_path}/main",
|
||||||
"execute_command": "{exe_path}/main"
|
"execute_command": "{exe_path}/main",
|
||||||
|
"use_sandbox": True
|
||||||
},
|
},
|
||||||
3: {
|
3: {
|
||||||
"name": "java",
|
"name": "java",
|
||||||
"src_name": "Main.java",
|
"src_name": "Main.java",
|
||||||
"code": 3,
|
"code": 3,
|
||||||
"compile_command": "/usr/bin/javac {src_path} -d {exe_path}",
|
"compile_command": "/usr/bin/javac {src_path} -d {exe_path}",
|
||||||
"execute_command": "/usr/bin/java -cp {exe_path} -Djava.security.manager -Djava.security.policy==policy Main"
|
"execute_command": "/usr/bin/java -cp {exe_path} -Djava.security.manager -Djava.security.policy==policy Main",
|
||||||
|
"use_sandbox": False
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user