fix(managed): guard experimental authorization and startup requests

Reject explicit candidate-ID and inherited-policy CLI bypasses of the guarded native-circular operator path. Validate empty private runtime-owned request inodes without following links before state mutation, atomically claim and sync them before apply, retain failed claims, and never delete replacement requests. Keep internal journal reconciliation and legacy qualification unchanged.

Co-authored-by: GPT-6 <gpt-6@openai.com>
This commit is contained in:
ZeusinaandGPT-6 Bot committed 2026-10-12 07:14:20 +03:00
1 parent 371382c2c4
commit f88c8e9c45
6 files changed
+294 -13

No files matched your search

+4 -3
View File
@@ -181,6 +181,8 @@ until awk '$2 == "00000000:0438" && $4 == "0A" { found=1 } END { exit !found }'
[ "$attempt" -lt 30 ] || { echo 'error: target SOCKS listener timeout' >&2; return 75; }
pause 1
done
# Reject unsafe operator requests before init/reconcile can mutate owned state.
timeout -k 5 45 /usr/local/bin/zapret-autotune managed experimental-request-check || exit 78
if [ ! -e "$ZAPRET_CONFIG" ]; then
timeout -k 5 45 /usr/local/bin/zapret-autotune managed init || exit 78
fi
@@ -192,9 +194,8 @@ timeout -k 5 30 /opt/zapret2/init.d/sysv/zapret2 start || exit 78
# Private operator request, consumed only after a successful guarded transaction.
# Never suppress qualification gates globally or race the owned monitor.
if [ -e "${ZAPRET_CONFIG%/*}/.autotune-experimental-suffix-request" ]; then
timeout -k 5 120 /usr/local/bin/zapret-autotune managed apply --googlevideo-experiment native-circular --googlevideo-scope experimental_googlevideo_suffix || exit 78
rm "${ZAPRET_CONFIG%/*}/.autotune-experimental-suffix-request"
if [ -e "${ZAPRET_CONFIG%/*}/.autotune-experimental-suffix-request" ] || [ -L "${ZAPRET_CONFIG%/*}/.autotune-experimental-suffix-request" ]; then
timeout -k 5 120 /usr/local/bin/zapret-autotune managed apply --googlevideo-experiment native-circular --googlevideo-scope experimental_googlevideo_suffix --googlevideo-request startup || exit 78
fi
# A replacement SS child can fail during reconciliation/activation. Do not