projects
/
mech_eap.orig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
413ad31
)
force load of global dictionary in RADIUS attr provider initialisation
author
Luke Howard
<lukeh@padl.com>
Tue, 8 Mar 2011 13:29:40 +0000
(
00:29
+1100)
committer
Luke Howard
<lukeh@padl.com>
Tue, 8 Mar 2011 13:38:49 +0000
(
00:38
+1100)
util_radius.cpp
patch
|
blob
|
history
diff --git
a/util_radius.cpp
b/util_radius.cpp
index
9d9df42
..
fb62c43
100644
(file)
--- a/
util_radius.cpp
+++ b/
util_radius.cpp
@@
-446,9
+446,25
@@
gss_eap_radius_attr_provider::releaseAnyNameMapping(gss_buffer_t type_id,
bool
gss_eap_radius_attr_provider::init(void)
{
bool
gss_eap_radius_attr_provider::init(void)
{
+ struct rs_context *radContext;
+
gss_eap_attr_ctx::registerProvider(ATTR_TYPE_RADIUS,
"urn:ietf:params:gss-eap:radius-avp",
createAttrContext);
gss_eap_attr_ctx::registerProvider(ATTR_TYPE_RADIUS,
"urn:ietf:params:gss-eap:radius-avp",
createAttrContext);
+
+#if 1
+ /*
+ * This hack is necessary in order to force the loading of the global
+ * dictionary, otherwise accepting reauthentication tokens fails unless
+ * the acceptor has already accepted a normal authentication token.
+ */
+ if (rs_context_create(&radContext, RS_DICT_FILE) != 0) {
+ return false;
+ }
+
+ rs_context_destroy(radContext);
+#endif
+
return true;
}
return true;
}
@@
-710,6
+726,7
@@
avpImport(VALUE_PAIR **pVp,
fail:
if (vp != NULL)
pairbasicfree(vp);
fail:
if (vp != NULL)
pairbasicfree(vp);
+ *pVp = NULL;
return false;
}
return false;
}