From 6f8292ca20bddf1de23b9f525e54a3a674c46b8b Mon Sep 17 00:00:00 2001 From: "Richard E. Silverman" Date: Thu, 3 Apr 2025 22:09:11 -0400 Subject: [PATCH] Fix typo in AS-REQ client code Add a missing "else" to init_creds_step_request(). The mistake was harmless because optimistic preauth can only be present for the first step, and the other conditions can only be true after the state machine has processed an error reply. [ghudson@mit.edu: rewrote commit message] --- src/lib/krb5/krb/get_in_tkt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c index 4833255d99..4b2be41e75 100644 --- a/src/lib/krb5/krb/get_in_tkt.c +++ b/src/lib/krb5/krb/get_in_tkt.c @@ -1307,7 +1307,7 @@ init_creds_step_request(krb5_context context, krb5_clear_error_message(context); code = 0; } - } if (ctx->more_padata != NULL) { + } else if (ctx->more_padata != NULL) { /* Continuing after KDC_ERR_MORE_PREAUTH_DATA_REQUIRED. */ TRACE_INIT_CREDS_PREAUTH_MORE(context, ctx->selected_preauth_type); code = k5_preauth(context, ctx, ctx->more_padata, TRUE, -- 2.47.3