]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
7 years agoupstream: relax checking of authorized_keys environment="..." V_7_7 anongit/V_7_7 github-selfhosted/V_7_7 github/V_7_7
djm@openbsd.org [Fri, 6 Apr 2018 04:15:45 +0000 (04:15 +0000)] 
upstream: relax checking of authorized_keys environment="..."

options to allow underscores in variable names (regression introduced in
7.7). bz2851, ok deraadt@

OpenBSD-Commit-ID: 69690ffe0c97ff393f2c76d25b4b3d2ed4e4ac9c

7 years agoupstream: Do not ban PTY allocation when a sshd session is restricted
djm@openbsd.org [Fri, 25 May 2018 07:11:01 +0000 (07:11 +0000)] 
upstream: Do not ban PTY allocation when a sshd session is restricted

because the user password is expired as it breaks password change dialog.

regression in openssh-7.7 reported by Daniel Wagner

OpenBSD-Commit-ID: 9fc09c584c6f1964b00595e3abe7f83db4d90d73

7 years agoUse includes.h instead of config.h.
Darren Tucker [Sun, 29 Apr 2018 07:54:12 +0000 (17:54 +1000)] 
Use includes.h instead of config.h.

This ensures it picks up the definition of DEF_WEAK, the lack of which
can cause compile errors in some cases (eg modern AIX).  From
michael at felt.demon.nl.

7 years agoOmit 3des-cbc if OpenSSL built without DES.
Darren Tucker [Wed, 18 Apr 2018 23:53:14 +0000 (09:53 +1000)] 
Omit 3des-cbc if OpenSSL built without DES.

Patch from hongxu.jia at windriver.com, ok djm@

7 years agoupstream: Disable SSH2_MSG_DEBUG messages for Twisted Conch clients
djm@openbsd.org [Mon, 16 Apr 2018 22:50:44 +0000 (22:50 +0000)] 
upstream: Disable SSH2_MSG_DEBUG messages for Twisted Conch clients

without version numbers since they choke on them under some circumstances.
https://twistedmatrix.com/trac/ticket/9422 via Colin Watson

Newer Conch versions have a version number in their ident string and
handle debug messages okay. https://twistedmatrix.com/trac/ticket/9424

OpenBSD-Commit-ID: 6cf7be262af0419c58ddae11324d9c0dc1577539

7 years agoupstream: don't free the %C expansion, it's used later for
djm@openbsd.org [Sat, 14 Apr 2018 21:50:41 +0000 (21:50 +0000)] 
upstream: don't free the %C expansion, it's used later for

LocalCommand

OpenBSD-Commit-ID: 857b5cb37b2d856bfdfce61289a415257a487fb1

7 years agoUsing "==" in shell tests is not portable.
Darren Tucker [Fri, 13 Apr 2018 03:43:55 +0000 (13:43 +1000)] 
Using "==" in shell tests is not portable.

Patch from rsbecker at nexbridge.com.

7 years agoupstream: don't kill ssh-agent's listening socket entriely if we
djm@openbsd.org [Mon, 9 Apr 2018 23:54:49 +0000 (23:54 +0000)] 
upstream: don't kill ssh-agent's listening socket entriely if we

fail to accept a connection; bz#2837, patch from Lukas Kuster

OpenBSD-Commit-ID: 52413f5069179bebf30d38f524afe1a2133c738f

7 years agoFix tunnel forwarding broken in 7.7p1
Damien Miller [Fri, 13 Apr 2018 03:38:06 +0000 (13:38 +1000)] 
Fix tunnel forwarding broken in 7.7p1

bz2855, ok dtucker@

7 years agoRevert $REGRESSTMP changes.
Darren Tucker [Fri, 13 Apr 2018 03:13:33 +0000 (13:13 +1000)] 
Revert $REGRESSTMP changes.

Revert 3fd2d229 and subsequent changes as they turned out to be a
portability hassle.

7 years agoupdate versions in .spec files V_7_7_P1
Damien Miller [Mon, 2 Apr 2018 05:38:28 +0000 (15:38 +1000)] 
update versions in .spec files

7 years agoupdate version number
Damien Miller [Mon, 2 Apr 2018 05:38:20 +0000 (15:38 +1000)] 
update version number

