Skip to content

Commit b76a903

Browse files
committed
Merge of 10.2p1 into Dynamic Window.
No changes to the synamic window code was required.
2 parents e5f8b20 + d01efaa commit b76a903

325 files changed

Lines changed: 25104 additions & 9704 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.depend

Lines changed: 10 additions & 17 deletions
Large diffs are not rendered by default.

.github/ci-status.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
master :
2-
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:master)
2+
[![C/C++ CI](../../../actions/workflows/c-cpp.yml/badge.svg)](../../../actions/workflows/c-cpp.yml?query=branch:master)
3+
[![VM CI](../../../actions/workflows/vm.yml/badge.svg)](../../../actions/workflows/vm.yml?query=branch:master)
34
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:master)
45
[![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml?query=branch:master)
5-
[![CIFuzz](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml)
6-
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:openssh)
6+
[![CIFuzz](../../../actions/workflows/cifuzz.yml/badge.svg)](../../../actions/workflows/cifuzz.yml)
7+
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://issues.oss-fuzz.com/issues?q="Project:+openssh"+is:open)
78
[![Coverity Status](https://scan.coverity.com/projects/21341/badge.svg)](https://scan.coverity.com/projects/openssh-portable)
9+
<br>
10+
11+
10.1 :
12+
[![C/C++ CI](../../../actions/workflows/c-cpp.yml/badge.svg?branch=V_10_1)](../../../actions/workflows/c-cpp.yml?query=branch:V_10_1)
13+
[![VM CI](../../../actions/workflows/vm.yml/badge.svg?branch=V_10_1)](../../../actions/workflows/vm.yml?query=branch:V_10_1)
14+
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_10_1)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_10_1)
15+
16+
10.0 :
17+
[![C/C++ CI](../../../actions/workflows/c-cpp.yml/badge.svg?branch=V_10_0)](../../../actions/workflows/c-cpp.yml?query=branch:V_10_0)
18+
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_10_0)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_10_0)
819

920
9.9 :
10-
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_9)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_9)
21+
[![C/C++ CI](../../../actions/workflows/c-cpp.yml/badge.svg?branch=V_9_9)](../../../actions/workflows/c-cpp.yml?query=branch:V_9_9)
1122
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_9)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_9)
12-
9.8 :
13-
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_8)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_8)
14-
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_8)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_8)
15-
16-
9.7 :
17-
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_7)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_7)
18-
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_7)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_7)

.github/configs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ if [ "$config" = "" ]; then
1313
config="default"
1414
fi
1515

16+
if [ ! -z "${LTESTS}" ]; then
17+
OVERRIDE_LTESTS="${LTESTS}"
18+
fi
19+
1620
unset CC CFLAGS CPPFLAGS LDFLAGS LTESTS SUDO
1721

1822
TEST_TARGET="tests compat-tests"
@@ -144,6 +148,8 @@ case "$config" in
144148
TCMALLOC_STACKTRACE_METHOD=generic_fp
145149
TEST_SSH_SSHD_ENV="TCMALLOC_STACKTRACE_METHOD=generic_fp"
146150
export TCMALLOC_STACKTRACE_METHOD TEST_SSH_SSHD_ENV
151+
152+
SKIP_LTESTS="agent-restrict"
147153
;;
148154
krb5|heimdal)
149155
CONFIGFLAGS="--with-kerberos5"
@@ -277,7 +283,7 @@ case "${TARGET_HOST}" in
277283
# Native linker is not great with PIC so OpenSSL is built w/out.
278284
CONFIGFLAGS="${CONFIGFLAGS} --disable-security-key"
279285
;;
280-
fbsd14-ppc64)
286+
fbsd14-ppc64|nbsd-arm64be)
281287
# Disable security key tests for bigendian interop test.
282288
CONFIGFLAGS="${CONFIGFLAGS} --disable-security-key"
283289
;;
@@ -392,5 +398,10 @@ if [ -x "$(which plink 2>/dev/null)" ]; then
392398
export REGRESS_INTEROP_PUTTY
393399
fi
394400

