[openssh-commits] [openssh] 01/02: upstream: Compute hash locally and re-enable %C tests.
git+noreply at mindrot.org
git+noreply at mindrot.org
Sun Apr 5 08:41:02 AEST 2020
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit e7e59a9cc8eb7fd5944ded28f4d7e3ae0a5fdecd
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date: Fri Apr 3 07:53:10 2020 +0000
upstream: Compute hash locally and re-enable %C tests.
OpenBSD-Regress-ID: 94d1366e8105274858b88a1f9ad2e62801e49770
---
regress/percent.sh | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/regress/percent.sh b/regress/percent.sh
index d39286d4..ef37ab22 100644
--- a/regress/percent.sh
+++ b/regress/percent.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: percent.sh,v 1.3 2020/04/03 05:43:11 dtucker Exp $
+# $OpenBSD: percent.sh,v 1.4 2020/04/03 07:53:10 dtucker Exp $
# Placed in the Public Domain.
tid="percent expansions"
@@ -39,23 +39,23 @@ trial()
esac
if [ "$got" != "$expect" ]; then
fail "$opt=$arg expect $expect got $got"
- else
- trace "$opt=$arg expect $expect got $got"
fi
}
for i in matchexec localcommand remotecommand controlpath identityagent \
forwardagent; do
+ verbose $tid $i
if [ "$i" = "localcommand" ]; then
- HASH=94237ca18fe6b187dccf57e5593c0bb0a29cc302
REMUSER=$USER
trial $i '%T' NONE
else
- HASH=dbc43d45c7f8c0ecd0a65c0da484c03b6903622e
REMUSER=remuser
fi
+ # Matches implementation in readconf.c:ssh_connection_hash()
+ HASH=`printf "${HOSTNAME}127.0.0.1${PORT}$REMUSER" |
+ openssl sha1 | cut -f2 -d' '`
trial $i '%%' '%'
- #trial $i '%C' $HASH
+ trial $i '%C' $HASH
trial $i '%i' $USERID
trial $i '%h' 127.0.0.1
trial $i '%d' $HOME
@@ -65,8 +65,8 @@ for i in matchexec localcommand remotecommand controlpath identityagent \
trial $i '%p' $PORT
trial $i '%r' $REMUSER
trial $i '%u' $USER
- trial $i '%%/%i/%h/%d/%L/%l/%n/%p/%r/%u' \
- "%/$USERID/127.0.0.1/$HOME/$HOST/$HOSTNAME/somehost/$PORT/$REMUSER/$USER"
+ trial $i '%%/%C/%i/%h/%d/%L/%l/%n/%p/%r/%u' \
+ "%/$HASH/$USERID/127.0.0.1/$HOME/$HOST/$HOSTNAME/somehost/$PORT/$REMUSER/$USER"
done
# A subset of options support tilde expansion
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list