7 years agoDisable native strndup and strnlen on AIX.
Darren Tucker [Fri, 30 Mar 2018 07:23:07 +0000 (18:23 +1100)] 
Disable native strndup and strnlen on AIX.

On at least some revisions of AIX, strndup returns unterminated strings
under some conditions, apparently because strnlen returns incorrect
values in those cases.  Disable both on AIX and use the replacements
from openbsd-compat.  Fixes problem with ECDSA keys there, ok djm.

7 years agoInclude ssh_api.h for struct ssh.
Darren Tucker [Mon, 26 Mar 2018 02:12:44 +0000 (13:12 +1100)] 
Include ssh_api.h for struct ssh.

struct ssh is needed by implementations of sys_auth_passwd() that were
converted in commit bba02a50.  Needed to fix build on AIX, I assume for
the other platforms too (although it should be harmless if not needed).

7 years agoRemove UNICOS code missed during removal.
Darren Tucker [Mon, 26 Mar 2018 01:58:09 +0000 (12:58 +1100)] 
Remove UNICOS code missed during removal.

Fixes compile error on AIX.

7 years agoupstream: openssh-7.7
markus@openbsd.org [Sat, 24 Mar 2018 19:29:03 +0000 (19:29 +0000)] 
upstream: openssh-7.7

OpenBSD-Commit-ID: 274e614352460b9802c905f38fb5ea7ed5db3d41

7 years agoRemove authinfo.sh test dependency on printenv
Damien Miller [Sun, 25 Mar 2018 22:37:02 +0000 (09:37 +1100)] 
Remove authinfo.sh test dependency on printenv

Some platforms lack printenv in the default $PATH.
Reported by Tom G. Christensen

7 years ago Use libiaf on all sysv5 systems
Tim Rice [Sun, 25 Mar 2018 17:00:21 +0000 (10:00 -0700)] 
Use libiaf on all sysv5 systems

7 years ago modified: auth-sia.c
Tim Rice [Sun, 25 Mar 2018 16:17:33 +0000 (09:17 -0700)] 
modified:   auth-sia.c
modified:   openbsd-compat/port-aix.c
modified:   openbsd-compat/port-uw.c

propogate changes to auth-passwd.c in commit
7c856857607112a3dfe6414696bf4c7ab7fb0cb3 to other providers
of sys_auth_passwd()

7 years agoupstream: openssh-7.7
markus@openbsd.org [Sat, 24 Mar 2018 19:29:03 +0000 (19:29 +0000)] 
upstream: openssh-7.7

OpenBSD-Commit-ID: 274e614352460b9802c905f38fb5ea7ed5db3d41

7 years agoupstream: fix bogus warning when signing cert keys using agent;
markus@openbsd.org [Sat, 24 Mar 2018 19:28:43 +0000 (19:28 +0000)] 
upstream: fix bogus warning when signing cert keys using agent;

from djm; ok deraadt dtucker

OpenBSD-Commit-ID: 12e50836ba2040042383a8b71e12d7ea06e9633d

7 years agoReplace /dev/stdin with "-".
Darren Tucker [Sat, 24 Mar 2018 22:40:46 +0000 (09:40 +1100)] 
Replace /dev/stdin with "-".

For some reason sftp -b doesn't work with /dev/stdin on Cygwin, as noted
and suggested by vinschen at redhat.com.

7 years agoProvide $OBJ to paths in PuTTY interop tests.
Darren Tucker [Fri, 23 Mar 2018 02:21:14 +0000 (13:21 +1100)] 
Provide $OBJ to paths in PuTTY interop tests.

7 years agoupstream: Tell puttygen to use /dev/urandom instead of /dev/random. On
dtucker@openbsd.org [Fri, 16 Mar 2018 09:06:31 +0000 (09:06 +0000)] 
upstream: Tell puttygen to use /dev/urandom instead of /dev/random. On

OpenBSD they are both non-blocking, but on many other -portable platforms it
blocks, stalling tests.

OpenBSD-Regress-ID: 397d0d4c719c353f24d79f5b14775e0cfdf0e1cc

7 years agoupstream: ssh/xmss: fix build; ok djm@
markus@openbsd.org [Thu, 22 Mar 2018 07:06:11 +0000 (07:06 +0000)] 
upstream: ssh/xmss: fix build; ok djm@

OpenBSD-Commit-ID: c9374ca41d4497f1c673ab681cc33f6e7c5dd186

