diff options
author | CoprDistGit <infra@openeuler.org> | 2024-07-03 02:42:38 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-07-03 02:42:38 +0000 |
commit | 3c362eae690284f325824e38431881825e32ffdd (patch) | |
tree | d2d0e11b92bf88d35c270559d268845d391a4703 /backport-upstream-When-OpenSSL-is-not-available-skip-parts-of.patch | |
parent | 62f0a34c39a6846b6a86f2bbc7fb8c319bd46d94 (diff) |
automatic import of openssh
Diffstat (limited to 'backport-upstream-When-OpenSSL-is-not-available-skip-parts-of.patch')
-rw-r--r-- | backport-upstream-When-OpenSSL-is-not-available-skip-parts-of.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/backport-upstream-When-OpenSSL-is-not-available-skip-parts-of.patch b/backport-upstream-When-OpenSSL-is-not-available-skip-parts-of.patch new file mode 100644 index 0000000..5d59c1d --- /dev/null +++ b/backport-upstream-When-OpenSSL-is-not-available-skip-parts-of.patch @@ -0,0 +1,51 @@ +From d77fc611a62f2dfee0b654c31a50a814b13310dd Mon Sep 17 00:00:00 2001 +From: "dtucker@openbsd.org" <dtucker@openbsd.org> +Date: Fri, 6 Jan 2023 12:33:33 +0000 +Subject: [PATCH] upstream: When OpenSSL is not available, skip parts of + percent test + +that require it. Based on github pr#368 from ren mingshuai. + +OpenBSD-Regress-ID: 49a375b2cf61ccb95b52e75e2e025cd10988ebb2 +Conflict:NA +Reference:https://anongit.mindrot.org/openssh.git/commit?id=d77fc611a62f2dfee0b654c31a50a814b13310dd +--- + regress/percent.sh | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/regress/percent.sh b/regress/percent.sh +index bb81779a..ed5c604d 100644 +--- a/regress/percent.sh ++++ b/regress/percent.sh +@@ -79,10 +79,12 @@ for i in matchexec localcommand remotecommand controlpath identityagent \ + trial $i '%T' NONE + fi + # Matches implementation in readconf.c:ssh_connection_hash() +- HASH=`printf "${HOSTNAME}127.0.0.1${PORT}$REMUSER" | +- $OPENSSL_BIN sha1 | cut -f2 -d' '` ++ if [ ! -z "${OPENSSL_BIN}" ]; then ++ HASH=`printf "${HOSTNAME}127.0.0.1${PORT}$REMUSER" | ++ $OPENSSL_BIN sha1 | cut -f2 -d' '` ++ trial $i '%C' $HASH ++ fi + trial $i '%%' '%' +- trial $i '%C' $HASH + trial $i '%i' $USERID + trial $i '%h' 127.0.0.1 + trial $i '%L' $HOST +@@ -96,8 +98,10 @@ for i in matchexec localcommand remotecommand controlpath identityagent \ + # containing %d for UserKnownHostsFile + if [ "$i" != "userknownhostsfile" ]; then + trial $i '%d' $HOME +- 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" ++ if [ ! -z "${HASH}" ]; then ++ 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" ++ fi + fi + done + +-- +2.27.0 + |