401+
if [ ! -z "${OVERRIDE_LTESTS}" ]; then
402+
echo >&2 "Overriding LTESTS, was '${LTESTS}', now '${OVERRIDE_LTESTS}'"
403+
LTESTS="${OVERRIDE_LTESTS}"
404+
fi
405+
395406
export CC CFLAGS CPPFLAGS LDFLAGS LTESTS SUDO
396407
export TEST_TARGET TEST_SSH_UNSAFE_PERMISSIONS TEST_SSH_FAIL_FATAL

.github/install_libcrypto.sh

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/bin/sh
2+
#
3+
# Install specified libcrypto.
4+
# -a : install version for ABI compatibility test.
5+
# -n : dry run, don't actually build and install.
6+
#
7+
# Usage: $0 [-a] [-n] openssl-$branch/tag destdir [config options]
8+
9+
set -e
10+
11+
bincompat_test=""
12+
dryrun=""
13+
while [ "$1" = "-a" ] || [ "$1" = "-n" ]; do
14+
if [ "$1" = "-a" ]; then
15+
abi_compat_test=y
16+
elif [ "$1" = "-n" ]; then
17+
dryrun="echo dryrun:"
18+
fi
19+
shift
20+
done
21+
22+
ver="$1"
23+
destdir="$2"
24+
opts="$3"
25+
26+
if [ -z "${ver}" ] || [ -z "${destdir}" ]; then
27+
echo tag/branch and destdir required
28+
exit 1
29+
fi
30+
31+
set -x
32+
33+
if [ ! -d ${HOME}/openssl ]; then
34+
cd ${HOME}
35+
git clone https://github.com/openssl/openssl.git
36+
cd ${HOME}/openssl
37+
git fetch --all
38+
fi
39+
cd ${HOME}/openssl
40+
41+
if [ "${abi_compat_test}" = "y" ]; then
42+
echo selecting ABI test release/branch for ${ver}
43+
case "${ver}" in
44+
openssl-3.6)
45+
ver=openssl-3.0.0
46+
echo "selecting older release ${ver}"
47+
;;
48+
openssl-3.[012345])
49+
major=$(echo ${ver} | cut -f1 -d.)
50+
minor=$(echo ${ver} | cut -f2 -d.)
51+
ver="${major}.$((${minor} + 1))"
52+
echo selecting next release branch ${ver}
53+
;;
54+
openssl-3.*.*)
55+
major=$(echo ${ver} | cut -f1 -d.)
56+
minor=$(echo ${ver} | cut -f2 -d.)
57+
patch=$(echo ${ver} | cut -f3 -d.)
58+
ver="${major}.${minor}.$((${patch} + 1))"
59+
echo checking for release tag ${ver}
60+
if git tag | grep -q "^${ver}\$"; then
61+
echo selected next patch release ${ver}
62+
else
63+
ver="${major}.${minor}"
64+
echo not found, selecting release branch ${ver}
65+
fi
66+
;;
67+
esac
68+
fi
69+
70+
git checkout ${ver}
71+
make clean >/dev/null 2>&1 || true
72+
${dryrun} ./config no-threads shared ${opts} --prefix=${destdir} \
73+
-Wl,-rpath,${destdir}/lib64
74+
${dryrun} make -j4
75+
${dryrun} sudo make install_sw

.github/install_putty.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
3+
ver="$1"
4+
5+
echo
6+
echo --------------------------------------
7+
echo Installing PuTTY version ${ver}
8+
echo --------------------------------------
9+
10+
cd /tmp
11+
12+
case "${ver}" in
13+
snapshot)
14+
tarball=putty.tar.gz
15+
url=https://tartarus.org/~simon/putty-snapshots/${tarball}
16+
;;
17+
*)
18+
tarball=putty-${ver}.tar.gz
19+
url=https://the.earth.li/~sgtatham/putty/${ver}/${tarball}
20+
;;
21+
esac
22+
23+
if [ ! -f ${tarball} ]; then
24+
wget -q ${url}
25+
fi
26+
27+
mkdir -p /tmp/puttybuild
28+
cd /tmp/puttybuild
29+
30+
tar xfz /tmp/${tarball} && cd putty-*
31+
if [ -f CMakeLists.txt ]; then
32+
cmake . && cmake --build . -j4 && sudo cmake --build . --target install
33+
else
34+
./configure && make -j4 && sudo make install
35+
fi
36+
sudo rm -rf /tmp/puttybuild
37+
/usr/local/bin/plink -V