7 years agoupstream: ssh/xmss: fix deserialize for certs; ok djm@
markus@openbsd.org [Thu, 22 Mar 2018 07:05:48 +0000 (07:05 +0000)] 
upstream: ssh/xmss: fix deserialize for certs; ok djm@

OpenBSD-Commit-ID: f44c41636c16ec83502039828beaf521c057dddc

7 years agoSave $? before case statement.
Darren Tucker [Thu, 22 Mar 2018 06:00:28 +0000 (17:00 +1100)] 
Save $? before case statement.

In some shells (FreeBSD 9, ash) the case statement resets $?, so save
for later testing.

7 years agoupstream: rename recently-added "valid-before" key restriction to
djm@openbsd.org [Wed, 14 Mar 2018 05:35:40 +0000 (05:35 +0000)] 
upstream: rename recently-added "valid-before" key restriction to

"expiry-time" as the former is confusing wrt similar terminology in X.509;
pointed out by jsing@

OpenBSD-Regress-ID: ac8b41dbfd90cffd525d58350c327195b0937793

7 years agoupstream: check valid-before option in authorized_keys
djm@openbsd.org [Mon, 12 Mar 2018 00:56:03 +0000 (00:56 +0000)] 
upstream: check valid-before option in authorized_keys

OpenBSD-Regress-ID: 7e1e4a84f7f099a290e5a4cbf4196f90ff2d7e11

7 years agoupstream: explicitly specify RSA/SHA-2 keytype here too
djm@openbsd.org [Mon, 12 Mar 2018 00:54:04 +0000 (00:54 +0000)] 
upstream: explicitly specify RSA/SHA-2 keytype here too

OpenBSD-Regress-ID: 74d7b24e8c72c27af6b481198344eb077e993a62

7 years agoupstream: exlicitly include RSA/SHA-2 keytypes in
djm@openbsd.org [Mon, 12 Mar 2018 00:52:57 +0000 (00:52 +0000)] 
upstream: exlicitly include RSA/SHA-2 keytypes in

PubkeyAcceptedKeyTypes here

OpenBSD-Regress-ID: 954d19e0032a74e31697fb1dc7e7d3d1b2d65fe9

7 years agoupstream: sort expiry-time;
jmc@openbsd.org [Wed, 14 Mar 2018 06:56:20 +0000 (06:56 +0000)] 
upstream: sort expiry-time;

OpenBSD-Commit-ID: 8c7d82ee1e63e26ceb2b3d3a16514019f984f6bf

7 years agoupstream: rename recently-added "valid-before" key restriction to
djm@openbsd.org [Wed, 14 Mar 2018 05:35:40 +0000 (05:35 +0000)] 
upstream: rename recently-added "valid-before" key restriction to

"expiry-time" as the former is confusing wrt similar terminology in X.509;
pointed out by jsing@

OpenBSD-Commit-ID: 376939466a1f562f3950a22314bc6505733aaae6

7 years agoupstream: add valid-before="[time]" authorized_keys option. A
djm@openbsd.org [Mon, 12 Mar 2018 00:52:01 +0000 (00:52 +0000)] 
upstream: add valid-before="[time]" authorized_keys option. A

simple way of giving a key an expiry date. ok markus@

OpenBSD-Commit-ID: 1793b4dd5184fa87f42ed33c7b0f4f02bc877947

7 years agoAdd AC_LANG_PROGRAM to AC_COMPILE_IFELSE.
Darren Tucker [Mon, 12 Mar 2018 08:17:26 +0000 (19:17 +1100)] 
Add AC_LANG_PROGRAM to AC_COMPILE_IFELSE.

The recently added MIPS ABI tests need AC_LANG_PROGRAM to prevent
warnings from autoconf.  Pointed out by klausz at haus-gisela.de.

7 years agoupstream: revert recent strdelim() change, it causes problems with
djm@openbsd.org [Wed, 7 Mar 2018 23:53:08 +0000 (23:53 +0000)] 
upstream: revert recent strdelim() change, it causes problems with

some configs.

revision 1.124
date: 2018/03/02 03:02:11;  author: djm;  state: Exp;  lines: +19 -8;  commitid: nNRsCijZiGG6SUTT;
Allow escaped quotes \" and \' in ssh_config and sshd_config quotes
option strings. bz#1596 ok markus@

