fix(towercore): patch peer context selectors
- Force opcode 0x21 and 0x23 reads through the authenticated session UE. - Build a derived MIPS image while retaining the original service runtime.
This commit is contained in:
1 parent
7b44899b6f
commit
d1ae79a5f7
2 files changed
+25
-1
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM --platform=$BUILDPLATFORM python:3.12-slim AS patcher
|
||||
|
||||
COPY bin/towercore-linux-mips64le /towercore
|
||||
RUN python - <<'PY'
|
||||
from pathlib import Path
|
||||
|
||||
path = Path("/towercore")
|
||||
data = bytearray(path.read_bytes())
|
||||
original = bytes.fromhex("84 00 c2 90")
|
||||
replacement = bytes.fromhex("25 10 00 00")
|
||||
for offset in (0x24604, 0x2487C):
|
||||
actual = bytes(data[offset : offset + len(original)])
|
||||
if actual != original:
|
||||
raise SystemExit(f"unexpected bytes at {offset:#x}: {actual.hex()}")
|
||||
data[offset : offset + len(original)] = replacement
|
||||
path.write_bytes(data)
|
||||
PY
|
||||
|
||||
FROM towercore:final-mips64le
|
||||
COPY --from=patcher /towercore /towercore
|
||||
@@ -1,6 +1,9 @@
|
||||
services:
|
||||
towercore:
|
||||
image: towercore:final-mips64le
|
||||
image: towercore:patched-mips64le
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.towercore
|
||||
platform: linux/mips64le
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
|
||||
Reference in new issue
Block a user