From 5adee90944cb5124bfb3df6faaf2b79308dffc26 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Thu, 10 Mar 2011 21:35:49 -0500 Subject: [PATCH] Fix macro errors in tlv util.h: state cannot be a macro argument and a referenced structure member init_sec_context.c: do not reference Kerberos context if reauth not enabled --- init_sec_context.c | 2 ++ util.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/init_sec_context.c b/init_sec_context.c index a837ec1..bd97e35 100644 --- a/init_sec_context.c +++ b/init_sec_context.c @@ -577,7 +577,9 @@ eapGssSmInitIdentity(OM_uint32 *minor, OM_uint32 tmpMinor; /* server didn't support reauthentication, sent EAP request */ +#ifdef GSSEAP_ENABLE_REAUTH gssDeleteSecContext(&tmpMinor, &ctx->kerberosCtx, GSS_C_NO_BUFFER); +#endif ctx->flags &= ~(CTX_FLAG_KRB_REAUTH); GSSEAP_SM_TRANSITION(ctx, GSSEAP_STATE_INITIAL); } else { diff --git a/util.h b/util.h index 2a3f66e..e719243 100644 --- a/util.h +++ b/util.h @@ -553,7 +553,7 @@ enum gss_eap_state { void gssEapSmTransition(gss_ctx_id_t ctx, enum gss_eap_state state); #define GSSEAP_SM_TRANSITION(ctx, state) gssEapSmTransition((ctx), (state)) #else -#define GSSEAP_SM_TRANSITION(ctx, state) do { (ctx)->state = (state); } while (0) +#define GSSEAP_SM_TRANSITION(ctx, newstate) do { (ctx)->state = (newstate); } while (0) #endif #define GSSEAP_SM_TRANSITION_NEXT(ctx) GSSEAP_SM_TRANSITION((ctx), GSSEAP_STATE_NEXT(GSSEAP_SM_STATE((ctx)))) -- 2.1.4