OpenBSD-Commit-ID: 59c40b1b81206d713c06b49d8477402c86babda5

7 years agoupstream: move the input format details to -f; remove the output
jmc@openbsd.org [Mon, 5 Mar 2018 07:03:18 +0000 (07:03 +0000)] 
upstream: move the input format details to -f; remove the output

format details and point to sshd(8), where it is documented;

ok dtucker

OpenBSD-Commit-ID: 95f17e47dae02a6ac7329708c8c893d4cad0004a

7 years agoconfigure.ac: properly set seccomp_audit_arch for MIPS64
Vicente Olivert Riera [Tue, 20 Jun 2017 15:42:28 +0000 (16:42 +0100)] 
configure.ac: properly set seccomp_audit_arch for MIPS64

Currently seccomp_audit_arch is set to AUDIT_ARCH_MIPS64 or
AUDIT_ARCH_MIPSEL64 (depending on the endinness) when openssh is built
for MIPS64. However, that's only valid for n64 ABI. The right macros for
n32 ABI defined in seccomp.h are AUDIT_ARCH_MIPS64N32 and
AUDIT_ARCH_MIPSEL64N32, for big and little endian respectively.

Because of that an sshd built for MIPS64 n32 rejects connection attempts
and the output of strace reveals that the problem is related to seccomp
audit:

[pid   194] prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=57,
filter=0x555d5da0}) = 0
[pid   194] write(7, "\0\0\0]\0\0\0\5\0\0\0Ulist_hostkey_types: "..., 97) = ?
[pid   193] <... poll resumed> )        = 2 ([{fd=5, revents=POLLIN|POLLHUP},
{fd=6, revents=POLLHUP}])
[pid   194] +++ killed by SIGSYS +++

This patch fixes that problem by setting the right value to
seccomp_audit_arch taking into account the MIPS64 ABI.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
7 years agoconfigure.ac: detect MIPS ABI
Vicente Olivert Riera [Tue, 20 Jun 2017 15:42:11 +0000 (16:42 +0100)] 
configure.ac: detect MIPS ABI

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
7 years agoUse https URLs for links that support it.
Alan Yee [Wed, 7 Mar 2018 23:12:14 +0000 (15:12 -0800)] 
Use https URLs for links that support it.

7 years agoDisable UTMPX on SunOS4.
Darren Tucker [Mon, 5 Mar 2018 09:03:07 +0000 (20:03 +1100)] 
Disable UTMPX on SunOS4.

7 years agoCheck for and work around buggy fflush(NULL).
Darren Tucker [Mon, 5 Mar 2018 08:28:08 +0000 (19:28 +1100)] 
Check for and work around buggy fflush(NULL).

Some really old platforms (eg SunOS4) segfault on fflush(NULL) so check
for and work around.  With klausz at haus-gisela.de.

7 years agoRemove extra XMSS #endif
Darren Tucker [Sun, 4 Mar 2018 23:22:32 +0000 (10:22 +1100)] 
Remove extra XMSS #endif

Extra #endif breaks compile with -DWITH_XMSS.  Pointed out by Jack
Schmidt via github.

7 years agoupstream: Update RSA minimum modulus size to 1024. sshkey.h rev 1.18
dtucker@openbsd.org [Sat, 3 Mar 2018 06:37:53 +0000 (06:37 +0000)] 
upstream: Update RSA minimum modulus size to 1024. sshkey.h rev 1.18

bumped the minimum from 768 to 1024, update man page accordingly.

OpenBSD-Commit-ID: 27563ab4e866cd2aac40a5247876f6787c08a338

7 years agoupstream: for the pty control tests, just check that the PTY path
djm@openbsd.org [Sun, 4 Mar 2018 01:46:48 +0000 (01:46 +0000)] 
upstream: for the pty control tests, just check that the PTY path

points to something in /dev (rather than checking the device node itself);
makes life easier for portable, where systems with dynamic ptys can delete
nodes before we get around to testing their existence.

OpenBSD-Regress-ID: b1e455b821e62572bccd98102f8dd9d09bb94994

7 years agoUpdate PAM password change to new opts API.
Darren Tucker [Sat, 3 Mar 2018 05:21:20 +0000 (16:21 +1100)] 
Update PAM password change to new opts API.

