unsupportedpastels 8ade0ed43e fix(docker): park and wait on gateway slots without following symlinks
Multiplex migration parks named slots and starts the root slot in the
hermes-owned gateway scandir. As root it touched/unlinked `down` by path
and ran s6-svwait directly, so a hermes-planted `down` symlink updated a
root-only file and a planted `event/` symlink made s6-svwait create its
subscription FIFO inside a root-only directory.

- `_set_down_marker` opens the slot O_NOFOLLOW and creates `down` with
  O_CREAT|O_EXCL|O_NOFOLLOW (hermes-owned when root) or unlinks it,
  relative to that fd. An existing `down` entry is left alone.
- `_wait_down` goes through S6ServiceManager._s6, which runs s6 tools as
  hermes when called as root.

Tests: tests/hermes_cli/test_gateway_multiplex_s6_markers.py; a third
case in tests/docker/test_root_registration_symlink_races.py plants both
symlinks in a real container and parks the slot as root. With the
previous gateway_multiplex_s6.py copied in, the root 0600 victim's mtime
changes; with this commit it stays untouched.
2026-11-04 23:37:25 -05:00
..