]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
8 years agoupstream commit
dtucker@openbsd.org [Mon, 6 Mar 2017 00:44:51 +0000 (00:44 +0000)] 
upstream commit

linenum is unsigned long so use %lu in log formats.  ok
deraadt@

Upstream-ID: 9dc582d9bb887ebe0164e030d619fc20b1a4ea08

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Mar 2017 06:13:11 +0000 (06:13 +0000)] 
upstream commit

fix ssh-keygen -H accidentally corrupting known_hosts that
contained already-hashed entries. HKF_MATCH_HOST_HASHED is only set by
hostkeys_foreach() when hostname matching is in use, so we need to look for
the hash marker explicitly.

Upstream-ID: da82ad653b93e8a753580d3cf5cd448bc2520528

8 years agoupstream commit
djm@openbsd.org [Tue, 28 Feb 2017 06:10:08 +0000 (06:10 +0000)] 
upstream commit

small memleak: free fd_set on connection timeout (though
we are heading to exit anyway). From Tom Rix in bz#2683

Upstream-ID: 10e3dadbb8199845b66581473711642d9e6741c4

8 years agoupstream commit
jmc@openbsd.org [Mon, 27 Feb 2017 14:30:33 +0000 (14:30 +0000)] 
upstream commit

errant dot; from klemens nanni

Upstream-ID: 83d93366a5acf47047298c5d3ebc5e7426f37921

8 years agoupstream commit
djm@openbsd.org [Fri, 24 Feb 2017 03:16:34 +0000 (03:16 +0000)] 
upstream commit

might as well set the listener socket CLOEXEC

Upstream-ID: 9c538433d6a0ca79f5f21decc5620e46fb68ab57

8 years agoupstream commit
djm@openbsd.org [Sun, 19 Feb 2017 00:11:29 +0000 (00:11 +0000)] 
upstream commit

add test cases for C locale; ok schwarze@

Upstream-Regress-ID: 783d75de35fbc923d46e2a5e6cee30f8f381ba87

8 years agoupstream commit
djm@openbsd.org [Sun, 19 Feb 2017 00:10:57 +0000 (00:10 +0000)] 
upstream commit

Add a common nl_langinfo(CODESET) alias for US-ASCII
"ANSI_X3.4-1968" that is used by Linux. Fixes mprintf output truncation for
non-UTF-8 locales on Linux spotted by dtucker@; ok deraadt@ schwarze@

Upstream-ID: c6808956ebffd64066f9075d839f74ff0dd60719

8 years agoupstream commit
dtucker@openbsd.org [Tue, 7 Feb 2017 23:03:11 +0000 (23:03 +0000)] 
upstream commit

Remove deprecated SSH1 options RSAAuthentication and
RhostsRSAAuthentication from regression test sshd_config.

Upstream-Regress-ID: 8066b753d9dce7cf02ff87af5c727ff680d99491

8 years agoupstream commit
dtucker@openbsd.org [Fri, 17 Feb 2017 02:32:05 +0000 (02:32 +0000)] 
upstream commit

Do not show rsa1 key type in usage when compiled without
SSH1 support.

Upstream-ID: 068b5c41357a02f319957746fa4e84ea73960f57

8 years agoupstream commit
dtucker@openbsd.org [Fri, 17 Feb 2017 02:31:14 +0000 (02:31 +0000)] 
upstream commit

ifdef out "rsa1" from the list of supported keytypes when
compiled without SSH1 support.  Found by kdunlop at guralp.com, ok djm@

Upstream-ID: cea93a26433d235bb1d64b1d990f19a9c160a70f

8 years agoupstream commit
djm@openbsd.org [Fri, 17 Feb 2017 02:04:15 +0000 (02:04 +0000)] 
upstream commit

For ProxyJump/-J, surround host name with brackets to
allow literal IPv6 addresses. From Dick Visser; ok dtucker@

Upstream-ID: 3a5d3b0171250daf6a5235e91bce09c1d5746bf1

8 years agoupstream commit
jsg@openbsd.org [Wed, 15 Feb 2017 23:38:31 +0000 (23:38 +0000)] 
upstream commit

Fix memory leaks in match_filter_list() error paths.

ok dtucker@ markus@

Upstream-ID: c7f96ac0877f6dc9188bbc908100a8d246cc7f0e

8 years agoupstream commit
djm@openbsd.org [Wed, 15 Feb 2017 01:46:47 +0000 (01:46 +0000)] 
upstream commit

