]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix IAKERB realm discovery state machine logic 1479/head
authorAndreas Schneider <asn@cryptomilk.org>
Fri, 23 Jan 2026 15:32:57 +0000 (16:32 +0100)
committerGreg Hudson <ghudson@mit.edu>
Tue, 27 Jan 2026 21:27:47 +0000 (16:27 -0500)
In iakerb_initiator_step(), when realm discovery completes, set the
state to IAKERB_AS_REQ so we don't repeat the overwrite of
cred->name->princ->realm on the next token.

ticket: 9194 (new)
tags: pullup
target_version: 1.22-next

src/lib/gssapi/krb5/iakerb.c

index 90a9bce11ad70b784a0f9e91bd13a0e7e79b0627..7cc4710e25d3809cfa5e414c5dbb132104034915 100644 (file)
@@ -631,6 +631,7 @@ iakerb_initiator_step(iakerb_ctx_id_t ctx,
         cred->name->princ->realm = server_realm;
         server_realm = empty_data();
 
+        ctx->state = IAKERB_AS_REQ;
         /* Done with realm discovery; fall through to AS request. */
     case IAKERB_AS_REQ:
         if (ctx->icc == NULL) {