.github/run_test.sh

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,13 @@ if [ ! -z "$SUDO" ] && [ ! -z "$TEST_SSH_HOSTBASED_AUTH" ]; then
1313
hostname | $SUDO tee $sshconf/shosts.equiv >/dev/null
1414
echo "EnableSSHKeysign yes" | $SUDO tee $sshconf/ssh_config >/dev/null
1515
$SUDO mkdir -p $sshconf
16-
$SUDO cp -p /etc/ssh/ssh_host*key* $sshconf
1716
$SUDO make install
1817
for key in $sshconf/ssh_host*key*.pub; do
1918
echo `hostname` `cat $key` | \
2019
$SUDO tee -a $sshconf/ssh_known_hosts >/dev/null
2120
done
2221
fi
2322

24-
output_failed_logs() {
25-
for i in regress/failed*.log; do
26-
if [ -f "$i" ]; then
27-
echo -------------------------------------------------------------------------
28-
echo LOGFILE $i
29-
cat $i
30-
echo -------------------------------------------------------------------------
31-
fi
32-
done
33-
}
34-
trap output_failed_logs 0
35-
3623
env=""
3724
if [ ! -z "${SUDO}" ]; then
3825
env="${env} SUDO=${SUDO}"
@@ -47,6 +34,17 @@ if [ ! -z "${env}" ]; then
4734
env="env${env}"
4835
fi
4936

37+
if [ "$1" = "putty-versions" ]; then
38+
for ver in 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.80 \
39+
0.81 0.82 0.83 snapshot; do
40+
.github/install_putty.sh "${ver}"
41+
${env} make ${TEST_TARGET} \
42+
SKIP_LTESTS="${SKIP_LTESTS}" LTESTS="${LTESTS}"
43+
done
44+
45+
exit 0
46+
fi
47+
5048
if [ -z "${LTESTS}" ]; then
5149
${env} make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}"
5250
else

.github/setup_ci.sh

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
11
#!/bin/sh
22

3+
config="$1"
4+
target="$2"
5+
36
PACKAGES=""
47

5-
. .github/configs $@
8+
echo Running as:
9+
id
10+
11+
echo Environment:
12+
set
13+
14+
. .github/configs ${config}
615

716
host=`./config.guess`
817
echo "config.guess: $host"
918
case "$host" in
1019
*cygwin)
1120
PACKAGER=setup
1221
echo Setting CYGWIN system environment variable.
13-
setx CYGWIN "binmode"
22+
setx CYGWIN "winsymlinks:native"
1423
echo Removing extended ACLs so umask works as expected.
24+
set -x
1525
setfacl -b . regress
26+
icacls regress /c /t /q /Inheritance:d
27+
icacls regress /c /t /q /Grant ${USERNAME}:F
28+
icacls regress /c /t /q /Remove:g "Authenticated Users" \
29+
BUILTIN\\Administrators BUILTIN Everyone System Users
30+
takeown /F regress
31+
icacls regress
32+
set +x
1633
PACKAGES="$PACKAGES,autoconf,automake,cygwin-devel,gcc-core"
1734
PACKAGES="$PACKAGES,make,openssl,libssl-devel,zlib-devel"
1835
;;
@@ -24,7 +41,7 @@ case "$host" in
2441
PACKAGER=apt
2542
esac
2643

27-
TARGETS=$@
44+
TARGETS=${config}
2845

