]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordtucker@openbsd.org <dtucker@openbsd.org>
Thu, 22 Sep 2016 02:29:57 +0000 (02:29 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 23 Sep 2016 19:38:04 +0000 (05:38 +1000)
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

sshconnect2.c

index fae8b0f2c08fc2a53be7c5983d3230886c276589..5e7d07dc5e65129759c02cb454d50513f496c480 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.247 2016/07/22 05:46:11 dtucker Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.248 2016/09/22 02:29:57 dtucker Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Damien Miller.  All rights reserved.
@@ -404,6 +404,8 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
        pubkey_cleanup(&authctxt);
        ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL);
 
+       if (!authctxt.success)
+               fatal("Authentication failed.");
        debug("Authentication succeeded (%s).", authctxt.method->name);
 }