7 years agoAdd strndup for platforms that need it.
Darren Tucker [Sat, 3 Mar 2018 03:56:09 +0000 (14:56 +1100)] 
Add strndup for platforms that need it.

Some platforms don't have strndup, which includes Solaris 10, NetBSD 3
and FreeBSD 6.

7 years agoFlatten and alphabetize object file lists.
Darren Tucker [Sat, 3 Mar 2018 03:49:07 +0000 (14:49 +1100)] 
Flatten and alphabetize object file lists.

This will make maintenance and changes easier.  "no objection" tim@

7 years agoupstream: unit tests for new authorized_keys options API
djm@openbsd.org [Sat, 3 Mar 2018 03:16:17 +0000 (03:16 +0000)] 
upstream: unit tests for new authorized_keys options API

OpenBSD-Regress-ID: 820f9ec9c6301f6ca330ad4052d85f0e67d0bdc1

7 years agoupstream: fix testing of pty option, include positive test and
djm@openbsd.org [Fri, 2 Mar 2018 02:53:27 +0000 (02:53 +0000)] 
upstream: fix testing of pty option, include positive test and

testing of restrict keyword

OpenBSD-Regress-ID: 4268f27c2706a0a95e725d9518c5bcbec9814c6d

7 years agoupstream: better testing for port-forwarding and restrict flags in
djm@openbsd.org [Fri, 2 Mar 2018 02:51:55 +0000 (02:51 +0000)] 
upstream: better testing for port-forwarding and restrict flags in

authorized_keys

OpenBSD-Regress-ID: ee771df8955f2735df54746872c6228aff381daa

7 years agoupstream: switch over to the new authorized_keys options API and
djm@openbsd.org [Sat, 3 Mar 2018 03:15:51 +0000 (03:15 +0000)] 
upstream: switch over to the new authorized_keys options API and

remove the legacy one.

Includes a fairly big refactor of auth2-pubkey.c to retain less state
between key file lines.

feedback and ok markus@

OpenBSD-Commit-ID: dece6cae0f47751b9892080eb13d6625599573df

7 years agoupstream: Introduce a new API for handling authorized_keys options.
djm@openbsd.org [Sat, 3 Mar 2018 03:06:02 +0000 (03:06 +0000)] 
upstream: Introduce a new API for handling authorized_keys options.

This API parses options to a dedicated structure rather than the old API's
approach of setting global state. It also includes support for merging
options, e.g. from authorized_keys, authorized_principals and/or
certificates.

feedback and ok markus@

OpenBSD-Commit-ID: 98badda102cd575210d7802943e93a34232c80a2

7 years agoupstream: warn when the agent returns a signature type that was
djm@openbsd.org [Sat, 3 Mar 2018 03:01:50 +0000 (03:01 +0000)] 
upstream: warn when the agent returns a signature type that was

different to what was requested. This might happen when an old/non-OpenSSH
agent is asked to make a rsa-sha2-256/512 signature but only supports
ssh-rsa. bz#2799 feedback and ok markus@

OpenBSD-Commit-ID: 760c0f9438c5c58abc16b5f98008ff2d95cb13ce

7 years agoupstream: apply a lick of paint; tweaks/ok dtucker
jmc@openbsd.org [Fri, 2 Mar 2018 21:40:15 +0000 (21:40 +0000)] 
upstream: apply a lick of paint; tweaks/ok dtucker

OpenBSD-Commit-ID: 518a6736338045e0037f503c21027d958d05e703

7 years agoupstream: Allow escaped quotes \" and \' in ssh_config and
djm@openbsd.org [Fri, 2 Mar 2018 03:02:11 +0000 (03:02 +0000)] 
upstream: Allow escaped quotes \" and \' in ssh_config and

sshd_config quotes option strings. bz#1596 ok markus@

OpenBSD-Commit-ID: dd3a29fc2dc905e8780198e5a6a30b096de1a1cb

7 years agoupstream: refactor sshkey_read() to make it a little more, err,
djm@openbsd.org [Fri, 2 Mar 2018 02:08:03 +0000 (02:08 +0000)] 
upstream: refactor sshkey_read() to make it a little more, err,

readable. ok markus

OpenBSD-Commit-ID: 2e9247b5762fdac3b6335dc606d3822121714c28

