]>
git.ipfire.org Git - thirdparty/openssh-portable.git/log
Philip Hands [Wed, 24 May 2023 17:41:14 +0000 (19:41 +0200)]
fixup! if -s & -p specified, mention 'sftp -P' on
success
SSH-Copy-ID-Upstream:
32686e7c65b4fa2846e474d3315102dfa0f043b0
Darren Tucker [Tue, 3 Aug 2021 11:25:48 +0000 (21:25 +1000)]
Make ssh-copy-id(1) consistent with OpenSSH.
This makes the ssh-copy-id man page more consistent with the rest of the
OpenSSH man pages:
- new sentence, new line
- no sentences >80
- N.B. -> NB
- zap unused .Pp
- zap trailing whitespace
Report from Debian via mindrot bz#3331, diff from jmc at openbsd.org.
SSH-Copy-ID-Upstream:
d8974cfb6242316460ed22a1ccc662800a50c5d3
Philip Hands [Wed, 24 May 2023 09:45:43 +0000 (11:45 +0200)]
if -s & -p specified, mention 'sftp -P' on success
This was inspired by this:
https://github.com/openssh/openssh-portable/pull/321
but I thought that it was better to not do the sed patching.
BTW the reason one can get away with using $SSH_OPTS throughout, despite
the lowercase -p in there, even if sftp is in use, is that the sftp call
is using the already-established ssh master connection, so the port was
passed to the earlier ssh.
SSH-Copy-ID-Upstream:
1c124d9bfafdbe28a00b683367ebf5750ce12eb2
Philip Hands [Tue, 23 May 2023 21:07:11 +0000 (23:07 +0200)]
Philip Hands [Tue, 23 May 2023 18:52:13 +0000 (20:52 +0200)]
make -x also apply to the target script
SSH-Copy-ID-Upstream:
3c4214704f427bd0654adf9b0fc079253db21cf4
Philip Hands [Tue, 23 May 2023 14:46:42 +0000 (16:46 +0200)]
add -t option to specify the target path
Allow the default target path (.ssh/authorized_files) to be over-riden
This was inspired by this MR from Panagiotis Cheilaris <philaris@cs.ntua.gr>
https://gitlab.com/phil_hands/ssh-copy-id/-/merge_requests/8
SSH-Copy-ID-Upstream:
a942a0e076874adb6d8b2f0fb76d6c7918190fcd
Carlos RodrÃguez Gili [Tue, 20 Apr 2021 17:23:57 +0000 (19:23 +0200)]
Fix test error for /bin/sh on Solaris 10 and older
On Solaris 10 and older targets /bin/sh is not POSIX-compliant.
Test -z `...` fails with error 'sh: test: argument expected'.
Using quotes around backticks fixes this and doesn't break
POSIX compatibility.
SSH-Copy-ID-Upstream:
98394072a3f985b2650c1e8eab2fef84e38cc065
Jakub Jelen [Tue, 2 Mar 2021 21:34:05 +0000 (21:34 +0000)]
Remove outdated comment
The commit
b068122 removed the code dropping the trailing colon, but the comment stayed leaving the code confusing for future readers
SSH-Copy-ID-Upstream:
930d39f238117cd53810240ec989d0356aa1c1f6
Darren Tucker [Wed, 10 May 2023 08:50:46 +0000 (18:50 +1000)]
Special case OpenWrt instead of Dropbear.
OpenWrt overrides the location of authorized_keys for root. Currently we
assume that all Dropbear installations behave this way, which is not the
case. Check for OpenWrt and root user before using that location instead
of assuming that for all Dropbear servers. Prompted by Github PR#250.
SSH-Copy-ID-Upstream:
0e1f5d443a9967483c33945793107ae3f3e4af2d
Philip Hands [Thu, 18 May 2023 16:20:55 +0000 (18:20 +0200)]
ssh-copy-id: add -x option (for debugging)
This option causes the ssh-copy-id to run with set -x
SSH-Copy-ID-Upstream:
a0ee367ea8c0a29c8b4515245e408d2d349e7844
Philip Hands [Thu, 18 May 2023 15:14:41 +0000 (17:14 +0200)]
update copyright notices
SSH-Copy-ID-Upstream:
c284ed33b361814ea48ff68cbd01ca525b2bf117
djm@openbsd.org [Wed, 24 May 2023 23:01:06 +0000 (23:01 +0000)]
upstream: fix AuthorizedPrincipalsCommand when AuthorizedKeysCommand
appears previously in configuration. Reported by John Meyers in bz3574 ok
dtucker@
OpenBSD-Commit-ID:
1c92e4517284386703936e1d3abaa36cfacf1951
dtucker@openbsd.org [Wed, 10 May 2023 10:04:20 +0000 (10:04 +0000)]
upstream: Remove unused prototypes for ssh1 RSA functions.
From lengyijun via github PR#396.
OpenBSD-Commit-ID:
379a5afa8b7a0f3cba0c8a9bcceb4e5e33a5c1ef
Darren Tucker [Tue, 9 May 2023 09:26:56 +0000 (19:26 +1000)]
main(void) to prevent unused variable warning.
Darren Tucker [Tue, 9 May 2023 09:25:45 +0000 (19:25 +1000)]
Remove warning pragma since clang doesn't like it.
Darren Tucker [Tue, 9 May 2023 07:13:33 +0000 (17:13 +1000)]
Suppress warning for snprintf truncation test.
Darren Tucker [Tue, 9 May 2023 07:12:50 +0000 (17:12 +1000)]
Update OpenSSL compat test for 3.x.
Darren Tucker [Mon, 8 May 2023 10:23:08 +0000 (20:23 +1000)]
Add macos13 PAM test target.
Darren Tucker [Mon, 8 May 2023 10:14:46 +0000 (20:14 +1000)]
Skip agent-peereid test on macos13.
sudo -S nobody doesn't work on the github runners (probably a
permission issue) so skip that test.
Darren Tucker [Mon, 8 May 2023 10:14:28 +0000 (20:14 +1000)]
Include config.guess in debug output.
Darren Tucker [Mon, 8 May 2023 10:12:59 +0000 (20:12 +1000)]
Handle OpenSSL >=3 ABI compatibility.
Beyond OpenSSL 3.0, the ABI compatibility guarantees are wider (only
major must match instead of major and minor in earlier versions).
bz#3548, ok djm@
dtucker@openbsd.org [Mon, 1 May 2023 08:57:29 +0000 (08:57 +0000)]
upstream: Import regenerated moduli.
OpenBSD-Commit-ID:
3d5f811cfcaed8cc4a97e1db49ac61bdf118113c
Darren Tucker [Mon, 1 May 2023 01:45:14 +0000 (11:45 +1000)]
Add macos-13 test target.
Also flatten OS list for clarity.
djm@openbsd.org [Sun, 30 Apr 2023 22:54:22 +0000 (22:54 +0000)]
upstream: adjust ftruncate() logic to handle servers that reorder
requests.
sftp/scp will ftruncate the destination file after a transfer completes,
to deal with the case where a longer destination file already existed.
We tracked the highest contiguous block transferred to deal with this
case, but our naive tracking doesn't deal with servers that reorder
requests - a misfeature strictly permitted by the protocol but seldom
implemented.
Adjust the logic to ftruncate() at the highest absolute block received
when the transfer is successful. feedback deraadt@ ok markus@
prompted by https://github.com/openssh/openssh-portable/commit/9b733#commitcomment-
110679778
OpenBSD-Commit-ID:
4af7fac75958ad8507b4fea58706f3ff0cfddb1b
djm@openbsd.org [Wed, 26 Apr 2023 01:36:03 +0000 (01:36 +0000)]
upstream: Check for ProxyJump=none in CanonicalizeHostname logic.
Previously ssh would incorrectly refuse to canonicalise the hostname
if ProxyJump was explicitly set to "none" when CanonicalizeHostname=yes
bz3567; ok dtucker
OpenBSD-Commit-ID:
80a58e43c3a32f97361282f756ec8d3f37989efd
jsg@openbsd.org [Wed, 12 Apr 2023 14:22:04 +0000 (14:22 +0000)]
upstream: remove duplicate signal.h include
OpenBSD-Commit-ID:
30c0a34d74d91ddd0e6992525da70d3293392f70
jsg@openbsd.org [Wed, 12 Apr 2023 08:53:54 +0000 (08:53 +0000)]
upstream: fix double words ok dtucker@
OpenBSD-Commit-ID:
44d3223902fbce5276422bdc8063ab72a4078489
Darren Tucker [Tue, 11 Apr 2023 06:49:19 +0000 (16:49 +1000)]
Test against LibreSSL 3.7.2.
Damien Miller [Thu, 6 Apr 2023 04:33:10 +0000 (14:33 +1000)]
remove unused upper-case const strings in fmtfp
no float format that uses upper-case is supported nor are hex floats.
ok dtucker
djm@openbsd.org [Thu, 6 Apr 2023 03:56:02 +0000 (03:56 +0000)]
upstream: simplify sshsig_find_principals() similar to what happened to
sshsig_check_allowed_keys() in r1.31, removing some dead code
OpenBSD-Commit-ID:
a493e628d4d6c08f878c276d998f4313ba61702d
djm@openbsd.org [Thu, 6 Apr 2023 03:21:31 +0000 (03:21 +0000)]
upstream: remove redundant ssh!=NULL check; we'd already
dereferenced it
OpenBSD-Commit-ID:
852bf12591ec5a9fb12dcbde9b1fd3945ad0df3c
djm@openbsd.org [Thu, 6 Apr 2023 03:19:32 +0000 (03:19 +0000)]
upstream: match_user() shouldn't be called with user==NULL unless
host and ipaddr are also NULL
OpenBSD-Commit-ID:
fa3518346c21483e9e01a2e4b9436ae501daf8ea
djm@openbsd.org [Thu, 6 Apr 2023 03:12:32 +0000 (03:12 +0000)]
upstream: don't care about glob() return value here.
OpenBSD-Commit-ID:
85bb82fea90478a482e9f65a1bec0aa24227fd66
dtucker@openbsd.org [Mon, 3 Apr 2023 08:10:54 +0000 (08:10 +0000)]
upstream: Move up null check and simplify process_escapes.
Based on Coverity CID 291863 which points out we check the channel
pointer for NULLness after dereferencing it. Move this to the start
of the function, and while there simplify initialization of efc a bit.
ok djm@
OpenBSD-Commit-ID:
de36e5ad6fde0fe263ca134e986b9095dc59380a
Damien Miller [Fri, 31 Mar 2023 03:51:20 +0000 (14:51 +1100)]
need va_end() after va_copy(); ok dtucker
spotted by Coverity
dtucker@openbsd.org [Fri, 31 Mar 2023 05:56:36 +0000 (05:56 +0000)]
upstream: Explicitly ignore return from waitpid here too.
OpenBSD-Commit-ID:
eef2403df083c61028969fc679ee370373eacacb
dtucker@openbsd.org [Fri, 31 Mar 2023 04:45:08 +0000 (04:45 +0000)]
upstream: Explictly ignore return codes
where we don't check them.
OpenBSD-Commit-ID:
1ffb03038ba1b6b72667be50cf5e5e396b5f2740
dtucker@openbsd.org [Fri, 31 Mar 2023 04:42:29 +0000 (04:42 +0000)]
upstream: Return immediately from get_sock_port
if sock <0 so we don't call getsockname on a negative FD. From Coverity
CID 291840, ok djm@
OpenBSD-Commit-ID:
de1c1130646230c2eda559831fc6bfd1b61d9618
djm@openbsd.org [Fri, 31 Mar 2023 04:23:02 +0000 (04:23 +0000)]
upstream: don't leak arg2 on parse_pubkey_algos error path; ok
dtucker@
OpenBSD-Commit-ID:
7d0270ad3dd102412ca76add2b3760518abdef75
djm@openbsd.org [Fri, 31 Mar 2023 04:22:27 +0000 (04:22 +0000)]
upstream: clamp max number of GSSAPI mechanisms to 2048; ok dtucker
OpenBSD-Commit-ID:
ce66db603a913d3dd57063e330cb5494d70722c4
djm@openbsd.org [Fri, 31 Mar 2023 04:21:56 +0000 (04:21 +0000)]
upstream: don't print key if printing hostname failed; with/ok
dtucker@
OpenBSD-Commit-ID:
ad42971a6ee5a46feab2d79f7f656f8cf4b119f3
djm@openbsd.org [Fri, 31 Mar 2023 04:04:15 +0000 (04:04 +0000)]
upstream: remove redundant test
OpenBSD-Commit-ID:
6a0b719f9b1ae9d42ad8c5b144c7962c93792f7c
djm@openbsd.org [Fri, 31 Mar 2023 04:00:37 +0000 (04:00 +0000)]
upstream: don't attempt to decode a ridiculous number of
attributes; harmless because of bounds elsewhere, but better to be explicit
OpenBSD-Commit-ID:
1a34f4b6896155b80327d15dc7ccf294b538a9f2
djm@openbsd.org [Fri, 31 Mar 2023 03:22:49 +0000 (03:22 +0000)]
upstream: remove unused variable; prompted by Coverity CID 291879
OpenBSD-Commit-ID:
4c7d20ef776887b0ba1aabcfc1b14690e4ad0a40
dtucker@openbsd.org [Fri, 31 Mar 2023 00:44:29 +0000 (00:44 +0000)]
upstream: Check fd against >=0 instead of >0 in error path. The
dup could in theory return fd 0 although currently it doesn't in practice.
From Dmitry Belyavskiy vi github PR#238.
OpenBSD-Commit-ID:
4a95f3f7330394dffee5c749d52713cbf3b54846
dtucker@openbsd.org [Thu, 30 Mar 2023 07:19:50 +0000 (07:19 +0000)]
upstream: Ignore return value from muxclient(). It normally loops
without returning, but it if returns on failure we immediately exit.
Coverity CID 405050.
OpenBSD-Commit-ID:
ab3fde6da384ea588226037c38635a6b2e015295
Damien Miller [Fri, 31 Mar 2023 03:17:22 +0000 (14:17 +1100)]
don't call connect() on negative socket
Coverity CID 405037
djm@openbsd.org [Thu, 30 Mar 2023 03:05:01 +0000 (03:05 +0000)]
upstream: return SSH_ERR_KEY_NOT_FOUND if the allowed_signers file
is empty, not SSH_ERR_INTERNAL_ERROR. Also remove some dead code spotted
by Coverity; with/ok dtucker@
OpenBSD-Commit-ID:
898a1e817cda9869554b1f586a434f67bcc3b650
dtucker@openbsd.org [Thu, 30 Mar 2023 00:49:37 +0000 (00:49 +0000)]
upstream: Remove dead code from inside if block.
The only way the if statement can be true is if both dup()s fail, and
in that case the tmp2 can never be set. Coverity CID 291805, ok djm@
OpenBSD-Commit-ID:
c0d6089b3fb725015462040cd94e23237449f0c8
Darren Tucker [Thu, 30 Mar 2023 02:53:29 +0000 (13:53 +1100)]
child_set_eng: verify both env pointer and count.
If child_set env was called with a NULL env pointer and a non-zero count
it would end up in a null deref, although we don't currently do this.
Prompted by Coverity CID 291850, tweak & ok djm@
dtucker@openbsd.org [Wed, 29 Mar 2023 01:07:48 +0000 (01:07 +0000)]
upstream: Ignore return from sshpkt_disconnect
since we set our own return value for the function. Coverity CID 291797,
ok djm@
OpenBSD-Commit-ID:
710b57ba954c139240895e23feea41f203201f04
dtucker@openbsd.org [Wed, 29 Mar 2023 00:59:08 +0000 (00:59 +0000)]
upstream: Plug potential mem leak in process_put.
It allocates abs_dst inside a loop but only frees it on exit, so free
inside the loop if necessary. Coverity CID 291837, ok djm@
OpenBSD-Commit-ID:
a01616503a185519b16f00dde25d34ceaf4ae1a3
djm@openbsd.org [Wed, 29 Mar 2023 00:18:35 +0000 (00:18 +0000)]
upstream: fix memory leak; Coverity CID 291848
with/ok dtucker@
OpenBSD-Commit-ID:
37f80cb5d075ead5a00ad1b74175684ab1156ff8
dtucker@openbsd.org [Tue, 28 Mar 2023 07:44:32 +0000 (07:44 +0000)]
upstream: Plug more mem leaks in sftp by making
make_absolute_pwd_glob work in the same way as make_absolute: you
pass it a dynamically allocated string and it either returns it, or
frees it and allocates a new one. Patch from emaste at freebsd.org and
https://reviews.freebsd.org/D37253 ok djm@
OpenBSD-Commit-ID:
85f7404e9d47fd28b222fbc412678f3361d2dffc
dtucker@openbsd.org [Tue, 28 Mar 2023 06:12:38 +0000 (06:12 +0000)]
upstream: Remove compat code for OpenSSL < 1.1.*
since -portable no longer supports them.
OpenBSD-Commit-ID:
ea2893783331947cd29a67612b4e56f818f185ff
dtucker@openbsd.org [Mon, 27 Mar 2023 23:56:54 +0000 (23:56 +0000)]
upstream: Remove compat code for OpenSSL 1.0.*
versions now that -portable has dropped support for those versions.
OpenBSD-Regress-ID:
82a8eacd87aec28e4aa19f17246ddde9d5ce7fe7
Darren Tucker [Tue, 28 Mar 2023 07:06:42 +0000 (18:06 +1100)]
Prevent conflicts between Solaris SHA2 and OpenSSL.
We used to prevent conflicts between native SHA2 headers and OpenSSL's
by setting OPENSSL_NO_SHA but that was removed prior to OpenSSL 1.1.0
Darren Tucker [Tue, 28 Mar 2023 01:44:03 +0000 (12:44 +1100)]
Remove HEADER_SHA_H from previous...
since it causes more problems than it solves.
Darren Tucker [Mon, 27 Mar 2023 23:35:18 +0000 (10:35 +1100)]
Replace OPENSSL_NO_SHA with HEADER_SHA_H.
Since this test doesn't use OpenSSL's SHA2 and may cause conflicts we
don't want to include it, but OPENSSL_NO_SHA was removed beginning in
OpenSSL's 1.1 series.
Darren Tucker [Mon, 27 Mar 2023 22:50:06 +0000 (09:50 +1100)]
Configure with --target instead of deprecated form.
Darren Tucker [Mon, 27 Mar 2023 11:05:29 +0000 (22:05 +1100)]
Pass rpath when building 64bit Solaris.
Darren Tucker [Mon, 27 Mar 2023 08:21:19 +0000 (19:21 +1100)]
Explicitly disable OpenSSL on AIX test VM.
dtucker@openbsd.org [Mon, 27 Mar 2023 03:56:50 +0000 (03:56 +0000)]
upstream: Add RevokedHostKeys to percent expansion test.
OpenBSD-Regress-ID:
c077fd12a38005dd53d878c5b944154dec88d2ff
dtucker@openbsd.org [Mon, 27 Mar 2023 03:56:11 +0000 (03:56 +0000)]
upstream: Add tilde and environment variable expansion to
RevokedHostKeys. bz#3552, ok djm@
OpenBSD-Commit-ID:
ce5d8e0219b63cded594c17d4c2958c06918ec0d
djm@openbsd.org [Mon, 27 Mar 2023 03:31:05 +0000 (03:31 +0000)]
upstream: fix test: getnameinfo returns a non-zero value on error, not
(neccessarily) -1. From GHPR#384
OpenBSD-Commit-ID:
d35e2b71268f66f5543a7ea68751972b3ae22b25
djm@openbsd.org [Mon, 27 Mar 2023 03:25:08 +0000 (03:25 +0000)]
upstream: scp: when copying local->remote, check that source file
exists before opening SFTP connection to the server. Based on GHPR#370 ok
dtucker, markus
OpenBSD-Commit-ID:
b4dd68e15bfe22ce4fac9960a1066a2b721e54fb
Darren Tucker [Mon, 27 Mar 2023 01:22:30 +0000 (12:22 +1100)]
Also look for gdb error message from OpenIndiana.
Darren Tucker [Mon, 27 Mar 2023 00:08:00 +0000 (11:08 +1100)]
Explicitly disable security key test on aix51 VM.
We don't know how to build the shared objects required for the security
key tests so skip them.
Darren Tucker [Sun, 26 Mar 2023 03:49:43 +0000 (14:49 +1100)]
Split libcrypto and other config flags.
This should allow the automatic OpenSSL version selection in the tests
to work better.
Darren Tucker [Sun, 26 Mar 2023 03:39:45 +0000 (14:39 +1100)]
Specify test target if we build without OpenSSL.
When we decide we can't use the versions of OpenSSL available, also
restrict the tests we run to avoid the ones that need OpenSSL.
Darren Tucker [Sun, 26 Mar 2023 03:22:53 +0000 (14:22 +1100)]
Find suitable OpenSSL version.
Check the installed OpenSSL versions for a suitable one, and if there
isn't (and we don't have a specific version configured) then build
without OpenSSL.
Damien Miller [Fri, 24 Mar 2023 04:02:52 +0000 (15:02 +1100)]
Github testing support for BoringSSL
Damien Miller [Fri, 24 Mar 2023 04:34:29 +0000 (15:34 +1100)]
BoringSSL doesn't support EC_POINT_point2bn()
so don't invoke it in unittest
Damien Miller [Fri, 24 Mar 2023 04:34:05 +0000 (15:34 +1100)]
another ERR_load_CRYPTO_strings() vestige
Damien Miller [Fri, 24 Mar 2023 04:24:05 +0000 (15:24 +1100)]
don't use obsolete ERR_load_CRYPTO_strings()
OpenSSL (and elsewhere in OpenSSH) uses ERR_load_crypto_strings()
Damien Miller [Fri, 24 Mar 2023 04:23:05 +0000 (15:23 +1100)]
Allow building with BoringSSL
Damien Miller [Fri, 24 Mar 2023 04:21:18 +0000 (15:21 +1100)]
put back SSLeay_version compat in configure test
Needed to detect old versions and give good "your version is bad"
messages at configure time; spotted by dtucker@
Damien Miller [Fri, 24 Mar 2023 02:56:25 +0000 (13:56 +1100)]
remove support for old libcrypto
OpenSSH now requires LibreSSL 3.1.0 or greater or
OpenSSL 1.1.1 or greater
with/ok dtucker@
Darren Tucker [Sun, 19 Mar 2023 04:36:13 +0000 (15:36 +1100)]
Test latest OpenSSL 1.1, 3.0 and LibreSSL 3.7.
Darren Tucker [Thu, 16 Mar 2023 10:38:04 +0000 (21:38 +1100)]
Show 9.3 branch instead of 9.2.
Damien Miller [Wed, 15 Mar 2023 21:28:19 +0000 (08:28 +1100)]
depend
Damien Miller [Wed, 15 Mar 2023 21:27:54 +0000 (08:27 +1100)]
crank version
djm@openbsd.org [Wed, 15 Mar 2023 21:19:57 +0000 (21:19 +0000)]
upstream: openssh-9.3
OpenBSD-Commit-ID:
8011495f2449c1029bb316bd015eab2e00509848
dtucker@openbsd.org [Tue, 14 Mar 2023 07:28:47 +0000 (07:28 +0000)]
upstream: Free KRL ptr in addition to its contents.
From Coverity CID 291841, ok djm@
OpenBSD-Commit-ID:
f146ba08b1b43af4e0d7ad8c4dae3748b4fa31b6
dtucker@openbsd.org [Tue, 14 Mar 2023 07:26:25 +0000 (07:26 +0000)]
upstream: Check pointer for NULL before deref.
None of the existing callers seem to do that, but it's worth checking.
From Coverity CID 291834, ok djm@
OpenBSD-Commit-ID:
a0a97113f192a7cb1a2c97b932f677f573cda7a4
dtucker@openbsd.org [Sun, 12 Mar 2023 10:40:39 +0000 (10:40 +0000)]
upstream: Limit number of entries in SSH2_MSG_EXT_INFO
request. This is already constrained by the maximum SSH packet size but this
makes it explicit. Prompted by Coverity CID 291868, ok djm@ markus@
OpenBSD-Commit-ID:
aea023819aa44a2dcb9dd0fbec10561896fc3a09
dtucker@openbsd.org [Sun, 12 Mar 2023 09:41:18 +0000 (09:41 +0000)]
upstream: calloc can return NULL but xcalloc can't.
From Coverity CID 291881, ok djm@
OpenBSD-Commit-ID:
50204b755f66b2ec7ac3cfe379d07d85ca161d2b
dtucker@openbsd.org [Fri, 10 Mar 2023 07:17:08 +0000 (07:17 +0000)]
upstream: Explicitly ignore return from fcntl
(... FD_CLOEXEC) here too. Coverity CID 291853.
OpenBSD-Commit-ID:
99d8b3da9d0be1d07ca8dd8e98800a890349e9b5
Damien Miller [Fri, 10 Mar 2023 04:59:46 +0000 (15:59 +1100)]
bounds checking for getrrsetbyname() replacement;
Spotted by Coverity in CID 405033; ok millert@
dtucker@openbsd.org [Fri, 10 Mar 2023 04:06:21 +0000 (04:06 +0000)]
upstream: Plug mem leak on error path. Coverity CID 405026, ok djm@.
OpenBSD-Commit-ID:
8212ca05d01966fb5e72205c592b2257708a2aac
Darren Tucker [Fri, 10 Mar 2023 03:46:57 +0000 (14:46 +1100)]
Add prototypes for mkstemp replacements.
Should prevent warnings due to our wrapper function.
dtucker@openbsd.org [Fri, 10 Mar 2023 03:01:51 +0000 (03:01 +0000)]
upstream: Expliticly ignore return code from fcntl(.. FD_CLOEXEC) since
there's not much we can do anyway. From Coverity CID 291857, ok djm@
OpenBSD-Commit-ID:
051429dd07af8db3fec10d82cdc78d90bb051729
djm@openbsd.org [Fri, 10 Mar 2023 02:32:04 +0000 (02:32 +0000)]
upstream: Like sshd_config, some ssh_config options are not
first-match-wins. sshd_config.5 was fixed in r1.348, this is the same for
this file
OpenBSD-Commit-ID:
7be55b9351cde449b136afcc52d07aa4113b215e
dtucker@openbsd.org [Fri, 10 Mar 2023 02:24:56 +0000 (02:24 +0000)]
upstream: Remove no-op (int) > INT_MAX checks
since they can never be true. From Coverity CID 405031, ok djm@
OpenBSD-Commit-ID:
9df3783b181e056595e2bb9edf7ed41d61cf8e84
Darren Tucker [Fri, 10 Mar 2023 02:27:29 +0000 (13:27 +1100)]
Wrap mkstemp calls with umask set/restore.
glibc versions 2.06 and earlier did not set a umask on files created by
mkstemp created the world-writable. Wrap mkstemp to set and restore
the umask. From Coverity (CIDs 291826 291886 291891), ok djm@
jcs@openbsd.org [Thu, 9 Mar 2023 21:06:24 +0000 (21:06 +0000)]
upstream: modify parentheses in conditionals to make it clearer what is
being assigned and what is being checked
ok djm dtucker
OpenBSD-Commit-ID:
19c10baa46ae559474409f75a5cb3d0eade7a9b8
dtucker@openbsd.org [Thu, 9 Mar 2023 07:11:05 +0000 (07:11 +0000)]
upstream: Re-split the merge of the reorder-hostkeys test.
In the kex_proposal_populate_entries change I merged the the check for
reordering hostkeys with the actual reordering, but kex_assemble_names
mutates options.hostkeyalgorithms which renders the check ineffective.
Put the check back where it was. Spotted and tested by jsg@, ok djm@
OpenBSD-Commit-ID:
a7469f25a738db5567395d1881e32479a7ffc9de
djm@openbsd.org [Thu, 9 Mar 2023 06:58:26 +0000 (06:58 +0000)]
upstream: include destination constraints for smartcard keys too.
Spotted by Luci Stanescu; ok deraadt@ markus@
OpenBSD-Commit-ID:
add879fac6903a1cb1d1e42c4309e5359c3d870f
Darren Tucker [Thu, 9 Mar 2023 07:24:54 +0000 (18:24 +1100)]
Limit the number of PAM environment variables.
xcalloc has its own limits, but these are specific to PAM. From
Coverity CID 405198, ok djm@
Darren Tucker [Thu, 9 Mar 2023 07:19:44 +0000 (18:19 +1100)]
Limit the number of PAM environment variables.
From Coverity CID 405194, tweaks and ok djm@