From 500c3bdfe52ff39677176566922cff91f5ec4114 Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Tue, 16 Apr 2024 21:31:04 +0800 Subject: [PATCH] fix(riot): secure control master --- scripts/riot | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/riot b/scripts/riot index c9b8d3b..01a80c5 100755 --- a/scripts/riot +++ b/scripts/riot @@ -85,7 +85,11 @@ parse_remote() { USERNAME="" # optional SSH_OPTIONS="" # optional if [[ "$RIOT_TRUST_CLIENT" == "1" ]]; then - SSH_OPTIONS='-o ControlMaster=auto -o ControlPath=/tmp/sshcm-%C -o PermitLocalCommand=yes' + SSH_OPTIONS='-o PermitLocalCommand=yes' + if [[ "$(get_os_type)" != "msys" ]]; then + mkdir -p ~/.ssh/master-socket + SSH_OPTIONS="$SSH_OPTIONS -o ControlMaster=auto -o ControlPath=~/.ssh/master-socket/%C" + fi fi # handle input local remote="$1"