fix(master): 收敛 offset 记录文件至私有目录,修复 /tmp 侧信道劫持隐患

This commit is contained in:
hotyue
2026-04-11 11:24:13 +00:00
parent 2e73aa8833
commit 09c6bab04a

View File

@@ -9,7 +9,7 @@ CONF="/opt/ip_sentinel_master/master.conf"
[ ! -f "$CONF" ] && exit 1
source "$CONF"
OFFSET_FILE="/tmp/tg_master_offset"
OFFSET_FILE="${MASTER_DIR}/.tg_offset"
[[ -f $OFFSET_FILE ]] || echo "0" > $OFFSET_FILE
# --- 工具函数 ---