View | Details | Raw Unified | Return to bug 2642 | Differences between
and this patch

Collapse All | Expand All

(-)a/sshconnect2.c (-2 / +12 lines)
Lines 318-323 void userauth(Authctxt *, char *); Link Here
318
static int sign_and_send_pubkey(Authctxt *, Identity *);
318
static int sign_and_send_pubkey(Authctxt *, Identity *);
319
static void pubkey_prepare(Authctxt *);
319
static void pubkey_prepare(Authctxt *);
320
static void pubkey_cleanup(Authctxt *);
320
static void pubkey_cleanup(Authctxt *);
321
static void pubkey_reset(Authctxt *);
321
static Key *load_identity_file(Identity *);
322
static Key *load_identity_file(Identity *);
322
323
323
static Authmethod *authmethod_get(char *authlist);
324
static Authmethod *authmethod_get(char *authlist);
Lines 560-567 input_userauth_failure(int type, u_int32_t seq, void *ctxt) Link Here
560
	if (partial != 0) {
561
	if (partial != 0) {
561
		verbose("Authenticated with partial success.");
562
		verbose("Authenticated with partial success.");
562
		/* reset state */
563
		/* reset state */
563
		pubkey_cleanup(authctxt);
564
		pubkey_reset(authctxt);
564
		pubkey_prepare(authctxt);
565
	}
565
	}
566
	debug("Authentications that can continue: %s", authlist);
566
	debug("Authentications that can continue: %s", authlist);
567
567
Lines 1414-1419 pubkey_cleanup(Authctxt *authctxt) Link Here
1414
	}
1414
	}
1415
}
1415
}
1416
1416
1417
static void
1418
pubkey_reset(Authctxt *authctxt)
1419
{
1420
	Identity *id;
1421
1422
	TAILQ_FOREACH(id, &authctxt->keys, next)
1423
		id->tried = 0;
1424
}
1425
1417
static int
1426
static int
1418
try_identity(Identity *id)
1427
try_identity(Identity *id)
1419
{
1428
{
Lines 1462-1467 userauth_pubkey(Authctxt *authctxt) Link Here
1462
				}
1471
				}
1463
				key_free(id->key);
1472
				key_free(id->key);
1464
				id->key = NULL;
1473
				id->key = NULL;
1474
				id->isprivate = 0;
1465
			}
1475
			}
1466
		}
1476
		}
1467
		if (sent)
1477
		if (sent)

Return to bug 2642