]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
7 years agoImport flock() compat from NetBSD.
Darren Tucker [Mon, 26 Feb 2018 03:27:02 +0000 (14:27 +1100)] 
Import flock() compat from NetBSD.

From NetBSD's src/trunk/tools/compat/flock.c, no OpenSSH changes yet.

7 years agoFix breakage when REGRESSTMP not set.
Darren Tucker [Mon, 26 Feb 2018 01:32:14 +0000 (12:32 +1100)] 
Fix breakage when REGRESSTMP not set.

BUILDDIR is not set where used for REGRESSTMP, use make's CURDIR
instead.  Pointed out by djm@.

7 years agoXMSS-related files get includes.h
Damien Miller [Mon, 26 Feb 2018 01:18:14 +0000 (12:18 +1100)] 
XMSS-related files get includes.h

7 years agoobject files end with .o - not .c
Damien Miller [Mon, 26 Feb 2018 01:17:55 +0000 (12:17 +1100)] 
object files end with .o - not .c

7 years agoavoid inclusion of deprecated selinux/flask.h
Damien Miller [Mon, 26 Feb 2018 01:17:22 +0000 (12:17 +1100)] 
avoid inclusion of deprecated selinux/flask.h

Use string_to_security_class() instead.

7 years agoupdatedepend
Damien Miller [Mon, 26 Feb 2018 00:48:27 +0000 (11:48 +1100)] 
updatedepend

