Complete reversion of grep -q in ssh_filter_btrbk.sh

`grep -q` on a non-existent file will output on STDERR.

The orginal never produced output (STDERR or STDOUT)
pull/617/head
Tom Hale 2025-10-04 19:40:38 +10:00 committed by GitHub
parent de22086e6b
commit 6e0917b395
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -102,12 +102,12 @@ reject_filtered_cmd()
# when an error occurred.
allow_stream_match="^${stream_in_match}${allow_cmd_match}${stream_out_match}"
if printf '%s' "${SSH_ORIGINAL_COMMAND}" | grep -E -- "${allow_stream_match}"; then
if printf '%s' "${SSH_ORIGINAL_COMMAND}" | grep -E -- "${allow_stream_match}" >/dev/null 2>/dev/null; then
return 0
fi
exact_cmd_match="^(${allow_exact_list})$";
if printf '%s' "${SSH_ORIGINAL_COMMAND}" | grep -E -- "${exact_cmd_match}"; then
if printf '%s' "${SSH_ORIGINAL_COMMAND}" | grep -E -- "${exact_cmd_match}" >/dev/null 2>/dev/null; then
return 0
fi