diff --git a/apps/common/utils/tool_code.py b/apps/common/utils/tool_code.py index d21d8a066..a33f6becb 100644 --- a/apps/common/utils/tool_code.py +++ b/apps/common/utils/tool_code.py @@ -197,7 +197,7 @@ exec({dedent(code)!a}) file.write(_code) os.system(f"chown {self.user}:root {exec_python_file}") kwargs = {'cwd': BASE_DIR} - kwargs['env'] = {'LD_PRELOAD': '/opt/maxkb-app/apps/sanbox_ban_host.so'} + kwargs['env'] = {'LD_PRELOAD': '/opt/maxkb-app/apps/sandbox.so'} subprocess_result = subprocess.run( ['su', '-s', python_directory, '-c', "exec(open('" + exec_python_file + "').read())", self.user], text=True, diff --git a/installer/Dockerfile b/installer/Dockerfile index 8e2d3b094..33c35ac10 100644 --- a/installer/Dockerfile +++ b/installer/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update && \ apt-get clean all && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt/maxkb-app -RUN gcc -shared -fPIC -o /opt/maxkb-app/apps/sanbox_ban_host.so /opt/maxkb-app/installer/sanbox_ban_host.c -ldl && \ +RUN gcc -shared -fPIC -o /opt/maxkb-app/apps/sandbox.so /opt/maxkb-app/installer/sandbox.c -ldl && \ rm -rf /opt/maxkb-app/ui && \ pip install uv --break-system-packages && \ python -m uv pip install -r pyproject.toml && \ diff --git a/sanbox_ban_host.c b/installer/sanbox.c similarity index 100% rename from sanbox_ban_host.c rename to installer/sanbox.c