upstream: Quote grep and log message better.

OpenBSD-Regress-ID: 3823d9063127169736aa274b1784cb28e15b64d4
This commit is contained in:
dtucker@openbsd.org 2023-03-02 08:14:52 +00:00 committed by Darren Tucker
parent 03a03c6002
commit 860201201d
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
# $OpenBSD: dhgex.sh,v 1.7 2020/12/21 22:48:41 dtucker Exp $ # $OpenBSD: dhgex.sh,v 1.8 2023/03/02 08:14:52 dtucker Exp $
# Placed in the Public Domain. # Placed in the Public Domain.
tid="dhgex" tid="dhgex"
@ -31,8 +31,8 @@ ssh_test_dhgex()
# check what we request # check what we request
grep "SSH2_MSG_KEX_DH_GEX_REQUEST($groupsz) sent" ${LOG} >/dev/null grep "SSH2_MSG_KEX_DH_GEX_REQUEST($groupsz) sent" ${LOG} >/dev/null
if [ $? != 0 ]; then if [ $? != 0 ]; then
got=`egrep "SSH2_MSG_KEX_DH_GEX_REQUEST(.*) sent" ${LOG}` got="`egrep 'SSH2_MSG_KEX_DH_GEX_REQUEST(.*) sent' ${LOG}`"
fail "$tid unexpected GEX sizes, expected $groupsz, got $got" fail "$tid unexpected GEX sizes, expected $groupsz, got '$got'"
fi fi
# check what we got. # check what we got.
gotbits="`awk 'BEGIN{FS="/"}/bits set:/{print $2}' ${LOG} | gotbits="`awk 'BEGIN{FS="/"}/bits set:/{print $2}' ${LOG} |