fix division by zero crash in "df" output when server
returns zero total filesystem blocks/inodes. Spotted by Guido Vranken; ok
dtucker@

Upstream-ID: 6fb6c2ae6b289aa07b6232dbc0be54682ef5419f

8 years agoifdef out EVP_R_PRIVATE_KEY_DECODE_ERROR
Darren Tucker [Sun, 12 Feb 2017 04:45:15 +0000 (15:45 +1100)] 
ifdef out EVP_R_PRIVATE_KEY_DECODE_ERROR

EVP_R_PRIVATE_KEY_DECODE_ERROR was added in OpenSSL 1.0.0 so ifdef out
for the benefit of OpenSSL versions prior to that.

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Feb 2017 04:34:50 +0000 (04:34 +0000)] 
upstream commit

bring back r1.34 that was backed out for problems loading
public keys:

translate OpenSSL error codes to something more
meaninful; bz#2522 reported by Jakub Jelen, ok dtucker@

with additional fix from Jakub Jelen to solve the backout.
bz#2525 bz#2523 re-ok dtucker@

Upstream-ID: a9d5bc0306f4473d9b4f4484f880e95f3c1cc031

8 years agoupstream commit
djm@openbsd.org [Fri, 10 Feb 2017 03:36:40 +0000 (03:36 +0000)] 
upstream commit

Sanitise escape sequences in key comments sent to printf
but preserve valid UTF-8 when the locale supports it; bz#2520 ok dtucker@

Upstream-ID: e8eed28712ba7b22d49be534237eed019875bd1e

8 years agoupstream commit
millert@openbsd.org [Wed, 8 Feb 2017 20:32:43 +0000 (20:32 +0000)] 
upstream commit

Avoid printf %s NULL.  From semarie@, OK djm@

Upstream-ID: 06beef7344da0208efa9275d504d60d2a5b9266c

8 years agoupstream commit
djm@openbsd.org [Mon, 6 Feb 2017 09:22:51 +0000 (09:22 +0000)] 
upstream commit

Restore \r\n newline sequence for server ident string. The CR
got lost in the flensing of SSHv1. Pointed out by Stef Bon

Upstream-ID: 5333fd43ce5396bf5999496096fac5536e678fac

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Feb 2017 23:01:42 +0000 (23:01 +0000)] 
upstream commit

unit test for match_filter_list() function; still want a
better name for this...

Upstream-Regress-ID: 840ad6118552c35111f0a897af9c8d93ab8de92a

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Feb 2017 23:05:57 +0000 (23:05 +0000)] 
upstream commit

use ssh_packet_set_log_preamble() to include connection
username in packet log messages, e.g.

Connection closed by invalid user foo 10.1.1.1 port 44056 [preauth]

ok markus@ bz#113

Upstream-ID: 3591b88bdb5416d6066fb3d49d8fff2375bf1a15

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Feb 2017 23:03:33 +0000 (23:03 +0000)] 
upstream commit

add ssh_packet_set_log_preamble() to allow inclusion of a
preamble string in disconnect messages; ok markus@

Upstream-ID: 34cb41182cd76d414c214ccb01c01707849afead

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Feb 2017 23:01:19 +0000 (23:01 +0000)] 
upstream commit

support =- for removing methods from algorithms lists,
e.g. Ciphers=-*cbc; suggested by Cristian Ionescu-Idbohrn in bz#2671 "I like
it" markus@

Upstream-ID: c78c38f9f81a963b33d0eade559f6048add24a6d

8 years agoupstream commit
djm@openbsd.org [Fri, 3 Feb 2017 05:05:56 +0000 (05:05 +0000)] 
upstream commit

allow form-feed characters at EOL; bz#2431 ok dtucker@

Upstream-ID: 1f453afaba6da2ae69d6afdf1ae79a917552f1a2

8 years agoprefer to use ldns-config to find libldns
Damien Miller [Fri, 3 Feb 2017 05:01:22 +0000 (16:01 +1100)] 
prefer to use ldns-config to find libldns

Should fix bz#2603 - "Build with ldns and without kerberos support
fails if ldns compiled with kerberos support" by including correct
cflags/libs

ok dtucker@

8 years agoupstream commit
dtucker@openbsd.org [Fri, 3 Feb 2017 02:56:00 +0000 (02:56 +0000)] 
upstream commit

Make ssh_packet_set_rekey_limits take u32 for the number of
seconds until rekeying (negative values are rejected at config parse time).
This allows the removal of some casts and a signed vs unsigned comparison
warning.

