[debug] riot: disable controlmaster when forwarding gpg (#49)

fix(riot): disable controlmaster when forwarding gpg

Signed-off-by: Dict Xiong <me@dxng.cn>
This commit is contained in:
Dict Xiong 2026-08-22 00:54:52 +08:00 committed by GitHub
parent 913032b59d
commit e1aaeea93f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -255,6 +255,10 @@ prepare_gpg_forwarding() {
fi fi
fi fi
# A pre-existing multiplex master cannot apply this connection's -R
# forwarding request. Put this first because OpenSSH keeps the first
# value for repeated options, and force a dedicated connection.
SSH_OPTIONS=("-o" "ControlMaster=no" "${SSH_OPTIONS[@]}")
SSH_OPTIONS+=( SSH_OPTIONS+=(
# The probe already removed the old socket. Do not let the main SSH # The probe already removed the old socket. Do not let the main SSH
# connection unlink a path recreated during the gap between them. # connection unlink a path recreated during the gap between them.

View File

@ -127,6 +127,7 @@ grep -Fq 'ARG=-T' "$MOCK_SSH_LOG"
! grep -Fq 'ARG=RequestTTY=' "$MOCK_SSH_LOG" ! grep -Fq 'ARG=RequestTTY=' "$MOCK_SSH_LOG"
grep -Fq 'ARG=StreamLocalBindUnlink=no' "$MOCK_SSH_LOG" grep -Fq 'ARG=StreamLocalBindUnlink=no' "$MOCK_SSH_LOG"
grep -Fq "ARG=$MOCK_REMOTE_SOCKET:$MOCK_LOCAL_SOCKET" "$MOCK_SSH_LOG" grep -Fq "ARG=$MOCK_REMOTE_SOCKET:$MOCK_LOCAL_SOCKET" "$MOCK_SSH_LOG"
grep -Fq 'ARG=ControlMaster=no' "$MOCK_SSH_LOG"
[[ ! -e "$MOCK_REMOTE_SOCKET" ]] [[ ! -e "$MOCK_REMOTE_SOCKET" ]]
echo 'riot gpg forwarding tests passed' echo 'riot gpg forwarding tests passed'