Compare commits

...
10 Commits
Author SHA1 Message Date
[email protected] 484fc023af 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
2018-06-06 16:20:19 +10:00
[email protected] ae1becf568 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
2018-05-25 17:14:24 +10:00
Darren Tucker 45a573a090 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.
2018-04-29 17:59:04 +10:00
Darren Tucker f5baa36ba7 Omit 3des-cbc if OpenSSL built without DES.
Patch from hongxu.jia at windriver.com, ok djm@
2018-04-19 17:34:00 +10:00
[email protected] 868afa6846 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
2018-04-17 08:52:12 +10:00
[email protected] 85fe48fd49 upstream: don't free the %C expansion, it's used later for
LocalCommand

OpenBSD-Commit-ID: 857b5cb37b2d856bfdfce61289a415257a487fb1
2018-04-15 18:30:16 +10:00
Darren Tucker 3402cc6070 Using "==" in shell tests is not portable.
Patch from rsbecker at nexbridge.com.
2018-04-13 13:46:27 +10:00
[email protected] 341727df91 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
2018-04-13 13:44:59 +10:00
Damien Miller b81b2d120e Fix tunnel forwarding broken in 7.7p1
bz2855, ok dtucker@
2018-04-13 13:39:54 +10:00
Darren Tucker 4f60e4f66b Revert $REGRESSTMP changes.
Revert 3fd2d229 and subsequent changes as they turned out to be a
portability hassle.
2018-04-13 13:18:32 +10:00
11 changed files with 18 additions and 17 deletions
+1 -3
View File
@@ -577,8 +577,6 @@ regress-binaries: regress/modpipe$(EXEEXT) \
regress/unittests/utf8/test_utf8$(EXEEXT) \
regress/misc/kexfuzz/kexfuzz$(EXEEXT)
REGRESSTMP = "$(PWD)/regress"
tests interop-tests t-exec unit: regress-prep regress-binaries $(TARGETS)
BUILDDIR=`pwd`; \
TEST_SSH_SCP="$${BUILDDIR}/scp"; \
@@ -602,7 +600,7 @@ tests interop-tests t-exec unit: regress-prep regress-binaries $(TARGETS)
.OBJDIR="$${BUILDDIR}/regress" \
.CURDIR="`pwd`" \
BUILDDIR="$${BUILDDIR}" \
OBJ="$(REGRESSTMP)" \
OBJ="$${BUILDDIR}/regress/" \
PATH="$${BUILDDIR}:$${PATH}" \
TEST_ENV=MALLOC_OPTIONS="@TEST_MALLOC_OPTIONS@" \
TEST_MALLOC_OPTIONS="@TEST_MALLOC_OPTIONS@" \
+2 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: auth-options.c,v 1.78 2018/03/14 05:35:40 djm Exp $ */
/* $OpenBSD: auth-options.c,v 1.79 2018/04/06 04:15:45 djm Exp $ */
/*
* Copyright (c) 2018 Damien Miller <djm@mindrot.org>
*
@@ -394,7 +394,7 @@ sshauthopt_parse(const char *opts, const char **errstrp)
goto fail;
}
for (cp = opt; cp < tmp; cp++) {
if (!isalnum((u_char)*cp)) {
if (!isalnum((u_char)*cp) && *cp != '_') {
free(opt);
errstr = "invalid environment string";
goto fail;
+2 -1
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: auth.c,v 1.127 2018/03/12 00:52:01 djm Exp $ */
/* $OpenBSD: auth.c,v 1.128 2018/05/25 07:11:01 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -1080,6 +1080,7 @@ auth_restrict_session(struct ssh *ssh)
/* A blank sshauthopt defaults to permitting nothing */
restricted = sshauthopt_new();
restricted->permit_pty_flag = 1;
restricted->restricted = 1;
if (auth_activate_options(ssh, restricted) != 0)
+2
View File
@@ -82,7 +82,9 @@ struct sshcipher {
static const struct sshcipher ciphers[] = {
#ifdef WITH_OPENSSL
#ifndef OPENSSL_NO_DES
{ "3des-cbc", 8, 24, 0, 0, CFLAG_CBC, EVP_des_ede3_cbc },
#endif
{ "aes128-cbc", 16, 16, 0, 0, CFLAG_CBC, EVP_aes_128_cbc },
{ "aes192-cbc", 16, 24, 0, 0, CFLAG_CBC, EVP_aes_192_cbc },
{ "aes256-cbc", 16, 32, 0, 0, CFLAG_CBC, EVP_aes_256_cbc },
+3 -1
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: compat.c,v 1.106 2018/02/16 04:43:11 dtucker Exp $ */
/* $OpenBSD: compat.c,v 1.107 2018/04/16 22:50:44 djm Exp $ */
/*
* Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved.
*
@@ -128,6 +128,8 @@ compat_datafellows(const char *version)
SSH_OLD_DHGEX },
{ "ConfD-*",
SSH_BUG_UTF8TTYMODE },
{ "Twisted_*", 0 },
{ "Twisted*", SSH_BUG_DEBUG },
{ NULL, 0 }
};
+1 -1
View File
@@ -1398,7 +1398,7 @@ AC_RUN_IFELSE(
)
AC_MSG_RESULT([$func_calloc_0_nonnull])
if test "x$func_calloc_0_nonnull" == "xyes"; then
if test "x$func_calloc_0_nonnull" = "xyes"; then
AC_DEFINE(HAVE_CALLOC, 1, [calloc(0, x) returns non-null])
else
AC_DEFINE(HAVE_CALLOC, 0, [calloc(0, x) returns NULL])
+2 -2
View File
@@ -185,7 +185,7 @@ sys_tun_open(int tun, int mode, char **ifname)
else
debug("%s: %s mode %d fd %d", __func__, ifr.ifr_name, mode, fd);
if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)))
if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)) == NULL)
goto failed;
return (fd);
@@ -272,7 +272,7 @@ sys_tun_open(int tun, int mode, char **ifname)
goto failed;
}
if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)))
if (ifname != NULL && (*ifname = strdup(ifr.ifr_name)) == NULL)
goto failed;
close(sock);
+1 -1
View File
@@ -16,7 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include "includes.h"
#if !defined(HAVE_STRNDUP) || defined(BROKEN_STRNDUP)
#include <sys/types.h>
+1 -1
View File
@@ -18,7 +18,7 @@
/* OPENBSD ORIGINAL: lib/libc/string/strnlen.c */
#include "config.h"
#include "includes.h"
#if !defined(HAVE_STRNLEN) || defined(BROKEN_STRNLEN)
#include <sys/types.h>
+3 -4
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: ssh-agent.c,v 1.228 2018/02/23 15:58:37 markus Exp $ */
/* $OpenBSD: ssh-agent.c,v 1.229 2018/04/09 23:54:49 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -909,9 +909,8 @@ after_poll(struct pollfd *pfd, size_t npfd)
/* Process events */
switch (sockets[socknum].type) {
case AUTH_SOCKET:
if ((pfd[i].revents & (POLLIN|POLLERR)) != 0 &&
handle_socket_read(socknum) != 0)
close_socket(&sockets[socknum]);
if ((pfd[i].revents & (POLLIN|POLLERR)) != 0)
handle_socket_read(socknum);
break;
case AUTH_CONNECTION:
if ((pfd[i].revents & (POLLIN|POLLERR)) != 0 &&
-1
View File
@@ -1323,7 +1323,6 @@ main(int ac, char **av)
(char *)NULL);
free(cp);
}
free(conn_hash_hex);
if (config_test) {
dump_client_config(&options, host);