rekey_time is cast to int64 for the comparison which is a no-op
on OpenBSD, but should also do the right thing in -portable on
anything still using 32bit time_t (until the system time actually
wraps, anyway).

some early guidance deraadt@, ok djm@

Upstream-ID: c9f18613afb994a07e7622eb326f49de3d123b6c

8 years agoupstream commit
jsg@openbsd.org [Thu, 2 Feb 2017 10:54:25 +0000 (10:54 +0000)] 
upstream commit

In vasnmprintf() return an error if malloc fails and
don't set a function argument to the address of free'd memory.

ok djm@

Upstream-ID: 1efffffff2f51d53c9141f245b90ac23d33b9779

8 years agoupstream commit
dtucker@openbsd.org [Wed, 1 Feb 2017 02:59:09 +0000 (02:59 +0000)] 
upstream commit

Return true reason for port forwarding failures where
feasible rather than always "administratively prohibited".  bz#2674, ok djm@

Upstream-ID: d901d9887951774e604ca970e1827afaaef9e419

8 years agoupstream commit
dtucker@openbsd.org [Mon, 30 Jan 2017 23:27:39 +0000 (23:27 +0000)] 
upstream commit

Small correction to the known_hosts section on when it is
updated. Patch from lkppo at free.fr some time ago, pointed out by smallm at
sdf.org

Upstream-ID: 1834d7af179dea1a12ad2137f84566664af225d5

8 years agoRemove _XOPEN_SOURCE from wide char detection.
Darren Tucker [Fri, 3 Feb 2017 03:10:34 +0000 (14:10 +1100)] 
Remove _XOPEN_SOURCE from wide char detection.

Having _XOPEN_SOURCE unconditionally causes problems on some platforms
and configurations, notably Solaris 64-bit binaries.  It was there for
the benefit of Linux put the required bits in the *-*linux* section.

Patch from yvoinov at gmail.com.

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 05:22:14 +0000 (05:22 +0000)] 
upstream commit

fully unbreak: some $SSH invocations did not have -F
specified and could pick up the ~/.ssh/config of the user running the tests

Upstream-Regress-ID: f362d1892c0d3e66212d5d3fc02d915c58ef6b89

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 04:54:07 +0000 (04:54 +0000)] 
upstream commit

partially unbreak: was not specifying hostname on some
$SSH invocations

Upstream-Regress-ID: bc8a5e98e57bad0a92ef4f34ed91c1d18294e2cc

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 01:03:00 +0000 (01:03 +0000)] 
upstream commit

revise keys/principals command hang fix (bz#2655) to
consume entire output, avoiding sending SIGPIPE to subprocesses early; ok
dtucker@

Upstream-ID: 7cb04b31a61f8c78c4e48ceededcd2fd5c4ee1bc

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 00:38:50 +0000 (00:38 +0000)] 
upstream commit

small cleanup post SSHv1 removal:

remove SSHv1-isms in commented examples

reorder token table to group deprecated and compile-time conditional tokens
better

fix config dumping code for some compile-time conditional options that
weren't being correctly skipped (SSHv1 and PKCS#11)

Upstream-ID: f2e96b3cb3158d857c5a91ad2e15925df3060105

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 00:34:01 +0000 (00:34 +0000)] 
upstream commit

some explicit NULL tests when dumping configured
forwardings; from Karsten Weiss

Upstream-ID: 40957b8dea69672b0e50df6b4a91a94e3e37f72d

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 00:32:28 +0000 (00:32 +0000)] 
upstream commit

misplaced braces in test; from Karsten Weiss

Upstream-ID: f7b794074d3aae8e35b69a91d211c599c94afaae

8 years agoupstream commit
djm@openbsd.org [Mon, 30 Jan 2017 00:32:03 +0000 (00:32 +0000)] 
upstream commit

don't dereference authctxt before testing != NULL, it
causes compilers to make assumptions; from Karsten Weiss

Upstream-ID: 794243aad1e976ebc717885b7a97a25e00c031b2

8 years agoupstream commit
djm@openbsd.org [Fri, 6 Jan 2017 02:51:16 +0000 (02:51 +0000)] 
upstream commit

use correct ssh-add program; bz#2654, from Colin Watson

Upstream-Regress-ID: 7042a36e1bdaec6562f6e57e9d047efe9c7a6030

8 years agoupstream commit
dtucker@openbsd.org [Fri, 6 Jan 2017 02:26:10 +0000 (02:26 +0000)] 
upstream commit

Account for timeouts in the integrity tests as failures.

