Commit Graph

11113 Commits

Author SHA1 Message Date
Damien Miller 2dc328023f sshd don't exit on transient read errors
openssh-8.5 introduced a regression that would cause sshd to exit
because of transient read errors on the network socket (e.g. EINTR,
EAGAIN). Reported by balu.gajjala AT gmail.com via bz3297
2021-04-14 11:42:55 +10:00
Damien Miller d5d6b7d76d perform report_failed_grab() inline 2021-04-10 18:45:00 +10:00
Damien Miller ea996ce2d0 dedicated gnome-ssk-askpass3 source
Compatibility with Wayland requires that we use the gdk_seat_grab()
API for grabbing mouse/keyboard, however these API don't exist in
Gtk+2.

This branches gnome-ssk-askpass2.c => gnome-ssk-askpass3.c and
makes the changes to use the gdk_seat_grab() instead of grabbing
mouse/focus separately via GDK.

In the future, we can also use the branched file to avoid some
API that has been soft-deprecated in GTK+3, e.g. gtk_widget_modify_fg
2021-04-10 18:22:57 +10:00
Darren Tucker bfa5405da0 Ensure valgrind-out exists.
Normally the regress tests would create it, but running the unit tests
on their own would fail because the directory did not exist.
2021-04-08 15:18:15 +10:00
Darren Tucker 1f189181f3 Pass OBJ to unit test make invocation.
At least the Valgrind unit tests uses $OBJ.
2021-04-08 15:17:19 +10:00
Darren Tucker f42b550c28 Add pattern for valgrind-unit. 2021-04-08 14:20:12 +10:00
Darren Tucker 19e5344627 Run unit tests under valgrind.
Run a separate build for the unit tests under Valgrind.  They take long
enough that running in parallel with the other Valgrind tests helps.
2021-04-08 13:35:14 +10:00
Darren Tucker 80032102d0 ifdef out MIN and MAX.
In -portable, defines.h ensures that these are defined, so redefining
potentially causes a warning.  We don't just delete it to make any
future code syncs a little but easier.  bz#3293.
2021-04-08 13:25:57 +10:00
Darren Tucker d1bd184046 Remove only use of warn().
The warn() function is only used in one place in portable and does not
exist upstream.  Upgrade the only instance it's used to fail()
(the privsep/sandbox+proxyconnect, from back when that was new) and
remove the now-unused function.
2021-04-07 17:02:51 +10:00
Darren Tucker fea8f4b1aa Move make_tmpdir() into portable-specific area.
Reduces diff vs OpenBSD and makes it more likely diffs will apply
cleanly.
2021-04-07 17:02:51 +10:00
dtucker@openbsd.org 13e5fa2acf upstream: Add TEST_SSH_ELAPSED_TIMES environment variable to print the
elapsed time in seconds of each test.  This depends on "date +%s" which is
not specified by POSIX but is commonly implemented.

OpenBSD-Regress-ID: ec3c8c19ff49b2192116a0a646ee7c9b944e8a9c
2021-04-07 17:02:51 +10:00
Darren Tucker ef4f46ab43 Move the TEST_SSH_PORT section down a bit.
This groups the portable-specific changes together and makes it a
little more likely that patches will apply cleanly.
2021-04-07 17:02:51 +10:00
Darren Tucker 3674e33fa7 Further split Valgrind tests.
Even split in two, the Valgrind tests take by far the longest to run,
so split them four ways to further increase parallelism.
2021-04-07 17:02:27 +10:00
djm@openbsd.org 961af266b8 upstream: include "ssherr.h" not <ssherr.h>; from Balu Gajjala via
bz#3292

OpenBSD-Commit-ID: e9535cd9966eb2e69e73d1ede1f44905c30310bd
2021-04-07 09:25:53 +10:00
Damien Miller e7d0a285db wrap struct rlimit in HAVE_GETRLIMIT too 2021-04-07 08:50:38 +10:00
Damien Miller f283a6c2e0 wrap getrlimit call in HAVE_GETRLIMIT; bz3291 2021-04-07 08:20:59 +10:00
dtucker@openbsd.org 679bdc4a5c upstream: Don't check return value of unsetenv(). It's part of the
environment setup and not part of the actual test, and some platforms
-portable runs on declare it as returning void, which prevents the test from
compiling.

