summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2013-02-26 20:27:29 -0800
committerTim Rice <tim@multitalents.net>2013-02-26 20:27:29 -0800
commitf9e2060ca9d350733ac82ed9858b010a2b1ba5c1 (patch)
treed2f9bdeb8b3f15658e4ae1a09108d64c3c857ec8
parenta514bc05b180c8fb3b11a387b20513743fb1837d (diff)
- (tim) [regress/integrity.sh] shell portability fix.
-rw-r--r--ChangeLog1
-rw-r--r--regress/integrity.sh20
2 files changed, 11 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index c58b0999..2adfc510 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
- (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
[contrib/suse/openssh.spec] Crank version numbers
- (tim) [regress/forward-control.sh] use sh in case login shell is csh.
+ - (tim) [regress/integrity.sh] shell portability fix.
20130226
- OpenBSD CVS Sync
diff --git a/regress/integrity.sh b/regress/integrity.sh
index 78fb5326..8ed8d080 100644
--- a/regress/integrity.sh
+++ b/regress/integrity.sh
@@ -35,8 +35,8 @@ for m in $macs; do
emac=0
ecnt=0
skip=0
- for off in $(jot $tries $startoffset); do
- skip=$((skip - 1))
+ for off in `jot $tries $startoffset`; do
+ skip=`expr $skip - 1`
if [ $skip -gt 0 ]; then
# avoid modifying the high bytes of the length
continue
@@ -47,19 +47,19 @@ for m in $macs; do
aes*gcm*) macopt="-c $m";;
*) macopt="-m $m";;
esac
- output=$(${SSH} $macopt -2F $OBJ/ssh_proxy -o "$pxy" \
- 999.999.999.999 'printf "%4096s" " "' 2>&1)
+ output=`${SSH} $macopt -2F $OBJ/ssh_proxy -o "$pxy" \
+ 999.999.999.999 'printf "%4096s" " "' 2>&1`
if [ $? -eq 0 ]; then
fail "ssh -m $m succeeds with bit-flip at $off"
fi
- ecnt=$((ecnt+1))
- output=$(echo $output | tr -s '\r\n' '.')
+ ecnt=`expr $ecnt + 1`
+ output=`echo $output | tr -s '\r\n' '.'`
verbose "test $tid: $m @$off $output"
case "$output" in
- Bad?packet*) elen=$((elen+1)); skip=3;;
+ Bad?packet*) elen=`expr $elen + 1`; skip=3;;
Corrupted?MAC* | Decryption?integrity?check?failed*)
- emac=$((emac+1)); skip=0;;
- padding*) epad=$((epad+1)); skip=0;;
+ emac=`expr $emac + 1`; skip=0;;
+ padding*) epad=`expr $epad + 1`; skip=0;;
*) fail "unexpected error mac $m at $off";;
esac
done
@@ -67,7 +67,7 @@ for m in $macs; do
if [ $emac -eq 0 ]; then
fail "$m: no mac errors"
fi
- expect=$((ecnt-epad-elen))
+ expect=`expr $ecnt - $epad - $elen`
if [ $emac -ne $expect ]; then
fail "$m: expected $expect mac errors, got $emac"
fi