left4me/l4d2web/services
mwiegand 406f2196f8
fix(l4d2-web): write sandbox script tmpfile under LEFT4ME_ROOT, not /tmp
The web service unit has PrivateTmp=yes: its /tmp is a per-instance
namespace at /tmp/systemd-private-X-left4me-web.service-Y/tmp/ from
PID 1's perspective. When ScriptBuilder writes /tmp/tmpXXX.sh and
passes that path to the sandbox helper, systemd-run asks PID 1 to set
up BindReadOnlyPaths=${SCRIPT}:/script.sh — but PID 1 lives in the host
namespace and can't resolve the web service's PrivateTmp path. The
unit fails to start with status=226/NAMESPACE and "Failed to set up
mount namespacing: /script.sh: No such file or directory".

Move the tmpfile to ${LEFT4ME_ROOT}/sandbox-scripts/. /var/lib is not
affected by PrivateTmp (only /tmp and /var/tmp are), so PID 1 can
resolve the path. The web service has ReadWritePaths=/var/lib/left4me
already, and the directory is created on demand by Python.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 17:14:21 +02:00
..
__init__.py chore(l4d2): flatten component layout 2026-05-05 23:47:06 +02:00
host_commands.py fix(l4d2-web): keep SSE log stream from pinning gunicorn threads 2026-05-08 11:18:56 +02:00
job_worker.py refactor(l4d2-web): drop refresh_global_overlays from scheduler 2026-05-08 15:45:34 +02:00
l4d2_facade.py feat(l4d2-web): ScriptBuilder + BUILDERS registry update 2026-05-08 15:39:13 +02:00
overlay_builders.py fix(l4d2-web): write sandbox script tmpfile under LEFT4ME_ROOT, not /tmp 2026-05-08 17:14:21 +02:00
overlay_creation.py feat(l4d2-web): overlay path helpers and creation 2026-05-07 16:38:39 +02:00
security.py security: harden boundary inputs and production defaults 2026-05-07 00:53:33 +02:00
spec_yaml.py chore(l4d2): flatten component layout 2026-05-05 23:47:06 +02:00
status.py chore(l4d2): flatten component layout 2026-05-05 23:47:06 +02:00
steam_workshop.py feat(l4d2-web): steam workshop API client and downloader 2026-05-07 16:37:39 +02:00
workshop_paths.py feat(l4d2-web): overlay path helpers and creation 2026-05-07 16:38:39 +02:00