From a2f77fed9f503994e469124360c95bfe84be7ff0 Mon Sep 17 00:00:00 2001 From: Nicolas Setton Date: Mon, 16 Jul 2018 17:57:02 -0400 Subject: [PATCH] Remove some obsolete comments and bits --- compile_server/app/checker.py | 14 -------------- compile_server/app/safe_run.py | 2 -- 2 files changed, 16 deletions(-) diff --git a/compile_server/app/checker.py b/compile_server/app/checker.py index 53fe248..125f345 100644 --- a/compile_server/app/checker.py +++ b/compile_server/app/checker.py @@ -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) diff --git a/compile_server/app/safe_run.py b/compile_server/app/safe_run.py index 87c4bbb..f246610 100644 --- a/compile_server/app/safe_run.py +++ b/compile_server/app/safe_run.py @@ -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",