7 years agoupstream: missing #ifdef for _PATH_HOST_XMSS_KEY_FILE; report by
markus@openbsd.org [Thu, 1 Mar 2018 20:32:16 +0000 (20:32 +0000)] 
upstream: missing #ifdef for _PATH_HOST_XMSS_KEY_FILE; report by

jmc@

OpenBSD-Commit-ID: 9039cb69a3f9886bfef096891a9e7fcbd620280b

7 years agoupstream: Remove unneeded (local) include. ok markus@
dtucker@openbsd.org [Mon, 26 Feb 2018 12:14:53 +0000 (12:14 +0000)] 
upstream: Remove unneeded (local) include. ok markus@

OpenBSD-Commit-ID: 132812dd2296b1caa8cb07d2408afc28e4e60f93

7 years agoupstream: Add $OpenBSD$ markers to xmss files to help keep synced
dtucker@openbsd.org [Mon, 26 Feb 2018 03:56:44 +0000 (03:56 +0000)] 
upstream: Add $OpenBSD$ markers to xmss files to help keep synced

with portable. ok djm@.

OpenBSD-Commit-ID: 5233a27aafd1dfadad4b957225f95ae51eb365c1

7 years agoupstream: Add newline at end of file to prevent compiler warnings.
dtucker@openbsd.org [Mon, 26 Feb 2018 03:03:05 +0000 (03:03 +0000)] 
upstream: Add newline at end of file to prevent compiler warnings.

OpenBSD-Commit-ID: 52f247d4eafe840c7c14c8befa71a760a8eeb063

7 years agoAdd WITH_XMSS, move to prevent conflicts.
Darren Tucker [Wed, 28 Feb 2018 08:59:35 +0000 (19:59 +1100)] 
Add WITH_XMSS, move to prevent conflicts.

Add #ifdef WITH_XMSS to ssh-xmss.c, move it in the other files to after
includes.h so it's less likely to conflict and will pick up WITH_XMSS if
added to config.h.

7 years agoConditionally compile XMSS code.
Darren Tucker [Tue, 27 Feb 2018 03:45:17 +0000 (14:45 +1100)] 
Conditionally compile XMSS code.

The XMSS code is currently experimental and, unlike the rest of OpenSSH
cannot currently be compiled with a c89 compiler.

7 years agoCheck dlopen has RTLD_NOW before enabling pkcs11.
Darren Tucker [Mon, 26 Feb 2018 01:51:29 +0000 (12:51 +1100)] 
Check dlopen has RTLD_NOW before enabling pkcs11.

7 years agoCheck for attributes on prototype args.
Darren Tucker [Mon, 26 Feb 2018 21:41:25 +0000 (08:41 +1100)] 
Check for attributes on prototype args.

Some compilers (gcc 2.9.53, 3.0 and probably others, see gcc bug #3481)
do not accept __attribute__ on function pointer prototype args.  Check for
this and hide them if they're not accepted.

7 years agoCheck if HAVE_DECL_BZERO correctly.
Darren Tucker [Mon, 26 Feb 2018 00:43:48 +0000 (11:43 +1100)] 
Check if HAVE_DECL_BZERO correctly.

7 years agoWrap <stdint.h> in #ifdef HAVE_STDINT_H.
Darren Tucker [Mon, 26 Feb 2018 06:42:56 +0000 (17:42 +1100)] 
Wrap <stdint.h> in #ifdef HAVE_STDINT_H.

7 years agoReplace $(CURDIR) with $(PWD).
Darren Tucker [Mon, 26 Feb 2018 05:24:23 +0000 (16:24 +1100)] 
Replace $(CURDIR) with $(PWD).

The former doesn't work on Solaris or BSDs.

7 years agoComment out hexdump().
Darren Tucker [Mon, 26 Feb 2018 03:51:59 +0000 (14:51 +1100)] 
Comment out hexdump().

Nothing currently uses them but they cause conflicts on at least
FreeBSD, possibly others.  ok djm@

7 years agotypo: missing ;
Darren Tucker [Mon, 26 Feb 2018 03:39:14 +0000 (14:39 +1100)] 
typo: missing ;

7 years agoHook up flock() compat code.
Darren Tucker [Mon, 26 Feb 2018 03:37:06 +0000 (14:37 +1100)] 
Hook up flock() compat code.

Also a couple of minor changes: fail if we can't lock instead of
silently succeeding, and apply a couple of minor style fixes.

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.