If the first test in a series for a given MAC happens to modify the low
bytes of a packet length, then ssh will time out and this will be
interpreted as a test failure.  Patch from cjwatson at debian.org via
bz#2658.

Upstream-Regress-ID: e7467613b0badedaa300bc6fc7495ec2f44e2fb9

8 years agoupstream commit
dtucker@openbsd.org [Fri, 6 Jan 2017 02:09:25 +0000 (02:09 +0000)] 
upstream commit

Make forwarding test less racy by using unix domain
sockets instead of TCP ports where possible.  Patch from cjwatson at
debian.org via bz#2659.

Upstream-Regress-ID: 4756375aac5916ef9d25452a1c1d5fa9e90299a9

8 years agoupstream commit
dtucker@openbsd.org [Sun, 29 Jan 2017 21:35:23 +0000 (21:35 +0000)] 
upstream commit

Fix typo in ~C error message for bad port forward
cancellation. bz#2672, from Brad Marshall via Colin Watson and Ubuntu's
bugtracker.

Upstream-ID: 0d4a7e5ead6cc59c9a44b4c1e5435ab3aada09af

8 years agoupstream commit
guenther@openbsd.org [Sat, 21 Jan 2017 11:32:04 +0000 (11:32 +0000)] 
upstream commit

The POSIX APIs that that sockaddrs all ignore the s*_len
field in the incoming socket, so userspace doesn't need to set it unless it
has its own reasons for tracking the size along with the sockaddr.

ok phessler@ deraadt@ florian@

Upstream-ID: ca6e49e2f22f2b9e81d6d924b90ecd7e422e7437

8 years agoupstream commit
jmc@openbsd.org [Fri, 6 Jan 2017 16:28:12 +0000 (16:28 +0000)] 
upstream commit

keep the tokens list sorted;

Upstream-ID: b96239dae4fb3aa94146bb381afabcc7740a1638

8 years agoupstream commit
djm@openbsd.org [Fri, 6 Jan 2017 09:27:52 +0000 (09:27 +0000)] 
upstream commit

fix previous

Upstream-ID: c107d6a69bc22325d79fbf78a2a62e04bcac6895

8 years agoupstream commit
djm@openbsd.org [Fri, 6 Jan 2017 03:53:58 +0000 (03:53 +0000)] 
upstream commit

show a useful error message when included config files
can't be opened; bz#2653, ok dtucker@

Upstream-ID: f598b73b5dfe497344cec9efc9386b4e5a3cb95b

8 years agoupstream commit
djm@openbsd.org [Fri, 6 Jan 2017 03:45:41 +0000 (03:45 +0000)] 
upstream commit

sshd_config is documented to set
GSSAPIStrictAcceptorCheck=yes by default, so actually make it do this.
bz#2637 ok dtucker

Upstream-ID: 99ef8ac51f17f0f7aec166cb2e34228d4d72a665

8 years agoupstream commit
djm@openbsd.org [Fri, 6 Jan 2017 03:41:58 +0000 (03:41 +0000)] 
upstream commit

Avoid confusing error message when attempting to use
ssh-keyscan built without SSH protocol v.1 to scan for v.1 keys; bz#2583

Upstream-ID: 5d214abd3a21337d67c6dcc5aa6f313298d0d165

8 years agoupstream commit
dtucker@openbsd.org [Fri, 6 Jan 2017 02:34:54 +0000 (02:34 +0000)] 
upstream commit

Re-add '%k' token for AuthorizedKeysCommand which was
lost during the re-org in rev 1.235.  bz#2656, from jboning at gmail.com.

Upstream-ID: 2884e203c02764d7b3fe7472710d9c24bdc73e38

8 years agoupstream commit
djm@openbsd.org [Wed, 4 Jan 2017 05:37:40 +0000 (05:37 +0000)] 
upstream commit

unbreak Unix domain socket forwarding for root; ok
markus@

Upstream-ID: 6649c76eb7a3fa15409373295ca71badf56920a2

8 years agoRemove LOGIN_PROGRAM.
Darren Tucker [Sun, 15 Jan 2017 22:08:32 +0000 (09:08 +1100)] 
Remove LOGIN_PROGRAM.

UseLogin is gone, remove leftover.  bz#2665, from cjwatson at debian.org

8 years agoupstream commit
djm@openbsd.org [Wed, 4 Jan 2017 02:21:43 +0000 (02:21 +0000)] 
upstream commit

relax PKCS#11 whitelist a bit to allow libexec as well as
lib directories.

