fix(sondib): repair SID lookup control flow
- Jump into the initialized track lookup loop before checking deletion state. - Apply the binary fix at image build time and remove the concurrent cleaner.
This commit is contained in:
1 parent
1963df2802
commit
10aa91c067
2 files changed
+24
-5
No files matched your search
+8
-1
@@ -1,12 +1,19 @@
|
||||
FROM python:3.11-slim-bookworm AS patcher
|
||||
|
||||
COPY patch_sondibd.py /patch/
|
||||
COPY bin/sondibd /patch/sondibd
|
||||
RUN python3 /patch/patch_sondibd.py /patch/sondibd
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libc6 util-linux passwd && rm -rf /var/lib/apt/lists/* && useradd --system --uid 10010 --user-group --home-dir /data --shell /usr/sbin/nologin sondib && mkdir -p /data/uploads && chown -R 10010:10010 /data
|
||||
|
||||
WORKDIR /app
|
||||
COPY bin/ /app/bin/
|
||||
COPY --from=patcher /patch/sondibd /app/bin/sondibd
|
||||
RUN chmod 0755 /app/bin/*
|
||||
|
||||
WORKDIR /data
|
||||
EXPOSE 7777
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "-c", "( while :; do setpriv --reuid=sondib --regid=sondib --clear-groups /app/bin/sdclean /data; sleep 10; done ) & mkdir -p /data/uploads && chown -R sondib:sondib /data && trap 'exit 0' TERM INT; while :; do setpriv --reuid=sondib --regid=sondib --clear-groups /app/bin/sondibd; rc=$?; echo \"sondibd exited with code $rc; restarting in 1s\" >&2; sleep 1; done"]
|
||||
ENTRYPOINT ["/bin/sh", "-c", "mkdir -p /data/uploads && chown -R sondib:sondib /data && trap 'exit 0' TERM INT; while :; do setpriv --reuid=sondib --regid=sondib --clear-groups /app/bin/sondibd; rc=$?; echo \"sondibd exited with code $rc; restarting in 1s\" >&2; sleep 1; done"]
|
||||
Reference in new issue
Block a user