2946
INSTALL_FIDO_PPA="no"
3047
export DEBIAN_FRONTEND=noninteractive
@@ -147,7 +164,7 @@ for TARGET in $TARGETS; do
147164
PACKAGES="${PACKAGES} cmake ninja-build"
148165
;;
149166
putty-*)
150-
INSTALL_PUTTY=$(echo "${TARGET}" | cut -f2 -d-)
167+
INSTALL_PUTTY=0.83
151168
PACKAGES="${PACKAGES} cmake"
152169
;;
153170
valgrind*)
@@ -184,7 +201,8 @@ while [ ! -z "$PACKAGES" ] && [ "$tries" -gt "0" ]; do
184201
fi
185202
;;
186203
setup)
187-
if /cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,`; then
204+
setup="/cygdrive/$(echo "${CYGWIN_SETUP}" | tr -d : | tr '\' '/')"
205+
if "${setup}" -q -P `echo "$PACKAGES" | tr ' ' ,`; then
188206
PACKAGES=""
189207
fi
190208
;;
@@ -207,13 +225,8 @@ if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then
207225
fi
208226

209227
if [ ! -z "${INSTALL_OPENSSL}" ]; then
210-
(cd ${HOME} &&
211-
git clone https://github.com/openssl/openssl.git &&
212-
cd ${HOME}/openssl &&
213-
git checkout ${INSTALL_OPENSSL} &&
214-
./config no-threads shared ${SSLCONFOPTS} \
215-
--prefix=/opt/openssl &&
216-
make && sudo make install_sw)
228+
.github/install_libcrypto.sh \
229+
"${INSTALL_OPENSSL}" /opt/openssl "${SSLCONFOPTS}"
217230
fi
218231

219232
if [ ! -z "${INSTALL_LIBRESSL}" ]; then
@@ -240,7 +253,7 @@ if [ ! -z "${INSTALL_BORINGSSL}" ]; then
240253
cd ${HOME}/boringssl && mkdir build && cd build &&
241254
cmake -GNinja -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. && ninja &&
242255
mkdir -p /opt/boringssl/lib &&
243-
cp ${HOME}/boringssl/build/crypto/libcrypto.a /opt/boringssl/lib &&
256+
cp ${HOME}/boringssl/build/libcrypto.a /opt/boringssl/lib &&
244257
cp -r ${HOME}/boringssl/include /opt/boringssl)
245258
fi
246259

@@ -260,23 +273,23 @@ if [ ! -z "${INSTALL_ZLIB}" ]; then
260273
fi
261274

262275
if [ ! -z "${INSTALL_PUTTY}" ]; then
263-
ver="${INSTALL_PUTTY}"
264-
case "${INSTALL_PUTTY}" in
265-
snapshot)
266-
tarball=putty.tar.gz
267-
(cd /tmp && wget https://tartarus.org/~simon/putty-snapshots/${tarball})
268-
;;
269-
*)
270-
tarball=putty-${ver}.tar.gz
271-
(cd /tmp && wget https://the.earth.li/~sgtatham/putty/${ver}/${tarball})
276+
.github/install_putty.sh "${INSTALL_PUTTY}"
277+
fi
278+
279+
# If we're running on an ephemeral VM, set a random password and set
280+
# up to run the password auth test.
281+
if [ ! -z "${EPHEMERAL_VM}" ]; then
282+
283+
# This is the github "target" as specified in the yml file.
284+
# In particular, ubuntu-latest sets the password field to the locked
285+
# value, so unless we reset it here most of the tests will fail.
286+
case "${target}" in
287+
ubuntu-*)
288+
echo ${target} target: setting random password.
289+
openssl rand -base64 9 >regress/password
290+
pw=$(tr -d '\n' <regress/password | openssl passwd -6 -stdin)
291+
sudo usermod --password "${pw}" runner
292+
sudo usermod --unlock runner
272293
;;
273294
esac
274-
(cd ${HOME} && tar xfz /tmp/${tarball} && cd putty-*
275-
if [ -f CMakeLists.txt ]; then
276-
cmake . && cmake --build . && sudo cmake --build . --target install
277-
else
278-
./configure && make && sudo make install
279-
fi
280-
)
281-
/usr/local/bin/plink -V
282295
fi

0 commit comments

Comments
 (0)