Add some logging to codejail
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
# Instructions:
|
||||
# - AppArmor.md from xserver
|
||||
|
||||
import logging
|
||||
import os, os.path
|
||||
import resource
|
||||
import shutil
|
||||
@@ -13,6 +14,8 @@ import time
|
||||
|
||||
from .util import temp_directory
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
# TODO: limit too much stdout data?
|
||||
|
||||
# Configure the Python command
|
||||
@@ -61,6 +64,8 @@ def jailpy(code, files=None, argv=None, stdin=None):
|
||||
|
||||
with temp_directory(delete_when_done=True) as tmpdir:
|
||||
|
||||
log.debug("Executing jailed code: %r", code)
|
||||
|
||||
# All the supporting files are copied into our directory.
|
||||
for filename in files or ():
|
||||
if os.path.isfile(filename):
|
||||
|
||||
Reference in New Issue
Block a user