From: Luke Howard Date: Wed, 9 Mar 2011 15:46:02 +0000 (+1100) Subject: remove SM_FLAG_RESTART X-Git-Tag: vm/20110310~6 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=moonshot.git;a=commitdiff_plain;h=03dfe82ce36473000e74b57f825b5918901b3c66 remove SM_FLAG_RESTART --- diff --git a/mech_eap/accept_sec_context.c b/mech_eap/accept_sec_context.c index b9bdb80..03b5692 100644 --- a/mech_eap/accept_sec_context.c +++ b/mech_eap/accept_sec_context.c @@ -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; } diff --git a/mech_eap/init_sec_context.c b/mech_eap/init_sec_context.c index 0b06ffa..a837ec1 100644 --- a/mech_eap/init_sec_context.c +++ b/mech_eap/init_sec_context.c @@ -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/mech_eap/util.h b/mech_eap/util.h index 4936222..6a6b912 100644 --- a/mech_eap/util.h +++ b/mech_eap/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 */ diff --git a/mech_eap/util_sm.c b/mech_eap/util_sm.c index 3a3e1f5..db28556 100644 --- a/mech_eap/util_sm.c +++ b/mech_eap/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;