OpenBSD-Regress-ID: 24f08543ee3cdebc404f2951f3e388cc82b844a1
2021-04-06 19:31:18 +10:00
jmc@openbsd.org 320af2f3de upstream: remove stray inserts; from matthias schmidt
OpenBSD-Commit-ID: 2c36ebdc54e14bbf1daad70c6a05479a073d5c63
2021-04-06 19:08:53 +10:00
jmc@openbsd.org 801f710953 upstream: missing comma; from kawashima james
OpenBSD-Commit-ID: 31cec6bf26c6db4ffefc8a070715ebef274e68ea
2021-04-06 19:08:53 +10:00
Darren Tucker b3ca08cb17 Install libcbor with libfido2. 2021-04-05 23:48:31 +10:00
Damien Miller f3ca8af87a enable authopt and misc unit tests
Neither were wired into the build, both required some build
adaptations for -portable
2021-04-03 18:21:08 +11:00
djm@openbsd.org dc1b45841f upstream: typos in comments; GHPR#180 from Vill
=?UTF-8?q?e=20Skytt=C3=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: 93c732381ae0e2b680c79e67c40c1814b7ceed2c
2021-04-03 17:59:32 +11:00
djm@openbsd.org 53ea05e09b upstream: sync CASignatureAlgorithms lists with reality. GHPR#174 from
Matt Hazinski

OpenBSD-Commit-ID: f05e4ca54d7e67b90fe58fe1bdb1d2a37e0e2696
2021-04-03 17:57:01 +11:00
Damien Miller 57ed647ee0 polish whitespace for portable files 2021-04-03 17:47:37 +11:00
djm@openbsd.org 31d8d231eb upstream: highly polished whitespace, mostly fixing spaces-for-tab
and bad indentation on continuation lines. Prompted by GHPR#185

OpenBSD-Commit-ID: e5c81f0cbdcc6144df1ce468ec1bac366d8ad6e9
2021-04-03 17:23:02 +11:00
djm@openbsd.org 34afde5c73 upstream: whitespace (tab after space)
OpenBSD-Commit-ID: 0e2b3f7674e985d3f7c27ff5028e690ba1c2efd4
2021-04-03 17:20:00 +11:00
Darren Tucker 7cd262c1c5 Save config.h and config.log on failure too. 2021-04-03 16:59:10 +11:00
djm@openbsd.org 460aee9298 upstream: fix incorrect plural; from Ville Skyt
=?UTF-8?q?t=C3=A4=20via=20GHPR#181?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: 92f31754c6296d8f403d7c293e09dc27292d22c9
2021-04-03 16:49:02 +11:00
djm@openbsd.org 082804c14e upstream: ensure that pkcs11_del_provider() is called before exit -
some PKCS#11 providers get upset if C_Initialize is not matched with
C_Finalize.

From Adithya Baglody via GHPR#234; ok markus

OpenBSD-Commit-ID: f8e770e03b416ee9a58f9762e162add900f832b6
2021-04-03 16:42:45 +11:00
djm@openbsd.org 464ebc82aa upstream: unused variable
OpenBSD-Commit-ID: 85f6a394c8e0f60d15ecddda75176f112007b205
2021-04-03 16:30:17 +11:00
djm@openbsd.org dc3c0be820 upstream: Fix two problems in string->argv conversion: 1) multiple
backslashes were not being dequoted correctly and 2) quoted space in the
middle of a string was being incorrectly split.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

A unit test for these cases has already been committed

prompted by and based on GHPR#223 by Eero Häkkinen; ok markus@

OpenBSD-Commit-ID: d7ef27abb4eeeaf6e167e9312e4abe9e89faf1e4
2021-04-03 16:24:40 +11:00
Damien Miller f75bcbba58 missing bits from 259d648e 2021-04-03 16:22:48 +11:00
djm@openbsd.org 4cbc4a7228 upstream: cannot effectively test posix-rename extension after
changes in feature advertisment.

OpenBSD-Regress-ID: 5e390bf88d379162aaa81b60ed86b34cb0c54d29
2021-04-01 09:22:53 +11:00
djm@openbsd.org 259d648e63 upstream: add a test for misc.c:argv_split(), currently fails
OpenBSD-Regress-ID: ad6b96d6ebeb9643b698b3575bdd6f78bb144200
2021-04-01 09:22:53 +11:00
djm@openbsd.org 473ddfc2d6 upstream: split
OpenBSD-Regress-ID: f6c03c0e4c58b3b9e04b161757b8c10dc8378c34
2021-04-01 09:22:31 +11:00
djm@openbsd.org 1339800fef upstream: Use new limits@openssh.com protocol extension to let the
client select good limits based on what the server supports. Split the
download and upload buffer sizes to allow them to be chosen independently.

