summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2013-03-05 20:16:10 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2013-03-05 20:16:10 +0000
commitd835c009dbe12e82214f777d7686cf228fa4370b (patch)
tree4219777012f207cb45507a48c47b924a4f1225bd /usr.bin/ssh
parent28061957c0c401c17a8126bed004e054470ad93b (diff)
reset pubkey order on partial success; ok djm@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/sshconnect2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 3aa719806c4..e24adc83f53 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.192 2013/02/17 23:16:57 dtucker Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.193 2013/03/05 20:16:09 markus Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -534,8 +534,12 @@ input_userauth_failure(int type, u_int32_t seq, void *ctxt)
partial = packet_get_char();
packet_check_eom();
- if (partial != 0)
+ if (partial != 0) {
logit("Authenticated with partial success.");
+ /* reset state */
+ pubkey_cleanup(authctxt);
+ pubkey_prepare(authctxt);
+ }
debug("Authentications that can continue: %s", authlist);
userauth(authctxt, authlist);