diff options
author | 2021-01-10 14:18:18 -0800 | |
---|---|---|
committer | 2021-01-10 17:04:59 -0800 | |
commit | 6e88211e7e68a3cb23926a76d1c12fbc4f599ec2 (patch) | |
tree | 1d1f0269cb608ce03693e08a89cbc8a7c0f00d25 | |
parent | Read cgroup values from the config file (diff) |
Read the Python path and args from the config file
-rw-r--r-- | snekbox/nsjail.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/snekbox/nsjail.py b/snekbox/nsjail.py index f5df64c..6972a40 100644 --- a/snekbox/nsjail.py +++ b/snekbox/nsjail.py @@ -37,9 +37,8 @@ class NsJail: See config/snekbox.cfg for the default NsJail configuration. """ - def __init__(self, nsjail_binary: str = NSJAIL_PATH, python_binary: str = sys.executable): + def __init__(self, nsjail_binary: str = NSJAIL_PATH): self.nsjail_binary = nsjail_binary - self.python_binary = python_binary self.config = self._read_config() self._create_parent_cgroups() @@ -154,7 +153,7 @@ class NsJail: "--config", NSJAIL_CFG, "--log", nsj_log.name, "--", - self.python_binary, "-Squ", "-c", code + self.config.exec_bin.path, *self.config.exec_bin.arg, "-c", code ) msg = "Executing code..." |