Upstream-ID: cf5617958e2e2d39f8285fd3bc63b557da484702

8 years agoupstream commit
djm@openbsd.org [Tue, 3 Jan 2017 05:46:51 +0000 (05:46 +0000)] 
upstream commit

check number of entries in SSH2_FXP_NAME response; avoids
unreachable overflow later. Reported by Jann Horn

Upstream-ID: b6b2b434a6d6035b1644ca44f24cd8104057420f

8 years agoupstream commit
djm@openbsd.org [Fri, 30 Dec 2016 22:08:02 +0000 (22:08 +0000)] 
upstream commit

fix deadlock when keys/principals command produces a lot of
output and a key is matched early; bz#2655, patch from jboning AT gmail.com

Upstream-ID: e19456429bf99087ea994432c16d00a642060afe

8 years agoRe-add missing "Prerequisites" header and fix typo
Darren Tucker [Tue, 20 Dec 2016 01:16:11 +0000 (12:16 +1100)] 
Re-add missing "Prerequisites" header and fix typo

Patch from HARUYAMA Seigo <haruyama at unixuser org>.

8 years agoupstream commit
djm@openbsd.org [Mon, 19 Dec 2016 22:35:23 +0000 (22:35 +0000)] 
upstream commit

use standard /bin/sh equality test; from Mike Frysinger

Upstream-Regress-ID: 7b6f0b63525f399844c8ac211003acb8e4b0bec2

8 years agocrank version numbers for release V_7_4_P1
Damien Miller [Mon, 19 Dec 2016 04:59:26 +0000 (15:59 +1100)] 
crank version numbers for release

8 years agoupstream commit
djm@openbsd.org [Mon, 19 Dec 2016 04:55:51 +0000 (04:55 +0000)] 
upstream commit

openssh-7.4

Upstream-ID: 1ee404adba6bbe10ae9277cbae3a94abe2867b79

8 years agoupstream commit
djm@openbsd.org [Mon, 19 Dec 2016 04:55:18 +0000 (04:55 +0000)] 
upstream commit

remove testcase that depends on exact output and
behaviour of snprintf(..., "%s", NULL)

Upstream-Regress-ID: cab4288531766bd9593cb556613b91a2eeefb56f

8 years agoupstream commit
dtucker@openbsd.org [Mon, 19 Dec 2016 03:32:57 +0000 (03:32 +0000)] 
upstream commit

Use LOGNAME to get current user and fall back to whoami if
not set. Mainly to benefit -portable since some platforms don't have whoami.

Upstream-Regress-ID: e3a16b7836a3ae24dc8f8a4e43fdf8127a60bdfa

8 years agoupstream commit
dtucker@openbsd.org [Fri, 16 Dec 2016 03:51:19 +0000 (03:51 +0000)] 
upstream commit

Add regression test for AllowUsers and DenyUsers.  Patch from
Zev Weiss <zev at bewilderbeest.net>

Upstream-Regress-ID: 8f1aac24d52728398871dac14ad26ea38b533fb9

8 years agoAdd missing monitor.h include.
Darren Tucker [Fri, 16 Dec 2016 04:02:24 +0000 (15:02 +1100)] 
Add missing monitor.h include.

Fixes warning pointed out by Zev Weiss <zev at bewilderbeest.net>

8 years agoupstream commit
djm@openbsd.org [Fri, 16 Dec 2016 02:48:55 +0000 (02:48 +0000)] 
upstream commit

revert to rev1.2; the new bits in this test depend on changes
to ssh that aren't yet committed

Upstream-Regress-ID: 828ffc2c7afcf65d50ff2cf3dfc47a073ad39123

8 years agoupstream commit
dtucker@openbsd.org [Fri, 16 Dec 2016 01:06:27 +0000 (01:06 +0000)] 
upstream commit

Move the "stop sshd" code into its own helper function.
Patch from Zev Weiss <zev at bewilderbeest.net>, ok djm@

Upstream-Regress-ID: a113dea77df5bd97fb4633ea31f3d72dbe356329

8 years agoupstream commit
djm@openbsd.org [Fri, 16 Dec 2016 01:01:07 +0000 (01:01 +0000)] 
upstream commit

regression test for certificates along with private key
with no public half. bz#2617, mostly from Adam Eijdenberg

Upstream-Regress-ID: 2e74dc2c726f4dc839609b3ce045466b69f01115

8 years agoupstream commit
dtucker@openbsd.org [Thu, 15 Dec 2016 23:50:37 +0000 (23:50 +0000)] 
upstream commit

