mirror of https://github.com/digint/btrbk
ssh_filter_btrbk.sh: replace OpenSSH’s deprecated SSH_CLIENT
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. Note that this might be used by 3rd-party programs (like fail2ban), add a specific note to the changelog. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>improve-ssh_filter_btrbk.sh
parent
123b4fdc75
commit
60c74aaac8
|
@ -23,7 +23,7 @@ file_arg_match="('${file_match}'|${file_match_sane})" # support btrbk < 0.32.0
|
||||||
log_cmd()
|
log_cmd()
|
||||||
{
|
{
|
||||||
if [ -n "$enable_log" ]; then
|
if [ -n "$enable_log" ]; then
|
||||||
logger -p "$1" -t ssh_filter_btrbk.sh "$2 (Name: ${LOGNAME:-<unknown>}; Remote: ${SSH_CLIENT:-<unknown>})${3:+: $3}: $SSH_ORIGINAL_COMMAND"
|
logger -p "$1" -t ssh_filter_btrbk.sh "$2 (Name: ${LOGNAME:-<unknown>}; Connection: ${SSH_CONNECTION:-<unknown>})${3:+: $3}: $SSH_ORIGINAL_COMMAND"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue