Commit Graph

11901 Commits

Author SHA1 Message Date
Darren Tucker
32fddb982f
Fix setres*id checks to work with clang-16.
glibc has the prototypes for setresuid and setresgid behind _GNU_SOURCE,
and clang 16 will error out on implicit function definitions, so add
_GNU_SOURCE and the required headers to the configure checks.  From
sam at @gentoo.org via bz#3497.
2022-11-07 10:39:01 +11:00
Sam James
12af712d11
configure.ac: Fix -Wstrict-prototypes
Clang 16 now warns on this and it'll be removed in C23, so let's
just be future proof. It also reduces noise when doing general
Clang 16 porting work (which is a big job as it is).  github PR#355.

Signed-off-by: Sam James <sam@gentoo.org>
2022-11-06 18:51:52 +11:00
Sam James
40b0a5eb6e
configure.ac: Add <pty.h> include for openpty
Another Clang 16ish fix (which makes -Wimplicit-function-declaration
an error by default).  github PR#355.

See: 2efd71da49
See: be19763532
2022-11-06 18:51:52 +11:00
Rochdi Nassah
6b17e12887
Fix broken zlib link. 2022-11-05 07:33:11 +11:00
Darren Tucker
99500df246
Don't run openbsd-compat tests on Cygwin.
Add "compat-tests" to the default TEST_TARGET so we can override as
necessary.  Override TEST_TARGET for Cygwin as the tests don't currently
compile there.
2022-11-04 17:30:58 +11:00
djm@openbsd.org
3cae9f92a3
upstream: replace recently-added valid_domain() check for hostnames
going to known_hosts with a more relaxed check for bad characters; previous
commit broke address literals. Reported by/feedback from florian@

OpenBSD-Commit-ID: 10b86dc6a4b206adaa0c11b58b6d5933898d43e0
2022-11-04 09:01:17 +11:00
Darren Tucker
9655217231
Rerun tests on changes to Makefile.in in any dir. 2022-11-03 23:07:50 +11:00
Darren Tucker
3500f0405a
Link libssh into compat tests.
The cygwin compat code uses xmalloc, so add libssh.a so pick up that.
2022-11-03 23:04:08 +11:00
Darren Tucker
ec59effcf6
Fix compat regress to work with non-GNU make. 2022-11-03 21:44:23 +11:00
Darren Tucker
73550a218e
Increase selfhosted job timeout.
The default job timeout of 360 (6h) is not enough to complete the
regress tests for some of the slow VMs depending on the load on the host.
Increase to 600 (10h).
2022-11-03 13:41:16 +11:00
Darren Tucker
db97d8d0b9
Only run opensslver tests if built with OpenSSL. 2022-11-03 10:00:43 +11:00
Darren Tucker
ba05370963
Add tests for OpenSSL 3.0.7 and LibreSSL 3.6.1. 2022-11-03 08:40:06 +11:00
Darren Tucker
edd24101c7
Run compat regress tests too. 2022-11-03 08:17:39 +11:00
Darren Tucker
fe88d67e75
Compat tests need libcrypto.
This was moved to CHANNELLIBS during the libs refactor.  Spotted by
rapier at psc.edu.
2022-11-03 08:14:05 +11:00
Darren Tucker
96b519726b
Include time.h when defining timegm.
Fixes build on some platforms eg recent AIX.
2022-11-03 04:25:34 +11:00
Darren Tucker
da6038bd5c
Always use compat getentropy.
Have it call native getentropy and fall back as required.  Should fix
issues of platforms where libc has getentropy but it is not implemented
in the kernel.  Based on github PR#354 from simsergey.
2022-11-02 12:20:50 +11:00
Darren Tucker
5ebe18cab6
Check for sockaddr_in.sin_len.
If found, set SOCK_HAS_LEN which is used in addr.c.  Should fix keyscan
tests on platforms with this (eg old NetBSD).
2022-11-02 10:51:48 +11:00
dtucker@openbsd.org
a1febadf42
upstream: Use variable for diff options
instead of unconditionally specifying "-rN". This will make life easier
in -portable where not all diff's understand -N.

