]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix typo in AS-REQ client code
authorRichard E. Silverman <res@qoxp.net>
Fri, 4 Apr 2025 02:09:11 +0000 (22:09 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 8 Apr 2025 20:25:42 +0000 (16:25 -0400)
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

index 4833255d9997c829b463aaf75ac48569da571928..4b2be41e75d36b27ae0f13db0fa7d599c4faa5e1 100644 (file)
@@ -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,