/* Don't continue after a keyboard interrupt. */
if (code == KRB5_LIBOS_PWDINTR)
goto cleanup;
- /* Don't continue if fallback is disabled. */
- if (code && ctx->fallback_disabled)
- goto cleanup;
if (code) {
/* See if we can try a different preauth mech before giving up. */
k5_save_ctx_error(context, code, &save);
krb5_enctype etype;
krb5_boolean info_pa_permitted;
krb5_boolean restarted;
- krb5_boolean fallback_disabled;
krb5_boolean encts_disabled;
struct krb5_responder_context_st rctx;
+ krb5_preauthtype current_preauth_type;
krb5_preauthtype selected_preauth_type;
krb5_preauthtype allowed_preauth_type;
k5_json_object cc_config_in;
static void
disable_fallback(krb5_context context, krb5_clpreauth_rock rock)
{
- ((krb5_init_creds_context)rock)->fallback_disabled = TRUE;
+ krb5_init_creds_context ctx = (krb5_init_creds_context)rock;
+
+ ctx->allowed_preauth_type = ctx->current_preauth_type;
}
static struct krb5_clpreauth_callbacks_st callbacks = {
if (real && previously_failed(ctx, pa->pa_type))
continue;
mod_pa = NULL;
+ ctx->current_preauth_type = pa->pa_type;
ret = clpreauth_process(context, h, modreq, ctx->opt, &callbacks,
(krb5_clpreauth_rock)ctx, ctx->request,
ctx->inner_request_body,
if (h == NULL)
return KRB5KRB_ERR_GENERIC;
mod_pa = NULL;
+ ctx->current_preauth_type = pa_type;
ret = clpreauth_tryagain(context, h, modreq, ctx->opt, &callbacks,
(krb5_clpreauth_rock)ctx, ctx->request,
ctx->inner_request_body,
h = find_module(context, ctx, pa->pa_type, &modreq);
if (h == NULL)
continue;
+ ctx->current_preauth_type = pa->pa_type;
ret = clpreauth_prep_questions(context, h, modreq, ctx->opt,
&callbacks, (krb5_clpreauth_rock)ctx,
ctx->request, ctx->inner_request_body,