In practice (and assuming upgraded sftp/sftp-server at each end), this
increases the download buffer 32->64KiB and the upload buffer
32->255KiB.

Patches from Mike Frysinger; ok dtucker@

OpenBSD-Commit-ID: ebd61c80d85b951b794164acc4b2f2fd8e88606c
2021-04-01 09:20:57 +11:00
djm@openbsd.org 6653c61202 upstream: do not advertise protocol extensions that have been
disallowed by the command-line options (e.g. -p/-P/-R); ok dtucker@

OpenBSD-Commit-ID: 3a8a76b3f5131741aca4b41bfab8d101c9926205
2021-04-01 09:19:36 +11:00
Damien Miller 71241fc05d gnome-ssh-askpass3 is a valid target here 2021-03-29 15:14:25 +11:00
djm@openbsd.org 8a9520836e upstream: return non-zero exit status when killed by signal; bz#3281 ok
dtucker@

OpenBSD-Commit-ID: 117b31cf3c807993077b596bd730c24da9e9b816
2021-03-19 13:24:56 +11:00
djm@openbsd.org 1269b8a686 upstream: increase maximum SSH2_FXP_READ to match the maximum
packet size. Also handle zero-length reads that are borderline nonsensical
but not explicitly banned by the spec. Based on patch from Mike Frysinger,
feedback deraadt@ ok dtucker@

OpenBSD-Commit-ID: 4e67d60d81bde7b84a742b4ee5a34001bdf80d9c
2021-03-19 13:20:32 +11:00
djm@openbsd.org 860b676044 upstream: don't let logging clobber errno before use
OpenBSD-Commit-ID: ce6cca370005c270c277c51c111bb6911e1680ec
2021-03-19 13:20:32 +11:00
Darren Tucker 5ca8a92165 Only call dh_set_moduli_file if using OpenSSL.
Fixes link failure when configuring --without-openssl since dh.c is not
linked in.
2021-03-13 14:40:43 +11:00
Darren Tucker 867a7dcf00 Don't install moduli during tests.
Now that we have TEST_SSH_MODULI_FILE pointing to the moduli in the
soure directory we don't need to install the file to prevent warnings
about it being missing.
2021-03-13 13:52:53 +11:00
Darren Tucker 0c054538fc Point TEST_SSH_MODULI_FILE at our own moduli.
This will allow the test to run without requiring a moduli file
installed at the configured default path.
2021-03-13 13:51:26 +11:00
jsg@openbsd.org 4d48219c72 upstream: spelling
OpenBSD-Commit-ID: 478bc3db04f62f1048ed6e1765400f3ab325e60f
2021-03-13 13:14:13 +11:00
dtucker@openbsd.org 88057eb6df upstream: Add ModuliFile keyword to sshd_config to specify the
location of the "moduli" file containing the groups for DH-GEX.  This will
allow us to run tests against arbitrary moduli files without having to
install them. ok djm@

OpenBSD-Commit-ID: 8df99d60b14ecaaa28f3469d01fc7f56bff49f66
2021-03-13 13:14:13 +11:00
djm@openbsd.org f07519a2af upstream: pwcopy() struct passwd that we're going to reuse across a
bunch of library calls; bz3273 ok dtucker@

OpenBSD-Commit-ID: b6eafa977b2e44607b1b121f5de855107809b762
2021-03-13 13:09:54 +11:00
dtucker@openbsd.org 69d6d4b0c8 upstream: Import regenerated moduli file.
OpenBSD-Commit-ID: 7ac6c252d2a5be8fbad4c66d9d35db507c9dac5b
2021-03-13 13:09:28 +11:00
djm@openbsd.org e5895e8ecf upstream: no need to reset buffer after send_msg() as that is done
for us; patch from Mike Frysinger

OpenBSD-Commit-ID: 565516495ff8362a38231e0f1a087b8ae66da59c
2021-03-13 13:06:10 +11:00
dtucker@openbsd.org 721948e674 upstream: Add TEST_SSH_MODULI_FILE variable to allow overriding of the
moduli file used during the test run.

OpenBSD-Regress-ID: be10f785263120edb64fc87db0e0d6570a10220a
2021-03-13 13:02:51 +11:00