You've already forked code_examples_server
mirror of
https://github.com/AdaCore/code_examples_server.git
synced 2026-02-12 12:45:18 -08:00
Remove some obsolete comments and bits
This commit is contained in:
@@ -17,12 +17,6 @@ from compile_server.app import process_handling
|
||||
from compile_server.app.views import CrossDomainResponse
|
||||
|
||||
gnatprove_found = False
|
||||
gnatemulator_found = False
|
||||
|
||||
ALLOW_RUNNING_PROGRAMS_EVEN_THOUGH_IT_IS_NOT_SECURE = True
|
||||
# TODO: right now, executables are run through gnatemulator. We have not
|
||||
# yet done the due diligence to sandbox this, though, so deactivating the
|
||||
# run feature through this boolean.
|
||||
|
||||
ALLOWED_EXTRA_ARGS = {'spark-flow': "--mode=flow",
|
||||
'spark-report-all': "--report=all"}
|
||||
@@ -187,14 +181,6 @@ def check_program(request):
|
||||
@api_view(['POST'])
|
||||
def run_program(request):
|
||||
|
||||
# Security check
|
||||
|
||||
if not ALLOW_RUNNING_PROGRAMS_EVEN_THOUGH_IT_IS_NOT_SECURE:
|
||||
return CrossDomainResponse(
|
||||
{'identifier': '',
|
||||
'message': "running programs is disabled on this server"}
|
||||
)
|
||||
|
||||
# Sanity check for the existence of gnatprove
|
||||
|
||||
received_json = json.loads(request.body)
|
||||
|
||||
@@ -37,8 +37,6 @@ def safe_run(main):
|
||||
# This requires the dir to end with /
|
||||
CONT + tmpdir + os.sep])
|
||||
|
||||
# TODO: rlimit?
|
||||
|
||||
# Run it, printint output to stdout as we go along
|
||||
subprocess.call(["lxc", "exec", CONT, "--",
|
||||
"su", "unprivileged", "-c",
|
||||
|
||||
Reference in New Issue
Block a user