Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssh merge changes.
details: https://anonhg.NetBSD.org/src/rev/59753a332d7c
branches: trunk
changeset: 750348:59753a332d7c
user: christos <christos%NetBSD.org@localhost>
date: Sun Dec 27 01:40:46 2009 +0000
description:
merge changes.
diffstat:
crypto/external/bsd/openssh/dist/auth-pam.c | 12 +-
crypto/external/bsd/openssh/dist/auth2-jpake.c | 7 +-
crypto/external/bsd/openssh/dist/auth2.c | 8 +-
crypto/external/bsd/openssh/dist/canohost.c | 30 +-
crypto/external/bsd/openssh/dist/canohost.h | 6 +-
crypto/external/bsd/openssh/dist/channels.c | 8 +-
crypto/external/bsd/openssh/dist/clientloop.c | 25 +-
crypto/external/bsd/openssh/dist/gss-genr.c | 5 +-
crypto/external/bsd/openssh/dist/jpake.c | 183 +---
crypto/external/bsd/openssh/dist/jpake.h | 40 +-
crypto/external/bsd/openssh/dist/kex.c | 8 +-
crypto/external/bsd/openssh/dist/kex.h | 6 +-
crypto/external/bsd/openssh/dist/kexdhs.c | 10 +-
crypto/external/bsd/openssh/dist/kexgexs.c | 10 +-
crypto/external/bsd/openssh/dist/monitor.c | 29 +-
crypto/external/bsd/openssh/dist/monitor_mm.c | 8 +-
crypto/external/bsd/openssh/dist/monitor_wrap.c | 43 +-
crypto/external/bsd/openssh/dist/monitor_wrap.h | 12 +-
crypto/external/bsd/openssh/dist/packet.c | 1003 ++++++++++++--------
crypto/external/bsd/openssh/dist/packet.h | 19 +-
crypto/external/bsd/openssh/dist/readconf.c | 16 +-
crypto/external/bsd/openssh/dist/readconf.h | 6 +-
crypto/external/bsd/openssh/dist/roaming_common.c | 10 +-
crypto/external/bsd/openssh/dist/schnorr.c | 378 ++++++-
crypto/external/bsd/openssh/dist/servconf.c | 8 +-
crypto/external/bsd/openssh/dist/serverloop.c | 16 +-
crypto/external/bsd/openssh/dist/session.c | 8 +-
crypto/external/bsd/openssh/dist/sftp-client.c | 8 +-
crypto/external/bsd/openssh/dist/sftp-server.8 | 8 +-
crypto/external/bsd/openssh/dist/sftp-server.c | 8 +-
crypto/external/bsd/openssh/dist/ssh-agent.1 | 8 +-
crypto/external/bsd/openssh/dist/ssh-agent.c | 11 +-
crypto/external/bsd/openssh/dist/ssh-keygen.c | 8 +-
crypto/external/bsd/openssh/dist/ssh.1 | 36 +-
crypto/external/bsd/openssh/dist/ssh.c | 25 +-
crypto/external/bsd/openssh/dist/sshconnect.c | 14 +-
crypto/external/bsd/openssh/dist/sshconnect.h | 6 +-
crypto/external/bsd/openssh/dist/sshconnect2.c | 7 +-
crypto/external/bsd/openssh/dist/sshd.8 | 8 +-
crypto/external/bsd/openssh/dist/sshd.c | 11 +-
crypto/external/bsd/openssh/dist/sshd_config.5 | 18 +-
crypto/external/bsd/openssh/dist/uuencode.c | 17 +-
crypto/external/bsd/openssh/dist/version.h | 8 +-
crypto/external/bsd/openssh/lib/Makefile | 4 +-
crypto/external/bsd/openssh/lib/shlib_version | 4 +-
45 files changed, 1223 insertions(+), 900 deletions(-)
diffs (truncated from 4362 to 300 lines):
diff -r 20401c3f3b72 -r 59753a332d7c crypto/external/bsd/openssh/dist/auth-pam.c
--- a/crypto/external/bsd/openssh/dist/auth-pam.c Sun Dec 27 01:37:17 2009 +0000
+++ b/crypto/external/bsd/openssh/dist/auth-pam.c Sun Dec 27 01:40:46 2009 +0000
@@ -50,7 +50,7 @@
/*
* NetBSD local changes
*/
-__RCSID("$NetBSD: auth-pam.c,v 1.1 2009/06/07 22:38:46 christos Exp $");
+__RCSID("$NetBSD: auth-pam.c,v 1.2 2009/12/27 01:40:46 christos Exp $");
#undef USE_POSIX_THREADS /* Not yet */
#define HAVE_SECURITY_PAM_APPL_H
#define HAVE_PAM_GETENVLIST
@@ -619,16 +619,16 @@
return;
debug("PAM: cleanup");
pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv);
+ if (sshpam_session_open) {
+ debug("PAM: closing session");
+ pam_close_session(sshpam_handle, PAM_SILENT);
+ sshpam_session_open = 0;
+ }
if (sshpam_cred_established) {
debug("PAM: deleting credentials");
pam_setcred(sshpam_handle, PAM_DELETE_CRED);
sshpam_cred_established = 0;
}
- if (sshpam_session_open) {
- debug("PAM: closing session");
- pam_close_session(sshpam_handle, PAM_SILENT);
- sshpam_session_open = 0;
- }
sshpam_authenticated = 0;
pam_end(sshpam_handle, sshpam_err);
sshpam_handle = NULL;
diff -r 20401c3f3b72 -r 59753a332d7c crypto/external/bsd/openssh/dist/auth2-jpake.c
--- a/crypto/external/bsd/openssh/dist/auth2-jpake.c Sun Dec 27 01:37:17 2009 +0000
+++ b/crypto/external/bsd/openssh/dist/auth2-jpake.c Sun Dec 27 01:40:46 2009 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: auth2-jpake.c,v 1.2 2009/06/07 22:38:46 christos Exp $ */
-/* $OpenBSD: auth2-jpake.c,v 1.2 2008/11/07 23:34:48 dtucker Exp $ */
+/* $NetBSD: auth2-jpake.c,v 1.3 2009/12/27 01:40:46 christos Exp $ */
+/* $OpenBSD: auth2-jpake.c,v 1.3 2009/03/05 07:18:19 djm Exp $ */
/*
* Copyright (c) 2008 Damien Miller. All rights reserved.
*
@@ -56,6 +56,7 @@
#endif
#include "monitor_wrap.h"
+#include "schnorr.h"
#include "jpake.h"
/*
@@ -360,7 +361,7 @@
}
/*
- * Being authentication attempt.
+ * Begin authentication attempt.
* Note, sets authctxt->postponed while in subprotocol
*/
static int
diff -r 20401c3f3b72 -r 59753a332d7c crypto/external/bsd/openssh/dist/auth2.c
--- a/crypto/external/bsd/openssh/dist/auth2.c Sun Dec 27 01:37:17 2009 +0000
+++ b/crypto/external/bsd/openssh/dist/auth2.c Sun Dec 27 01:40:46 2009 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: auth2.c,v 1.2 2009/06/07 22:38:46 christos Exp $ */
-/* $OpenBSD: auth2.c,v 1.120 2008/11/04 08:22:12 djm Exp $ */
+/* $NetBSD: auth2.c,v 1.3 2009/12/27 01:40:46 christos Exp $ */
+/* $OpenBSD: auth2.c,v 1.121 2009/06/22 05:39:28 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -25,15 +25,15 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: auth2.c,v 1.2 2009/06/07 22:38:46 christos Exp $");
+__RCSID("$NetBSD: auth2.c,v 1.3 2009/12/27 01:40:46 christos Exp $");
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/uio.h>
#include <fcntl.h>
#include <pwd.h>
+#include <stdarg.h>
#include <string.h>
-#include <stdarg.h>
#include <unistd.h>
#include "atomicio.h"
diff -r 20401c3f3b72 -r 59753a332d7c crypto/external/bsd/openssh/dist/canohost.c
--- a/crypto/external/bsd/openssh/dist/canohost.c Sun Dec 27 01:37:17 2009 +0000
+++ b/crypto/external/bsd/openssh/dist/canohost.c Sun Dec 27 01:40:46 2009 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: canohost.c,v 1.2 2009/06/07 22:38:46 christos Exp $ */
-/* $OpenBSD: canohost.c,v 1.64 2009/02/12 03:00:56 djm Exp $ */
+/* $NetBSD: canohost.c,v 1.3 2009/12/27 01:40:46 christos Exp $ */
+/* $OpenBSD: canohost.c,v 1.65 2009/05/27 06:31:25 andreas Exp $ */
/*
* Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
* Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -14,7 +14,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: canohost.c,v 1.2 2009/06/07 22:38:46 christos Exp $");
+__RCSID("$NetBSD: canohost.c,v 1.3 2009/12/27 01:40:46 christos Exp $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -36,6 +36,8 @@
#include "misc.h"
static void check_ip_options(int, char *);
+static char *canonical_host_ip = NULL;
+static int cached_port = -1;
/*
* Return the canonical name of the host at the other end of the socket. The
@@ -266,6 +268,16 @@
return get_socket_address(sock, 0, NI_NAMEREQD);
}
+void
+clear_cached_addr(void)
+{
+ if (canonical_host_ip != NULL) {
+ xfree(canonical_host_ip);
+ canonical_host_ip = NULL;
+ }
+ cached_port = -1;
+}
+
/*
* Returns the IP-address of the remote host as a string. The returned
* string must not be freed.
@@ -274,8 +286,6 @@
const char *
get_remote_ipaddr(void)
{
- static char *canonical_host_ip = NULL;
-
/* Check whether we have cached the ipaddr. */
if (canonical_host_ip == NULL) {
if (packet_connection_is_on_socket()) {
@@ -359,13 +369,11 @@
int
get_remote_port(void)
{
- static int port = -1;
+ /* Cache to avoid getpeername() on a dead connection */
+ if (cached_port == -1)
+ cached_port = get_port(0);
- /* Cache to avoid getpeername() on a dead connection */
- if (port == -1)
- port = get_port(0);
-
- return port;
+ return cached_port;
}
int
diff -r 20401c3f3b72 -r 59753a332d7c crypto/external/bsd/openssh/dist/canohost.h
--- a/crypto/external/bsd/openssh/dist/canohost.h Sun Dec 27 01:37:17 2009 +0000
+++ b/crypto/external/bsd/openssh/dist/canohost.h Sun Dec 27 01:40:46 2009 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: canohost.h,v 1.2 2009/06/07 22:38:46 christos Exp $ */
-/* $OpenBSD: canohost.h,v 1.10 2009/02/12 03:00:56 djm Exp $ */
+/* $NetBSD: canohost.h,v 1.3 2009/12/27 01:40:47 christos Exp $ */
+/* $OpenBSD: canohost.h,v 1.11 2009/05/27 06:31:25 andreas Exp $ */
/*
* Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
@@ -25,4 +25,4 @@
int get_remote_port(void);
int get_local_port(void);
int get_sock_port(int, int);
-
+void clear_cached_addr(void);
diff -r 20401c3f3b72 -r 59753a332d7c crypto/external/bsd/openssh/dist/channels.c
--- a/crypto/external/bsd/openssh/dist/channels.c Sun Dec 27 01:37:17 2009 +0000
+++ b/crypto/external/bsd/openssh/dist/channels.c Sun Dec 27 01:40:46 2009 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: channels.c,v 1.2 2009/06/07 22:38:46 christos Exp $ */
-/* $OpenBSD: channels.c,v 1.295 2009/02/12 03:00:56 djm Exp $ */
+/* $NetBSD: channels.c,v 1.3 2009/12/27 01:40:47 christos Exp $ */
+/* $OpenBSD: channels.c,v 1.296 2009/05/25 06:48:00 andreas Exp $ */
/*
* Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
* Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -41,7 +41,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: channels.c,v 1.2 2009/06/07 22:38:46 christos Exp $");
+__RCSID("$NetBSD: channels.c,v 1.3 2009/12/27 01:40:47 christos Exp $");
#include <sys/param.h>
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -2452,7 +2452,7 @@
int id;
/* Reset keepalive timeout */
- keep_alive_timeouts = 0;
+ packet_set_alive_timeouts(0);
id = packet_get_int();
packet_check_eom();
diff -r 20401c3f3b72 -r 59753a332d7c crypto/external/bsd/openssh/dist/clientloop.c
--- a/crypto/external/bsd/openssh/dist/clientloop.c Sun Dec 27 01:37:17 2009 +0000
+++ b/crypto/external/bsd/openssh/dist/clientloop.c Sun Dec 27 01:40:46 2009 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: clientloop.c,v 1.2 2009/06/07 22:38:46 christos Exp $ */
-/* $OpenBSD: clientloop.c,v 1.209 2009/02/12 03:00:56 djm Exp $ */
+/* $NetBSD: clientloop.c,v 1.3 2009/12/27 01:40:47 christos Exp $ */
+/* $OpenBSD: clientloop.c,v 1.213 2009/07/05 19:28:33 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
* Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -61,7 +61,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: clientloop.c,v 1.2 2009/06/07 22:38:46 christos Exp $");
+__RCSID("$NetBSD: clientloop.c,v 1.3 2009/12/27 01:40:47 christos Exp $");
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
@@ -103,6 +103,7 @@
#include "misc.h"
#include "match.h"
#include "msg.h"
+#include "roaming.h"
#include "getpeereid.h"
/* import options */
@@ -486,13 +487,13 @@
xfree(gc);
}
- keep_alive_timeouts = 0;
+ packet_set_alive_timeouts(0);
}
static void
server_alive_check(void)
{
- if (++keep_alive_timeouts > options.server_alive_count_max) {
+ if (packet_inc_alive_timeouts() > options.server_alive_count_max) {
logit("Timeout, server not responding.");
cleanup_exit(255);
}
@@ -629,7 +630,7 @@
static void
client_process_net_input(fd_set *readset)
{
- int len;
+ int len, cont = 0;
char buf[8192];
/*
@@ -638,8 +639,8 @@
*/
if (FD_ISSET(connection_in, readset)) {
/* Read as much as possible. */
- len = read(connection_in, buf, sizeof(buf));
- if (len == 0) {
+ len = roaming_read(connection_in, buf, sizeof(buf), &cont);
+ if (len == 0 && cont == 0) {
/*
* Received EOF. The remote host has closed the
* connection.
@@ -1468,6 +1469,14 @@
/* Stop watching for window change. */
signal(SIGWINCH, SIG_DFL);
+ if (compat20) {
+ packet_start(SSH2_MSG_DISCONNECT);
+ packet_put_int(SSH2_DISCONNECT_BY_APPLICATION);
+ packet_put_cstring("disconnected by user");
+ packet_send();
+ packet_write_wait();
+ }
+
channel_free_all();
if (have_pty)
diff -r 20401c3f3b72 -r 59753a332d7c crypto/external/bsd/openssh/dist/gss-genr.c
--- a/crypto/external/bsd/openssh/dist/gss-genr.c Sun Dec 27 01:37:17 2009 +0000
+++ b/crypto/external/bsd/openssh/dist/gss-genr.c Sun Dec 27 01:40:46 2009 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: gss-genr.c,v 1.2 2009/06/07 22:38:46 christos Exp $ */
-/* $OpenBSD: gss-genr.c,v 1.19 2007/06/12 11:56:15 dtucker Exp $ */
+/* $NetBSD: gss-genr.c,v 1.3 2009/12/27 01:40:47 christos Exp $ */
+/* $OpenBSD: gss-genr.c,v 1.20 2009/06/22 05:39:28 dtucker Exp $ */
/*
* Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
Home |
Main Index |
Thread Index |
Old Index