Fix macro errors in tlv
authorSam Hartman <hartmans@painless-security.com>
Fri, 11 Mar 2011 02:35:49 +0000 (21:35 -0500)
committerSam Hartman <hartmans@painless-security.com>
Fri, 11 Mar 2011 02:37:32 +0000 (21:37 -0500)
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
util.h

index a837ec1..bd97e35 100644 (file)
@@ -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 (file)
--- 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))))