remove SM_FLAG_RESTART
authorLuke Howard <lukeh@padl.com>
Wed, 9 Mar 2011 15:46:02 +0000 (02:46 +1100)
committerLuke Howard <lukeh@padl.com>
Wed, 9 Mar 2011 15:46:02 +0000 (02:46 +1100)
accept_sec_context.c
init_sec_context.c
util.h
util_sm.c

index b9bdb80..03b5692 100644 (file)
@@ -970,7 +970,6 @@ eapGssSmAcceptGssReauth(OM_uint32 *minor,
         gssDeleteSecContext(&tmpMinor, &ctx->kerberosCtx, GSS_C_NO_BUFFER);
         ctx->flags &= ~(CTX_FLAG_KRB_REAUTH);
         GSSEAP_SM_TRANSITION(ctx, GSSEAP_STATE_INITIAL);
-        *smFlags |= SM_FLAG_RESTART;
         major = GSS_S_CONTINUE_NEEDED;
     }
 
index 0b06ffa..a837ec1 100644 (file)
@@ -580,7 +580,6 @@ eapGssSmInitIdentity(OM_uint32 *minor,
         gssDeleteSecContext(&tmpMinor, &ctx->kerberosCtx, GSS_C_NO_BUFFER);
         ctx->flags &= ~(CTX_FLAG_KRB_REAUTH);
         GSSEAP_SM_TRANSITION(ctx, GSSEAP_STATE_INITIAL);
-        *smFlags |= SM_FLAG_RESTART;
     } else {
         *smFlags |= SM_FLAG_FORCE_SEND_TOKEN;
     }
diff --git a/util.h b/util.h
index 4936222..6a6b912 100644 (file)
--- a/util.h
+++ b/util.h
@@ -578,11 +578,10 @@ struct gss_eap_sm {
 
 /* state machine flags, set by handler */
 #define SM_FLAG_FORCE_SEND_TOKEN            0x00000001  /* send token even if no inner tokens */
-#define SM_FLAG_RESTART                     0x00000002  /* restart state machine */
-#define SM_FLAG_OUTPUT_TOKEN_CRITICAL       0x00000004  /* output token is critical */
+#define SM_FLAG_OUTPUT_TOKEN_CRITICAL       0x00000002  /* output token is critical */
 
 /* state machine flags, set by state machine */
-#define SM_FLAG_INPUT_TOKEN_CRITICAL        0x40000000  /* input token was critical */
+#define SM_FLAG_INPUT_TOKEN_CRITICAL        0x10000000  /* input token was critical */
 
 #define SM_ITOK_FLAG_REQUIRED               0x00000001  /* received tokens must be present */
 
index 3a3e1f5..db28556 100644 (file)
--- a/util_sm.c
+++ b/util_sm.c
@@ -313,12 +313,10 @@ gssEapSmStep(OM_uint32 *minor,
 
             if (inputTokenType != NULL)
                 *inputTokenType |= ITOK_FLAG_VERIFIED;
-            if (smFlags & SM_FLAG_RESTART) {
-                assert(ctx->state < oldState);
-                i = 0;
-            } else if (ctx->state != oldState) {
+            if (ctx->state < oldState)
+                i = 0; /* restart */
+            else if (ctx->state != oldState)
                 smFlags |= SM_FLAG_TRANSITED;
-            }
 
             if (innerOutputToken.value != NULL) {
                 innerOutputTokens->elements[innerOutputTokens->count] = innerOutputToken;