Skip to content

Commit

Permalink
ENOENT for Mono too; DMOJ#293
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyene committed Dec 9, 2017
1 parent f2f8c8f commit 52576a1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dmoj/executors/mono_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from collections import defaultdict

from dmoj.cptbox import CHROOTSecurity, SecurePopen
from dmoj.cptbox.handlers import ALLOW, ACCESS_DENIED
from dmoj.cptbox.handlers import ALLOW, ACCESS_DENIED, ACCESS_ENOENT
from dmoj.cptbox.syscalls import *
from .base_executor import CompiledExecutor

Expand Down Expand Up @@ -58,9 +58,8 @@ def get_security(self, launch_kwargs=None):
def handle_open(debugger):
file = debugger.readstr(debugger.uarg0)
if fs.match(file) is None:
print('Not allowed to access:', file, file=sys.stderr)
log.warning('Denied file open: %s', file)
return False
return ACCESS_ENOENT(debugger)
can = write_fs.match(file) is not None

def update():
Expand Down

0 comments on commit 52576a1

Please sign in to comment.