Skip to content

Commit

Permalink
Remove sent_nontrivial_preauth field
Browse files Browse the repository at this point in the history
In krb5_init_creds_context, the selected_preauth_type field subsumes
the need for sent_nontrivial_preauth.  Use it instead.
  • Loading branch information
greghudson committed Feb 2, 2017
1 parent 27628e5 commit 5fef7aa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions src/lib/krb5/krb/get_in_tkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1377,8 +1377,6 @@ init_creds_step_request(krb5_context context,
krb5_free_data(context, ctx->encoded_previous_request);
ctx->encoded_previous_request = NULL;
}
if (ctx->request->padata)
ctx->sent_nontrivial_preauth = TRUE;
if (ctx->enc_pa_rep_permitted) {
code = add_padata(&ctx->request->padata, KRB5_ENCPADATA_REQ_ENC_PA_REP,
NULL, 0);
Expand Down Expand Up @@ -1503,7 +1501,7 @@ init_creds_step_reply(krb5_context context,
ctx->restarted = TRUE;
code = restart_init_creds_loop(context, ctx, TRUE);
} else if (!ctx->restarted && reply_code == KDC_ERR_PREAUTH_FAILED &&
!ctx->sent_nontrivial_preauth) {
ctx->selected_preauth_type == KRB5_PADATA_NONE) {
/* The KDC didn't like our informational padata (probably a pre-1.7
* MIT krb5 KDC). Retry without it. */
ctx->enc_pa_rep_permitted = FALSE;
Expand Down Expand Up @@ -1543,7 +1541,6 @@ init_creds_step_reply(krb5_context context,
goto cleanup;
/* Reset per-realm negotiation state. */
ctx->restarted = FALSE;
ctx->sent_nontrivial_preauth = FALSE;
ctx->enc_pa_rep_permitted = TRUE;
code = restart_init_creds_loop(context, ctx, FALSE);
} else {
Expand Down
1 change: 0 additions & 1 deletion src/lib/krb5/krb/init_creds_ctx.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ struct _krb5_init_creds_context {
krb5_enctype etype;
krb5_boolean enc_pa_rep_permitted;
krb5_boolean restarted;
krb5_boolean sent_nontrivial_preauth;
krb5_boolean preauth_required;
struct krb5_responder_context_st rctx;
krb5_preauthtype selected_preauth_type;
Expand Down

0 comments on commit 5fef7aa

Please sign in to comment.