projects
/
moonshot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'windows'
[moonshot.git]
/
moonshot
/
mech_eap
/
util_context.c
diff --git
a/moonshot/mech_eap/util_context.c
b/moonshot/mech_eap/util_context.c
index
32ca195
..
78c3636
100644
(file)
--- a/
moonshot/mech_eap/util_context.c
+++ b/
moonshot/mech_eap/util_context.c
@@
-52,7
+52,7
@@
gssEapAllocContext(OM_uint32 *minor,
}
if (GSSEAP_MUTEX_INIT(&ctx->mutex) != 0) {
}
if (GSSEAP_MUTEX_INIT(&ctx->mutex) != 0) {
- *minor =
errno
;
+ *minor =
GSSEAP_GET_LAST_ERROR()
;
gssEapReleaseContext(&tmpMinor, &ctx);
return GSS_S_FAILURE;
}
gssEapReleaseContext(&tmpMinor, &ctx);
return GSS_S_FAILURE;
}
@@
-84,6
+84,7
@@
releaseInitiatorContext(struct gss_eap_initiator_ctx *ctx)
eap_peer_sm_deinit(ctx->eap);
}
eap_peer_sm_deinit(ctx->eap);
}
+#ifdef GSSEAP_ENABLE_ACCEPTOR
static void
releaseAcceptorContext(struct gss_eap_acceptor_ctx *ctx)
{
static void
releaseAcceptorContext(struct gss_eap_acceptor_ctx *ctx)
{
@@
-99,6
+100,7
@@
releaseAcceptorContext(struct gss_eap_acceptor_ctx *ctx)
if (ctx->vps != NULL)
gssEapRadiusFreeAvps(&tmpMinor, &ctx->vps);
}
if (ctx->vps != NULL)
gssEapRadiusFreeAvps(&tmpMinor, &ctx->vps);
}
+#endif /* GSSEAP_ENABLE_ACCEPTOR */
OM_uint32
gssEapReleaseContext(OM_uint32 *minor,
OM_uint32
gssEapReleaseContext(OM_uint32 *minor,
@@
-118,12
+120,15
@@
gssEapReleaseContext(OM_uint32 *minor,
if (ctx->flags & CTX_FLAG_KRB_REAUTH) {
gssDeleteSecContext(&tmpMinor, &ctx->reauthCtx, GSS_C_NO_BUFFER);
} else
if (ctx->flags & CTX_FLAG_KRB_REAUTH) {
gssDeleteSecContext(&tmpMinor, &ctx->reauthCtx, GSS_C_NO_BUFFER);
} else
-#endif
+#endif
/* GSSEAP_ENABLE_REAUTH */
if (CTX_IS_INITIATOR(ctx)) {
releaseInitiatorContext(&ctx->initiatorCtx);
if (CTX_IS_INITIATOR(ctx)) {
releaseInitiatorContext(&ctx->initiatorCtx);
- } else {
+ }
+#ifdef GSSEAP_ENABLE_ACCEPTOR
+ else {
releaseAcceptorContext(&ctx->acceptorCtx);
}
releaseAcceptorContext(&ctx->acceptorCtx);
}
+#endif /* GSSEAP_ENABLE_ACCEPTOR */
krb5_free_keyblock_contents(krbContext, &ctx->rfc3961Key);
gssEapReleaseName(&tmpMinor, &ctx->initiatorName);
krb5_free_keyblock_contents(krbContext, &ctx->rfc3961Key);
gssEapReleaseName(&tmpMinor, &ctx->initiatorName);