OpenBSD-Regress-ID: 8b8a407115546be1c6d72d350b1e4f1f960d3cd3
2022-11-01 11:10:48 +11:00
Darren Tucker
f6d3ed9a8a
OpenSSL dev branch is 302 not 320.
While there, also accept 301 which it shat it was previously.
2022-10-31 05:13:02 +11:00
djm@openbsd.org
25c8a2bbcc
upstream: put sshkey_check_rsa_length() back in sshkey.c to unbreak
OPENSSL=no builds

OpenBSD-Commit-ID: 99eec58abe382ecd14b14043b195ee1babb9cf6e
2022-10-28 13:49:01 +11:00
djm@openbsd.org
1192588546
upstream: allow ssh-keyscan(1) to accept CIDR address ranges, e.g.
ssh-keyscan 192.168.0.0/24

If a CIDR range is passed, then it will be expanded to all possible
addresses in the range including the all-0s and all-1s addresses.

bz#976 feedback/ok markus@

OpenBSD-Commit-ID: ce6c5211f936ac0053fd4a2ddb415277931e6c4b
2022-10-28 13:39:35 +11:00
Damien Miller
64af420930
fix merge botch 2022-10-28 12:54:35 +11:00
djm@openbsd.org
2726764269
upstream: refactor sshkey_private_deserialize
feedback/ok markus@

OpenBSD-Commit-ID: f5ca6932fdaf840a5e8250becb38315a29b5fc9f
2022-10-28 12:47:01 +11:00
djm@openbsd.org
2519a7077a
upstream: refactor sshkey_private_serialize_opt()
feedback/ok markus@

OpenBSD-Commit-ID: 61e0fe989897901294efe7c3b6d670cefaf44cbd
2022-10-28 12:47:01 +11:00
djm@openbsd.org
11a768adf9
upstream: refactor certify
feedback/ok markus@

OpenBSD-Commit-ID: 35d742992e223eaca3537e6fb3d3002c08eed4f6
2022-10-28 12:47:00 +11:00
djm@openbsd.org
3fbc58bb24
upstream: refactor sshkey_sign() and sshkey_verify()
feedback/ok markus@

OpenBSD-Commit-ID: 368e662c128c99d05cc043b1308d2b6c71a4d3cc
2022-10-28 12:47:00 +11:00
djm@openbsd.org
a1deb6cdbb
upstream: refactor sshkey_from_blob_internal()
feedback/ok markus@

OpenBSD-Commit-ID: 1f46c0cbb8060ee9666a02749594ad6658c8e283
2022-10-28 12:46:59 +11:00
djm@openbsd.org
7d00799c93
upstream: refactor sshkey_from_private()
feedback/ok markus@

OpenBSD-Commit-ID: e5dbe7a3545930c50f70ee75c867a1e08b382b53
2022-10-28 12:46:59 +11:00
djm@openbsd.org
262647c2e9
upstream: factor out key generation
feedback/ok markus@

OpenBSD-Commit-ID: 5b4211bff4de8d9adb84bc72857a8c42c44e7ceb
2022-10-28 12:46:58 +11:00
djm@openbsd.org
401c74e7dc
upstream: refactor and simplify sshkey_read()
feedback/ok markus@

OpenBSD-Commit-ID: 0d93b7a56e31cd06a8bb0d2191d084ce254b0971
2022-10-28 12:46:57 +11:00
djm@openbsd.org
591fed94e6
upstream: factor out public key serialization
feedback/ok markus@

OpenBSD-Commit-ID: a3570c4b97290c5662890aea7328d87f55939033
2022-10-28 12:46:57 +11:00
djm@openbsd.org
1e78844ae2
upstream: factor out sshkey_equal_public()
feedback/ok markus@

OpenBSD-Commit-ID: 1368ba114cb37732fe6ec3d89c7e6d27ea6fdc94
2022-10-28 12:46:56 +11:00
djm@openbsd.org
25de1c01a8
upstream: begin big refactor of sshkey
Move keytype data and some of the type-specific code (allocation,
cleanup, etc) out into each key type's implementation. Subsequent
commits will move more, with the goal of having each key-*.c file
owning as much of its keytype's implementation as possible.

lots of feedback + ok markus@