Use $SUDO to read pidfile in case root's umask is
restricted.  From portable.

Upstream-Regress-ID: f6b1c7ffbc5a0dfb7d430adb2883344899174a98

8 years agoupstream commit
dtucker@openbsd.org [Thu, 15 Dec 2016 21:29:05 +0000 (21:29 +0000)] 
upstream commit

Add missing braces in DenyUsers code.  Patch from zev at
bewilderbeest.net, ok deraadt@

Upstream-ID: d747ace338dcf943b077925f90f85f789714b54e

8 years agoupstream commit
dtucker@openbsd.org [Thu, 15 Dec 2016 21:20:41 +0000 (21:20 +0000)] 
upstream commit

Fix text in error message.  Patch from zev at
bewilderbeest.net.

Upstream-ID: deb0486e175e7282f98f9a15035d76c55c84f7f6

8 years agoupstream commit
djm@openbsd.org [Wed, 14 Dec 2016 00:36:34 +0000 (00:36 +0000)] 
upstream commit

disable Unix-domain socket forwarding when privsep is
disabled

Upstream-ID: ab61516ae0faadad407857808517efa900a0d6d0

8 years agoupstream commit
djm@openbsd.org [Fri, 9 Dec 2016 03:04:29 +0000 (03:04 +0000)] 
upstream commit

log connections dropped in excess of MaxStartups at
verbose LogLevel; bz#2613 based on diff from Tomas Kuthan; ok dtucker@

Upstream-ID: 703ae690dbf9b56620a6018f8a3b2389ce76d92b

8 years agoGet default of TEST_SSH_UTF8 from environment.
Darren Tucker [Tue, 13 Dec 2016 02:51:32 +0000 (13:51 +1100)] 
Get default of TEST_SSH_UTF8 from environment.

8 years agoRemove commented-out includes.
Darren Tucker [Tue, 13 Dec 2016 01:56:40 +0000 (12:56 +1100)] 
Remove commented-out includes.

These commented-out includes have "Still needed?" comments.  Since
they've been commented out for ~13 years I assert that they're not.

8 years agoAdd prototype for strcasestr in compat library.
Darren Tucker [Tue, 13 Dec 2016 01:54:23 +0000 (12:54 +1100)] 
Add prototype for strcasestr in compat library.

8 years agoAdd strcasestr to compat library.
Darren Tucker [Mon, 12 Dec 2016 23:23:03 +0000 (10:23 +1100)] 
Add strcasestr to compat library.

Fixes build on (at least) Solaris 10.

8 years agoForce Turkish locales back to C/POSIX; bz#2643
Damien Miller [Mon, 12 Dec 2016 02:57:10 +0000 (13:57 +1100)] 
Force Turkish locales back to C/POSIX; bz#2643

Turkish locales are unique in their handling of the letters 'i' and
'I' (yes, they are different letters) and OpenSSH isn't remotely
prepared to deal with that. For now, the best we can do is to force
OpenSSH to use the C/POSIX locale and try to preserve the UTF-8
encoding if possible.

ok dtucker@