7 years agoupstream: Add experimental support for PQC XMSS keys (Extended
markus@openbsd.org [Fri, 23 Feb 2018 15:58:37 +0000 (15:58 +0000)] 
upstream: Add experimental support for PQC XMSS keys (Extended

Hash-Based Signatures) The code is not compiled in by default (see WITH_XMSS
in Makefile.inc) Joint work with stefan-lukas_gazdag at genua.eu See
https://tools.ietf.org/html/draft-irtf-cfrg-xmss-hash-based-signatures-12 ok
djm@

OpenBSD-Commit-ID: ef3eccb96762a5d6f135d7daeef608df7776a7ac

7 years agoupstream: some cleanup for BindInterface and ssh-keyscan;
jmc@openbsd.org [Fri, 23 Feb 2018 07:38:09 +0000 (07:38 +0000)] 
upstream: some cleanup for BindInterface and ssh-keyscan;

OpenBSD-Commit-ID: 1a719ebeae22a166adf05bea5009add7075acc8c

7 years agoInvert sense of getpgrp test.
Darren Tucker [Sun, 25 Feb 2018 12:55:41 +0000 (23:55 +1100)] 
Invert sense of getpgrp test.

AC_FUNC_GETPGRP tests if getpgrp(0) works, which it does if it's not
declared.  Instead, test if the zero-arg version we want to use works.

7 years agoAdd no-op getsid implmentation.
Darren Tucker [Sun, 25 Feb 2018 02:25:15 +0000 (13:25 +1100)] 
Add no-op getsid implmentation.

7 years agobsd-statvfs: include sys/vfs.h, check for f_flags.
Darren Tucker [Sun, 25 Feb 2018 00:22:57 +0000 (11:22 +1100)] 
bsd-statvfs: include sys/vfs.h, check for f_flags.

7 years agoHandle calloc(0,x) where different from malloc.
Darren Tucker [Sat, 24 Feb 2018 23:20:31 +0000 (10:20 +1100)] 
Handle calloc(0,x) where different from malloc.

Configure assumes that if malloc(0) returns null then calloc(0,n)
also does.  On some old platforms (SunOS4) malloc behaves as expected
(as determined by AC_FUNC_MALLOC) but calloc doesn't.  Test for this
at configure time and activate the replacement function if found, plus
handle this case in rpl_calloc.

7 years agoAdd prototype for readv if needed.
Darren Tucker [Sat, 24 Feb 2018 10:06:48 +0000 (21:06 +1100)] 
Add prototype for readv if needed.

7 years agoCheck for raise and supply if needed.
Darren Tucker [Sat, 24 Feb 2018 09:46:37 +0000 (20:46 +1100)] 
Check for raise and supply if needed.

7 years agoCheck for bzero and supply if needed.
Darren Tucker [Sat, 24 Feb 2018 09:25:22 +0000 (20:25 +1100)] 
Check for bzero and supply if needed.

Since explicit_bzero uses it via an indirect it needs to be a function
not just a macro.

7 years agoupstream: Add ssh-keyscan -D option to make it print its results in
djm@openbsd.org [Fri, 23 Feb 2018 05:14:05 +0000 (05:14 +0000)] 
upstream: Add ssh-keyscan -D option to make it print its results in

SSHFP format bz#2821, ok dtucker@

OpenBSD-Commit-ID: 831446b582e0f298ca15c9d99c415c899e392221

7 years agoupstream: Add missing braces.
dtucker@openbsd.org [Fri, 23 Feb 2018 04:18:46 +0000 (04:18 +0000)] 
upstream: Add missing braces.

Caught by the tinderbox's -Werror=misleading-indentation,  ok djm@

OpenBSD-Commit-ID: d44656af594c3b2366eb87d6abcef83e1c88a6ca

7 years agoCheck for ifaddrs.h for BindInterface.
Darren Tucker [Fri, 23 Feb 2018 04:20:42 +0000 (15:20 +1100)] 
Check for ifaddrs.h for BindInterface.

BindInterface required getifaddr and friends so disable if not available
(eg Solaris 10).  We should be able to add support for some systems with
a bit more work but this gets the building again.

7 years agospace before tab in previous
Damien Miller [Fri, 23 Feb 2018 03:19:11 +0000 (14:19 +1100)] 
space before tab in previous

7 years agoupstream: Replace fatal with exit in the case that we do not have
dtucker@openbsd.org [Fri, 9 Feb 2018 03:40:22 +0000 (03:40 +0000)] 
upstream: Replace fatal with exit in the case that we do not have

$SUDO set. Prevents test failures when neither sudo nor doas are configured.

OpenBSD-Regress-ID: 6a0464decc4f8ac7d6eded556a032b0fc521bc7b

7 years agoUse portable syntax for REGRESSTMP.
Darren Tucker [Fri, 23 Feb 2018 03:10:53 +0000 (14:10 +1100)] 
Use portable syntax for REGRESSTMP.

7 years agoupstream: unbreak interop test after SSHv1 purge; patch from Colin
djm@openbsd.org [Fri, 23 Feb 2018 03:03:00 +0000 (03:03 +0000)] 
upstream: unbreak interop test after SSHv1 purge; patch from Colin

Watson via bz#2823

OpenBSD-Regress-ID: 807d30a597756ed6612bdf46dfebca74f49cb31a

7 years agoupstream: Skip sftp-chroot test when SUDO not set instead of
dtucker@openbsd.org [Fri, 9 Feb 2018 03:42:57 +0000 (03:42 +0000)] 
upstream: Skip sftp-chroot test when SUDO not set instead of

fatal().

OpenBSD-Regress-ID: cd4b5f1109b0dc09af4e5ea7d4968c43fbcbde88

7 years agoupstream: Replace fatal with exit in the case that we do not have
dtucker@openbsd.org [Fri, 9 Feb 2018 03:40:22 +0000 (03:40 +0000)] 
upstream: Replace fatal with exit in the case that we do not have

$SUDO set. Prevents test failures when neither sudo nor doas are configured.

OpenBSD-Regress-ID: 6a0464decc4f8ac7d6eded556a032b0fc521bc7b

7 years agoupstream: some helpers to check verbose/quiet mode
djm@openbsd.org [Thu, 8 Feb 2018 08:46:20 +0000 (08:46 +0000)] 
upstream: some helpers to check verbose/quiet mode

OpenBSD-Regress-ID: e736aac39e563f5360a0935080a71d5fdcb976de

7 years agoupstream: Add BindInterface ssh_config directive and -B
djm@openbsd.org [Fri, 23 Feb 2018 02:34:33 +0000 (02:34 +0000)] 
upstream: Add BindInterface ssh_config directive and -B

command-line argument to ssh(1) that directs it to bind its outgoing
connection to the address of the specified network interface.

BindInterface prefers to use addresses that aren't loopback or link-
local, but will fall back to those if no other addresses of the
required family are available on that interface.

Based on patch by Mike Manning in bz#2820, ok dtucker@

OpenBSD-Commit-ID: c5064d285c2851f773dd736a2c342aa384fbf713

7 years agoupstream: emphasise that the hostkey rotation may send key types
djm@openbsd.org [Mon, 19 Feb 2018 00:55:02 +0000 (00:55 +0000)] 
upstream: emphasise that the hostkey rotation may send key types

that the client may not support, and that the client should simply disregard
such keys (this is what ssh does already).

OpenBSD-Commit-ID: 65f8ffbc32ac8d12be8f913d7c0ea55bef8622bf

7 years agoAdd headers for sys/audit.h.
Darren Tucker [Thu, 22 Feb 2018 09:45:09 +0000 (20:45 +1100)] 
Add headers for sys/audit.h.

On some older platforms (at least sunos4, probably others) sys/audit.h
requires some other headers.  Patch from klausz at haus-gisela.de.

7 years agoAdd REGRESSTMP make var override.
Darren Tucker [Mon, 19 Feb 2018 07:37:40 +0000 (18:37 +1100)] 
Add REGRESSTMP make var override.

Defaults to original location ($srcdir/regress) but allows overriding
if desired, eg a directory in /tmp.

7 years agoRemove now-unused check for getrusage.
Darren Tucker [Sun, 18 Feb 2018 04:53:15 +0000 (15:53 +1100)] 
Remove now-unused check for getrusage.

getrusage was used in ssh-rand-helper but that's now long gone.
Patch from klauszh at haus-gisela.de.

7 years agoupstream: Don't send IUTF8 to servers that don't like them.
dtucker@openbsd.org [Fri, 16 Feb 2018 04:43:11 +0000 (04:43 +0000)] 
upstream: Don't send IUTF8 to servers that don't like them.

Some SSH servers eg "ConfD" drop the connection if the client sends the
new IUTF8 (RFC8160) terminal mode even if it's not set.  Add a bug bit
for such servers and avoid sending IUTF8 to them.  ok djm@

OpenBSD-Commit-ID: 26425855402d870c3c0a90491e72e2a8a342ceda

7 years agofreezero should check for NULL.
Darren Tucker [Fri, 16 Feb 2018 06:32:28 +0000 (17:32 +1100)] 
freezero should check for NULL.

7 years agoupstream: Mention recent DH KEX methods:
djm@openbsd.org [Fri, 16 Feb 2018 02:40:45 +0000 (02:40 +0000)] 
upstream: Mention recent DH KEX methods:

diffie-hellman-group14-sha256
diffie-hellman-group16-sha512
diffie-hellman-group18-sha512

From Jakub Jelen via bz#2826

OpenBSD-Commit-ID: 51bf769f06e55447f4bfa7306949e62d2401907a

7 years agoupstream: stop loading DSA keys by default, remove sshd_config
djm@openbsd.org [Fri, 16 Feb 2018 02:32:40 +0000 (02:32 +0000)] 
upstream: stop loading DSA keys by default, remove sshd_config

stanza and manpage bits; from Colin Watson via bz#2662, ok dtucker@

OpenBSD-Commit-ID: d33a849f481684ff655c140f5eb1b4acda8c5c09

7 years agoupstream: Ensure that D mod (P-1) and D mod (Q-1) are calculated in
jsing@openbsd.org [Wed, 14 Feb 2018 16:27:24 +0000 (16:27 +0000)] 
upstream: Ensure that D mod (P-1) and D mod (Q-1) are calculated in

constant time.

This avoids a potential side channel timing leak.

ok djm@ markus@

OpenBSD-Commit-ID: 71ff3c16be03290e63d8edab8fac053d8a82968c

7 years agoupstream: Some obvious freezero() conversions.
jsing@openbsd.org [Wed, 14 Feb 2018 16:03:32 +0000 (16:03 +0000)] 
upstream: Some obvious freezero() conversions.

This also zeros an ed25519_pk when it was not being zeroed previously.

ok djm@ dtucker@

OpenBSD-Commit-ID: 5c196a3c85c23ac0bd9b11bcadaedd90b7a2ce82

7 years agoRemove execute bit from modpipe.c.
Darren Tucker [Thu, 15 Feb 2018 11:32:04 +0000 (22:32 +1100)] 
Remove execute bit from modpipe.c.

7 years agoUpdate prngd link to point to sourceforge.
Darren Tucker [Thu, 15 Feb 2018 11:26:16 +0000 (22:26 +1100)] 
Update prngd link to point to sourceforge.

7 years agoRemove references to UNICOS.
Darren Tucker [Thu, 15 Feb 2018 11:22:38 +0000 (22:22 +1100)] 
Remove references to UNICOS.

7 years agoRemove extra newline.
Darren Tucker [Thu, 15 Feb 2018 11:18:37 +0000 (22:18 +1100)] 
Remove extra newline.

7 years agoOpenSSH's builtin entropy gathering is long gone.
Darren Tucker [Thu, 15 Feb 2018 11:16:54 +0000 (22:16 +1100)] 
OpenSSH's builtin entropy gathering is long gone.

7 years agoReplace remaining mysignal() with signal().
Darren Tucker [Thu, 15 Feb 2018 10:43:01 +0000 (21:43 +1100)] 
Replace remaining mysignal() with signal().

These seem to have been missed during the replacement of mysignal
with #define signal in commit 5ade9ab.  Both include the requisite
headers to pick up the #define.

7 years agoRemove remaining now-obsolete cvs $Ids.
Darren Tucker [Thu, 15 Feb 2018 09:06:19 +0000 (20:06 +1100)] 
Remove remaining now-obsolete cvs $Ids.

7 years agoRegenerate dependencies after UNICOS removal.
Darren Tucker [Thu, 15 Feb 2018 06:01:54 +0000 (17:01 +1100)] 
Regenerate dependencies after UNICOS removal.

7 years agoRemove UNICOS support.
Darren Tucker [Mon, 12 Feb 2018 22:10:46 +0000 (09:10 +1100)] 
Remove UNICOS support.

The code required to support it is quite invasive to the mainline
code that is synced with upstream and is an ongoing maintenance burden.
Both the hardware and software are literal museum pieces these days and
we could not find anyone still running OpenSSH on one.

7 years agoRetpoline linker flag only needed for linking.
Darren Tucker [Tue, 13 Feb 2018 07:12:47 +0000 (18:12 +1100)] 
Retpoline linker flag only needed for linking.

7 years agoDefault PidFile is sshd.pid not ssh.pid.
Darren Tucker [Tue, 13 Feb 2018 06:36:43 +0000 (17:36 +1100)] 
Default PidFile is sshd.pid not ssh.pid.

7 years agoRemove assigned-to-but-never-used variable.
Darren Tucker [Tue, 13 Feb 2018 05:27:09 +0000 (16:27 +1100)] 
Remove assigned-to-but-never-used variable.

'p' was removed in previous change but I neglected to remove the
otherwise-unused assignment to it.

7 years agoupstream: remove space before tab
djm@openbsd.org [Tue, 13 Feb 2018 03:36:56 +0000 (03:36 +0000)] 
upstream: remove space before tab

OpenBSD-Commit-ID: 674edd214d0a7332dd4623c9cf8117301b012890

7 years agoupstream Don't reset signal handlers inside handlers.
dtucker@openbsd.org [Sun, 11 Feb 2018 21:16:56 +0000 (21:16 +0000)] 
upstream Don't reset signal handlers inside handlers.

The signal handlers from the original ssh1 code on which OpenSSH
is based assume unreliable signals and reinstall their handlers.
Since OpenBSD (and pretty much every current system) has reliable
signals this is not needed.  In the unlikely even that -portable
is still being used on such systems we will deal with it in the
compat layer.  ok deraadt@

OpenBSD-Commit-ID: f53a1015cb6908431b92116130d285d71589612c

7 years agoWhitespace sync with upstream.
Darren Tucker [Mon, 12 Feb 2018 22:07:29 +0000 (09:07 +1100)] 
Whitespace sync with upstream.

7 years agoWhitespace sync with upstream.
Darren Tucker [Mon, 12 Feb 2018 21:25:46 +0000 (08:25 +1100)] 
Whitespace sync with upstream.

7 years agoMove signal compat code into bsd-signal.{c,h}
Darren Tucker [Sun, 11 Feb 2018 08:25:11 +0000 (21:25 +1300)] 
Move signal compat code into bsd-signal.{c,h}

7 years agoInclude headers for linux/if.h.
Darren Tucker [Sun, 11 Feb 2018 08:20:39 +0000 (21:20 +1300)] 
Include headers for linux/if.h.

Prevents configure-time "present but cannot be compiled" warning.

7 years agoFix test for -z,retpolineplt linker flag.
Darren Tucker [Sun, 11 Feb 2018 06:45:47 +0000 (19:45 +1300)] 
Fix test for -z,retpolineplt linker flag.

7 years agoAdd checks for Spectre v2 mitigation (retpoline)
Darren Tucker [Sat, 10 Feb 2018 22:32:37 +0000 (09:32 +1100)] 
Add checks for Spectre v2 mitigation (retpoline)

This adds checks for gcc and clang flags for mitigations for Spectre
variant 2, ie "retpoline".  It'll automatically enabled if the compiler
supports it as part of toolchain hardening flag.  ok djm@

7 years agoupstream commit
djm@openbsd.org [Sat, 10 Feb 2018 09:25:34 +0000 (09:25 +0000)] 
upstream commit

constify some private key-related functions; based on
https://github.com/openssh/openssh-portable/pull/56 by Vincent Brillault

OpenBSD-Commit-ID: dcb94a41834a15f4d00275cb5051616fdc4c988c

7 years agoupstream commit
djm@openbsd.org [Sat, 10 Feb 2018 09:03:54 +0000 (09:03 +0000)] 
upstream commit

Mention ServerAliveTimeout in context of TCPKeepAlives;
prompted by Christoph Anton Mitterer via github

OpenBSD-Commit-ID: f0cf1b5bd3f1fbf41d71c88d75d93afc1c880ca2

7 years agoupstream commit
djm@openbsd.org [Sat, 10 Feb 2018 06:54:38 +0000 (06:54 +0000)] 
upstream commit

clarify IgnoreUserKnownHosts; based on github PR from
Christoph Anton Mitterer.

OpenBSD-Commit-ID: 4fff2c17620c342fb2f1f9c2d2e679aab3e589c3

7 years agoupstream commit
djm@openbsd.org [Sat, 10 Feb 2018 06:40:28 +0000 (06:40 +0000)] 
upstream commit

Shorter, more accurate explanation of
NoHostAuthenticationForLocalhost without the confusing example. Prompted by
Christoph Anton Mitterer via github and bz#2293.

OpenBSD-Commit-ID: 19dc96bea25b80d78d416b581fb8506f1e7b76df

7 years agoupstream commit
djm@openbsd.org [Sat, 10 Feb 2018 06:15:12 +0000 (06:15 +0000)] 
upstream commit

Disable RemoteCommand and RequestTTY in the ssh session
started by scp. sftp is already doing this. From Camden Narzt via github; ok
dtucker

OpenBSD-Commit-ID: 59e2611141c0b2ee579c6866e8eb9d7d8217bc6b

7 years agoupstream commit
djm@openbsd.org [Sat, 10 Feb 2018 05:48:46 +0000 (05:48 +0000)] 
upstream commit

Refuse to create a certificate with an unusable number of
principals; Prompted by gdestuynder via github

OpenBSD-Commit-ID: 8cfae2451e8f07810e3e2546dfdcce66984cbd29

7 years agoupstream commit
djm@openbsd.org [Sat, 10 Feb 2018 05:43:26 +0000 (05:43 +0000)] 
upstream commit

fatal if we're unable to write all the public key; previously
we would silently ignore errors writing the comment and terminating newline.
Prompted by github PR from WillerZ; ok dtucker

OpenBSD-Commit-ID: 18fbfcfd4e8c6adbc84820039b64d70906e49831

7 years agoAdd changelog entry for binary strip change.
Darren Tucker [Sat, 10 Feb 2018 00:18:38 +0000 (11:18 +1100)] 
Add changelog entry for binary strip change.

7 years agoRemove unused variables.
Darren Tucker [Sat, 10 Feb 2018 00:14:54 +0000 (11:14 +1100)] 
Remove unused variables.

7 years agoDon't strip binaries so debuginfo gets built.
Darren Tucker [Sat, 10 Feb 2018 00:12:45 +0000 (11:12 +1100)] 
Don't strip binaries so debuginfo gets built.

Tell install not to strip binaries during package creation so that the
debuginfo package can be built.

7 years agoFix bogus dates in changelog.
Darren Tucker [Fri, 9 Feb 2018 23:33:11 +0000 (10:33 +1100)] 
Fix bogus dates in changelog.

7 years agoRemove SSH1 from description.
Darren Tucker [Fri, 9 Feb 2018 23:25:15 +0000 (10:25 +1100)] 
Remove SSH1 from description.

7 years agoAdd support for compat-openssl10 build dep.
Darren Tucker [Fri, 9 Feb 2018 23:19:16 +0000 (10:19 +1100)] 
Add support for compat-openssl10 build dep.

7 years agoAdd leading zero so it'll work when rhel not set.
Darren Tucker [Fri, 9 Feb 2018 22:57:04 +0000 (09:57 +1100)] 
Add leading zero so it'll work when rhel not set.

When rhel is not set it will error out with "bad if". Add leading zero
as per https://fedoraproject.org/wiki/Packaging:DistTag so it'll work
on non-RHEL.

7 years agoUpdate openssl-devel dependency.
Darren Tucker [Fri, 9 Feb 2018 22:56:34 +0000 (09:56 +1100)] 
Update openssl-devel dependency.

7 years agoAdd mandir with-mandir' for RHEL 5 compatibility.
nkadel [Sun, 16 Nov 2014 23:19:58 +0000 (18:19 -0500)] 
Add mandir with-mandir' for RHEL 5 compatibility.

Activate '--mandir' and '--with-mandir' settings in setup for RHEL
5 compatibility.

7 years agoDiscard 'K5DIR' reporting.
nkadel [Sun, 16 Nov 2014 23:18:51 +0000 (18:18 -0500)] 
Discard 'K5DIR' reporting.

It does not work inside 'mock' build environment.

7 years agoAdd 'dist' to 'rel' for OS specific RPM names.
nkadel [Sun, 16 Nov 2014 23:17:15 +0000 (18:17 -0500)] 
Add 'dist' to 'rel' for OS specific RPM names.

7 years agoAdd openssh-devel >= 0.9.8f for redhat spec file.
nkadel [Sun, 16 Nov 2014 19:17:38 +0000 (14:17 -0500)] 
Add openssh-devel >= 0.9.8f for redhat spec file.

7 years agoEnhance BuildRequires for openssh-x11-askpass.
nkadel [Sun, 16 Nov 2014 18:10:24 +0000 (13:10 -0500)] 
Enhance BuildRequires for openssh-x11-askpass.

7 years agoAlways include x11-ssh-askpass SRPM.
nkadel [Sun, 16 Nov 2014 18:04:14 +0000 (13:04 -0500)] 
Always include x11-ssh-askpass SRPM.

Always include x11-ssh-askpass tarball in redhat SRPM, even if unused.

7 years agothis is long unused; prompted by dtucker@
Damien Miller [Fri, 9 Feb 2018 22:43:12 +0000 (09:43 +1100)] 
this is long unused; prompted by dtucker@

7 years agoupstream commit
dtucker@openbsd.org [Fri, 9 Feb 2018 02:37:36 +0000 (02:37 +0000)] 
upstream commit

Remove unused sKerberosTgtPassing from enum.  From
calestyo via github pull req #11, ok djm@

OpenBSD-Commit-ID: 1008f8870865a7c4968b7aed402a0a9e3e5b9540

7 years agoupstream commit
dtucker@openbsd.org [Thu, 8 Feb 2018 04:12:32 +0000 (04:12 +0000)] 
upstream commit

Rename struct umac_ctx to umac128_ctx too.  In portable
some linkers complain about two symbols with the same name having differing
sizes.  ok djm@

OpenBSD-Commit-ID: cbebf8bdd3310a9795b4939a1e112cfe24061ca3

7 years agoupstream commit
dtucker@openbsd.org [Wed, 7 Feb 2018 22:52:45 +0000 (22:52 +0000)] 
upstream commit

ssh_free checks for and handles NULL args, remove NULL
checks from remaining callers.  ok djm@

OpenBSD-Commit-ID: bb926825c53724c069df68a93a2597f9192f7e7b

7 years agoSet SO_REUSEADDR in regression test netcat.
Darren Tucker [Thu, 8 Feb 2018 01:36:22 +0000 (12:36 +1100)] 
Set SO_REUSEADDR in regression test netcat.

Sometimes multiplex tests fail on Solaris with "netcat: local_listen:
Address already in use" which is likely due to previous invocations
leaving the port in TIME_WAIT.  Set SO_REUSEADDR (in addition to
SO_REUSEPORT which is alread set on platforms that support it).  ok djm@

7 years agoupstream commit
jsing@openbsd.org [Wed, 7 Feb 2018 05:17:56 +0000 (05:17 +0000)] 
upstream commit

Convert some explicit_bzero()/free() calls to freezero().

ok deraadt@ dtucker@

OpenBSD-Commit-ID: f566ab99149650ebe58b1d4b946ea726c3829609

7 years agoupstream commit
jsing@openbsd.org [Wed, 7 Feb 2018 05:15:49 +0000 (05:15 +0000)] 
upstream commit

Remove some #ifdef notyet code from OpenSSL 0.9.8 days.

These functions have never appeared in OpenSSL and are likely never to do
so.

"kill it with fire" djm@

OpenBSD-Commit-ID: fee9560e283fd836efc2631ef381658cc673d23e

7 years agoupstream commit
jsing@openbsd.org [Wed, 7 Feb 2018 02:06:50 +0000 (02:06 +0000)] 
upstream commit

Remove all guards for calls to OpenSSL free functions -
all of these functions handle NULL, from at least OpenSSL 1.0.1g onwards.

Prompted by dtucker@ asking about guards for RSA_free(), when looking at
openssh-portable pr#84 on github.

ok deraadt@ dtucker@

OpenBSD-Commit-ID: 954f1c51b94297d0ae1f749271e184141e0cadae

7 years agoRemove obsolete "Smartcard support" message
Darren Tucker [Tue, 6 Feb 2018 22:19:38 +0000 (09:19 +1100)] 
Remove obsolete "Smartcard support" message

The configure checks that populated $SCARD_MSG were removed in commits
7ea845e4 and d8f60022 when the smartcard support was replaced with
PKCS#11.

7 years agoupstream commit
dtucker@openbsd.org [Tue, 6 Feb 2018 06:01:54 +0000 (06:01 +0000)] 
upstream commit

Replace "trojan horse" with the correct term (MITM).
From maikel at predikkta.com via bz#2822, ok markus@

OpenBSD-Commit-ID: e86ac64c512057c89edfadb43302ac0aa81a6c53

7 years agoupstream commit
tb@openbsd.org [Mon, 5 Feb 2018 05:37:46 +0000 (05:37 +0000)] 
upstream commit

Add a couple of non-negativity checks to avoid close(-1).

ok djm

OpenBSD-Commit-ID: 4701ce0b37161c891c838d0931305f1d37a50880

7 years agoupstream commit
tb@openbsd.org [Mon, 5 Feb 2018 05:36:49 +0000 (05:36 +0000)] 
upstream commit

The file descriptors for socket, stdin, stdout and stderr
aren't necessarily distinct, so check if they are the same to avoid closing
the same fd several times.

ok djm

OpenBSD-Commit-ID: 60d71fd22e9a32f5639d4ba6e25a2f417fc36ac1

7 years agoupstream commit
djm@openbsd.org [Mon, 5 Feb 2018 04:02:53 +0000 (04:02 +0000)] 
upstream commit

I accidentially a word

OpenBSD-Commit-ID: 4547ee713fa941da861e83ae7a3e6432f915e14a

7 years agoupstream commit
djm@openbsd.org [Thu, 25 Jan 2018 03:34:43 +0000 (03:34 +0000)] 
upstream commit

certificate options are case-sensitive; fix case on one
that had it wrong.

move a badly-place sentence to a less bad place

OpenBSD-Commit-ID: 231e516bba860699a1eece6d48532d825f5f747b

7 years agocrypto_api.h needs includes.h
Damien Miller [Wed, 24 Jan 2018 01:20:44 +0000 (12:20 +1100)] 
crypto_api.h needs includes.h

7 years agoupstream commit
stsp@openbsd.org [Tue, 23 Jan 2018 20:00:58 +0000 (20:00 +0000)] 
upstream commit

Fix a logic bug in sshd_exchange_identification which
prevented clients using major protocol version 2 from connecting to the
server. ok millert@

OpenBSD-Commit-ID: 8668dec04586e27f1c0eb039ef1feb93d80a5ee9

7 years agoupstream commit
stsp@openbsd.org [Tue, 23 Jan 2018 18:33:49 +0000 (18:33 +0000)] 
upstream commit

Add missing braces; fixes 'write: Socket is not
connected' error in ssh. ok deraadt@

OpenBSD-Commit-ID: db73a3a9e147722d410866cac34d43ed52e1ad24

7 years agorebuild depends
Damien Miller [Tue, 23 Jan 2018 05:49:43 +0000 (16:49 +1100)] 
rebuild depends

7 years agoone SSH_BUG_BANNER instance that got away
Damien Miller [Tue, 23 Jan 2018 05:49:22 +0000 (16:49 +1100)] 
one SSH_BUG_BANNER instance that got away

7 years agoupstream commit
djm@openbsd.org [Tue, 23 Jan 2018 05:27:21 +0000 (05:27 +0000)] 
upstream commit

Drop compatibility hacks for some ancient SSH
implementations, including ssh.com <=2.* and OpenSSH <= 3.*.

These versions were all released in or before 2001 and predate the
final SSH RFCs. The hacks in question aren't necessary for RFC-
compliant SSH implementations.

ok markus@

OpenBSD-Commit-ID: 4be81c67db57647f907f4e881fb9341448606138

7 years agoupstream commit
djm@openbsd.org [Tue, 23 Jan 2018 05:17:04 +0000 (05:17 +0000)] 
upstream commit

try harder to preserve errno during
ssh_connect_direct() to make the final error message possibly accurate;
bz#2814, ok dtucker@

OpenBSD-Commit-ID: 57de882cb47381c319b04499fef845dd0c2b46ca

7 years agoupstream commit
djm@openbsd.org [Tue, 23 Jan 2018 05:12:12 +0000 (05:12 +0000)] 
upstream commit

unbreak support for clients that advertise a protocol
version of "1.99" (indicating both v2 and v1 support). Busted by me during
SSHv1 purge in r1.358; bz2810, ok dtucker

OpenBSD-Commit-ID: e8f9c2bee11afc16c872bb79d6abe9c555bd0e4b

7 years agoupstream commit
djm@openbsd.org [Tue, 23 Jan 2018 05:06:25 +0000 (05:06 +0000)] 
upstream commit

don't attempt to force hostnames that are addresses to
lowercase, but instead canonicalise them through getnameinfo/getaddrinfo to
remove ambiguities (e.g. ::0001 => ::1) before they are matched against
known_hosts; bz#2763, ok dtucker@

OpenBSD-Commit-ID: ba0863ff087e61e5c65efdbe53be3cb92c9aefa0