OpenBSD-Commit-ID: 0f2b4334f73914344e9e5b3d33522d41762a57ec
2022-10-28 12:46:56 +11:00
djm@openbsd.org
445363433b
upstream: Be more paranoid with host/domain names coming from the
never write a name with bad characters to a known_hosts file.

reported by David Leadbeater, ok deraadt@

OpenBSD-Commit-ID: ba9b25fa8b5490b49398471e0c9657b0cbc7a5ad
2022-10-25 10:16:35 +11:00
djm@openbsd.org
7190154de2
upstream: regress test for unmatched glob characters; fails before
previous commit but passes now. bz3488; prodded by dtucker@

OpenBSD-Regress-ID: 0cc5cc9ea4a6fd170dc61b9212f15badaafb3bbd
2022-10-25 08:56:38 +11:00
djm@openbsd.org
a4821a5924
upstream: when scp(1) is using the SFTP protocol for transport (the
default), better match scp/rcp's handling of globs that don't match the
globbed characters but do match literally (e.g. trying to transfer
"foo.[1]").

Previously scp(1) in SFTP mode would not match these pathnames but
legacy scp/rcp mode would.

Reported by Michael Yagliyan in bz3488; ok dtucker@

OpenBSD-Commit-ID: d8a3773f53015ba811fddba7473769a2fd343e11
2022-10-25 08:55:11 +11:00
jsg@openbsd.org
18376847b8
upstream: use correct type with sizeof ok djm@
OpenBSD-Commit-ID: d6c882c2e8a42ff831a5b3cbc2c961ecb2dd6143
2022-10-25 08:55:11 +11:00
jmc@openbsd.org
4a4883664d
upstream: ssh-agent.1: - use Nm not Xr for self-ref - while here,
wrap a long line

ssh-agent.c:
- add -O to usage()

OpenBSD-Commit-ID: 855dac4695cef22e96d69c53436496bc408ca389
2022-10-25 08:55:10 +11:00
djm@openbsd.org
9fd2441113
upstream: document "-O no-restrict-websafe"; spotted by Ross L
Richardson

OpenBSD-Commit-ID: fe9eaa50237693a14ebe5b5614bf32a02145fe8b
2022-10-25 08:54:43 +11:00
Darren Tucker
614252b05d
OpenSSL dev branch now identifies as 3.2.0. 2022-10-18 06:29:16 +11:00
Damien Miller
195e5a65fd
revert c64b62338b and guard POLL* defines instead
c64b62338b broke OSX builds, which do have poll.h but lack ppoll(2)
Spotted by dtucker
2022-10-17 09:41:47 +11:00
Damien Miller
bc2e480d99
undef _get{short,long} before redefining 2022-10-14 14:52:22 +11:00
Harmen Stoppels
5eb796a369
Fix snprintf configure test for clang 15
Clang 15 -Wimplicit-int defaults to an error in C99 mode and above.
A handful of tests have "main(..." and not "int main(..." which caused
the tests to produce incorrect results.
2022-10-14 07:37:16 +11:00
Damien Miller
c64b62338b
skip bsd-poll.h if poll.h found; ok dtucker 2022-10-10 12:32:43 +11:00
djm@openbsd.org
5ee2b8ccfc
upstream: honour user's umask if it is more restrictive then the ssh
default (022); based on patch from Alex Henrie, ok dtucker@ deraadt@

OpenBSD-Commit-ID: fe1b9e15fc9a4f49fc338e848ce14d8727abe82d
2022-10-07 09:45:02 +11:00
Darren Tucker
a75cffc270
Add LibreSSL 3.6.0 to test suite.
While there, bump OpenSSL to latest 1.1.1q release.
2022-10-07 03:54:56 +11:00
Darren Tucker
fcc0f0c0e9
Add 9.1 branch to CI status page. 2022-10-06 21:18:16 +11:00
Darren Tucker
ef211eee63
Test commits to all branches of portable.
Only test OpenBSD upstream on commits to master since that's what it
tracks.
2022-10-05 06:31:48 +11:00
Damien Miller
fe646de03c
whitespace at EOL 2022-10-05 03:47:26 +11:00
Damien Miller
a6e1852d10
mention libfido2 autodetection 2022-10-05 03:40:01 +11:00