From b274bd1d50221502153ee13347bf4c4689b82859 Mon Sep 17 00:00:00 2001 From: Christoph Anton Mitterer Date: Mon, 21 Nov 2022 21:51:04 +0100 Subject: [PATCH] =?UTF-8?q?ssh=5Ffilter=5Fbtrbk.sh:=20replace=20OpenSSH?= =?UTF-8?q?=E2=80=99s=20deprecated=20SSH=5FCLIENT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OpenSSH’s environment variable `SSH_CLIENT` has been deprecated in upstream commit f37e246f858cdd79be4f4e158b7b04778d1cb7e9 (2002-09-19) and replaced by `SSH_CONNECTION`. Both contain more than just the remote information, thus adapted the log message to reflect that. Since this might be used by 3rd-party programs (like fail2ban), added a specific note to the changelog. Signed-off-by: Christoph Anton Mitterer --- ssh_filter_btrbk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh_filter_btrbk.sh b/ssh_filter_btrbk.sh index 6d9c415..14057c4 100755 --- a/ssh_filter_btrbk.sh +++ b/ssh_filter_btrbk.sh @@ -23,7 +23,7 @@ file_arg_match="('${file_match}'|${file_match_sane})" # support btrbk < 0.32.0 log_cmd() { if [ -n "$enable_log" ]; then - logger -p "$1" -t ssh_filter_btrbk.sh "$2 (Name: ${LOGNAME:-}; Remote: ${SSH_CLIENT:-})${3:+: $3}: $SSH_ORIGINAL_COMMAND" + logger -p "$1" -t ssh_filter_btrbk.sh "$2 (Name: ${LOGNAME:-}; Connection: ${SSH_CONNECTION:-})${3:+: $3}: $SSH_ORIGINAL_COMMAND" fi }