8 years agoexit is in stdlib.h not unistd.h (that's _exit).
Darren Tucker [Fri, 9 Dec 2016 01:52:02 +0000 (12:52 +1100)] 
exit is in stdlib.h not unistd.h (that's _exit).

8 years agoInclude <unistd.h> for exit in utf8 locale test.
Darren Tucker [Fri, 9 Dec 2016 01:33:25 +0000 (12:33 +1100)] 
Include <unistd.h> for exit in utf8 locale test.

8 years agoCheck for utf8 local support before testing it.
Darren Tucker [Thu, 8 Dec 2016 04:48:34 +0000 (15:48 +1100)] 
Check for utf8 local support before testing it.

Check for utf8 local support and if not found, do not attempt to run the
utf8 tests.  Suggested by djm@

8 years agoUse AC_PATH_TOOL for krb5-config.
Darren Tucker [Thu, 8 Dec 2016 01:57:24 +0000 (12:57 +1100)] 
Use AC_PATH_TOOL for krb5-config.

This will use the host-prefixed version when cross compiling; patch from
david.michael at coreos.com.

8 years agoupstream commit
djm@openbsd.org [Tue, 6 Dec 2016 07:48:01 +0000 (07:48 +0000)] 
upstream commit

make IdentityFile successfully load and use certificates that
have no corresponding bare public key. E.g. just a private id_rsa and
certificate id_rsa-cert.pub (and no id_rsa.pub).

bz#2617 ok dtucker@

Upstream-ID: c1e9699b8c0e3b63cc4189e6972e3522b6292604

8 years agoAdd a gnome-ssh-askpass3 target for GTK+3 version
Damien Miller [Fri, 25 Nov 2016 03:04:21 +0000 (14:04 +1100)] 
Add a gnome-ssh-askpass3 target for GTK+3 version

Based on patch from Colin Watson via bz#2640

8 years agoMake gnome-ssh-askpass2.c GTK+3-friendly
Damien Miller [Fri, 25 Nov 2016 03:03:53 +0000 (14:03 +1100)] 
Make gnome-ssh-askpass2.c GTK+3-friendly

Patch from Colin Watson via bz#2640

8 years agoupstream commit
djm@openbsd.org [Sun, 4 Dec 2016 23:54:02 +0000 (23:54 +0000)] 
upstream commit

Fix public key authentication when multiple
authentication is in use. Instead of deleting and re-preparing the entire
keys list, just reset the 'used' flags; the keys list is already in a good
order (with already- tried keys at the back)

Analysis and patch from Vincent Brillault on bz#2642; ok dtucker@

Upstream-ID: 7123f12dc2f3bcaae715853035a97923d7300176

8 years agoupstream commit
dtucker@openbsd.org [Sun, 4 Dec 2016 22:27:25 +0000 (22:27 +0000)] 
upstream commit

Unlink PidFile on SIGHUP and always recreate it when the
new sshd starts. Regression tests (and possibly other things) depend on the
pidfile being recreated after SIGHUP, and unlinking it means it won't contain
a stale pid if sshd fails to restart.  ok djm@ markus@

Upstream-ID: 132dd6dda0c77dd49d2f15b2573b5794f6160870

8 years agoupstream commit
djm@openbsd.org [Wed, 30 Nov 2016 03:01:33 +0000 (03:01 +0000)] 
upstream commit

test new behaviour of cert force-command restriction vs.
authorized_key/ principals

Upstream-Regress-ID: 399efa7469d40c404c0b0a295064ce75d495387c

8 years agoupstream commit
jmc@openbsd.org [Wed, 30 Nov 2016 06:54:26 +0000 (06:54 +0000)] 
upstream commit

tweak previous; while here fix up FILES and AUTHORS;

Upstream-ID: 93f6e54086145a75df8d8ec7d8689bdadbbac8fa

8 years agoupstream commit
djm@openbsd.org [Wed, 30 Nov 2016 03:07:37 +0000 (03:07 +0000)] 
upstream commit

add a whitelist of paths from which ssh-agent will load
(via ssh-pkcs11-helper) a PKCS#11 module; ok markus@

Upstream-ID: fe79769469d9cd6d26fe0dc15751b83ef2a06e8f

8 years agoupstream commit
djm@openbsd.org [Wed, 30 Nov 2016 03:00:05 +0000 (03:00 +0000)] 
upstream commit

Add a sshd_config DisableForwaring option that disables
X11, agent, TCP, tunnel and Unix domain socket forwarding, as well as
anything else we might implement in the future.

This, like the 'restrict' authorized_keys flag, is intended to be a
simple and future-proof way of restricting an account. Suggested as
a complement to 'restrict' by Jann Horn; ok markus@

Upstream-ID: 203803f66e533a474086b38a59ceb4cf2410fcf7

8 years agoupstream commit
djm@openbsd.org [Wed, 30 Nov 2016 02:57:40 +0000 (02:57 +0000)] 
upstream commit

When a forced-command appears in both a certificate and
an authorized keys/principals command= restriction, refuse to accept the
certificate unless they are identical.

The previous (documented) behaviour of having the certificate forced-
command override the other could be a bit confused and more error-prone.

Pointed out by Jann Horn of Project Zero; ok dtucker@

Upstream-ID: 79d811b6eb6bbe1221bf146dde6928f92d2cd05f

8 years agoupstream commit
dtucker@openbsd.org [Wed, 30 Nov 2016 00:28:31 +0000 (00:28 +0000)] 
upstream commit

On startup, check to see if sshd is already daemonized
and if so, skip the call to daemon() and do not rewrite the PidFile.  This
means that when sshd re-execs itself on SIGHUP the process ID will no longer
change.  Should address bz#2641.  ok djm@ markus@.

Upstream-ID: 5ea0355580056fb3b25c1fd6364307d9638a37b9

8 years agofactor out common PRNG reseed before privdrop
Damien Miller [Wed, 30 Nov 2016 02:51:49 +0000 (13:51 +1100)] 
factor out common PRNG reseed before privdrop

Add a call to RAND_poll() to ensure than more than pid+time gets
stirred into child processes states. Prompted by analysis from Jann
Horn at Project Zero. ok dtucker@

8 years agoupstream commit
dtucker@openbsd.org [Fri, 25 Nov 2016 03:02:01 +0000 (03:02 +0000)] 
upstream commit

Allow PuTTY interop tests to run unattended.  bz#2639,
patch from cjwatson at debian.org.

Upstream-Regress-ID: 4345253558ac23b2082aebabccd48377433b6fe0

8 years agoupstream commit
dtucker@openbsd.org [Fri, 25 Nov 2016 02:56:49 +0000 (02:56 +0000)] 
upstream commit

Reverse args to sshd-log-wrapper.  Matches change in
portable, where it allows sshd do be optionally run under Valgrind.

Upstream-Regress-ID: b438d1c6726dc5caa2a45153e6103a0393faa906

8 years agoupstream commit
dtucker@openbsd.org [Fri, 25 Nov 2016 02:49:18 +0000 (02:49 +0000)] 
upstream commit

Fix typo in trace message; from portable.

Upstream-Regress-ID: 4c4a2ba0d37faf5fd230a91b4c7edb5699fbd73a

8 years agoupstream commit
tb@openbsd.org [Tue, 1 Nov 2016 13:43:27 +0000 (13:43 +0000)] 
upstream commit

Clean up MALLOC_OPTIONS.  For the unittests, move
MALLOC_OPTIONS and TEST_ENV to unittets/Makefile.inc.

ok otto

Upstream-Regress-ID: 890d497e0a38eeddfebb11cc429098d76cf29f12

8 years agoupstream commit
tb@openbsd.org [Mon, 31 Oct 2016 23:45:08 +0000 (23:45 +0000)] 
upstream commit

Remove the obsolete A and P flags from MALLOC_OPTIONS.

ok dtucker

Upstream-Regress-ID: 6cc25024c8174a87e5734a0dc830194be216dd59

8 years agoupstream commit
dtucker@openbsd.org [Tue, 29 Nov 2016 03:54:50 +0000 (03:54 +0000)] 
upstream commit

Factor out code to disconnect from controlling terminal
into its own function.  ok djm@

Upstream-ID: 39fd9e8ebd7222615a837312face5cc7ae962885

8 years agoupstream commit
djm@openbsd.org [Fri, 25 Nov 2016 23:24:45 +0000 (23:24 +0000)] 
upstream commit

use sshbuf_allocate() to pre-allocate the buffer used for
loading keys. This avoids implicit realloc inside the buffer code, which
might theoretically leave fragments of the key on the heap. This doesn't
appear to happen in practice for normal sized keys, but was observed for
novelty oversize ones.

Pointed out by Jann Horn of Project Zero; ok markus@

Upstream-ID: d620e1d46a29fdea56aeadeda120879eddc60ab1

8 years agoupstream commit
djm@openbsd.org [Fri, 25 Nov 2016 23:22:04 +0000 (23:22 +0000)] 
upstream commit

split allocation out of sshbuf_reserve() into a separate
sshbuf_allocate() function; ok markus@

Upstream-ID: 11b8a2795afeeb1418d508a2c8095b3355577ec2

8 years agoupstream commit
markus@openbsd.org [Wed, 23 Nov 2016 23:14:15 +0000 (23:14 +0000)] 
upstream commit

allow ClientAlive{Interval,CountMax} in Match; ok dtucker,
djm

Upstream-ID: 8beb4c1eadd588f1080b58932281983864979f55

8 years agoupstream commit
djm@openbsd.org [Tue, 8 Nov 2016 22:04:34 +0000 (22:04 +0000)] 
upstream commit

unbreak DenyUsers; reported by henning@

Upstream-ID: 1c67d4148f5e953c35acdb62e7c08ae8e33f7cb2

8 years agoupstream commit
djm@openbsd.org [Sun, 6 Nov 2016 05:46:37 +0000 (05:46 +0000)] 
upstream commit

Validate address ranges for AllowUser/DenyUsers at
configuration load time and refuse to accept bad ones. It was previously
possible to specify invalid CIDR address ranges (e.g. djm@127.1.2.3/55) and
these would always match.

Thanks to Laurence Parry for a detailed bug report. ok markus (for
a previous diff version)

Upstream-ID: 9dfcdd9672b06e65233ea4434c38226680d40bfb