summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2016-09-22 02:29:57 +0000
committerDamien Miller <djm@mindrot.org>2016-09-24 05:38:04 +1000
commitf31c654b30a6f02ce0b8ea8ab81791b675489628 (patch)
tree110ffeed4707055a4142dbbb80e0589d123bffdf /sshconnect2.c
parent1622649b7a829fc8dc313042a43a974f0f3e8a99 (diff)
upstream commit
If ssh receives a PACKET_DISCONNECT during userauth it will cause ssh_dispatch_run(DISPATCH_BLOCK, ...) to return without the session being authenticated. Check for this and exit if necessary. ok djm@ Upstream-ID: b3afe126c0839d2eae6cddd41ff2ba317eda0903
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index fae8b0f2c..5e7d07dc5 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.247 2016/07/22 05:46:11 dtucker Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.248 2016/09/22 02:29:57 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -404,6 +404,8 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
404 pubkey_cleanup(&authctxt); 404 pubkey_cleanup(&authctxt);
405 ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL); 405 ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL);
406 406
407 if (!authctxt.success)
408 fatal("Authentication failed.");
407 debug("Authentication succeeded (%s).", authctxt.method->name); 409 debug("Authentication succeeded (%s).", authctxt.method->name);
408} 410}
409 411