Allow Shibboleth initialization failure to be non-fatal
authorLuke Howard <lukeh@padl.com>
Tue, 29 Mar 2011 00:25:32 +0000 (11:25 +1100)
committerLuke Howard <lukeh@padl.com>
Tue, 29 Mar 2011 00:25:32 +0000 (11:25 +1100)
mech_eap/util_attr.cpp

index 282d3ac..9868958 100644 (file)
@@ -55,11 +55,17 @@ gssEapAttrProvidersInitInternal(void)
     assert(gssEapAttrProvidersInitStatus == GSS_S_UNAVAILABLE);
 
     major = gssEapRadiusAttrProviderInit(&minor);
-    if (major == GSS_S_COMPLETE)
-        major = gssEapSamlAttrProvidersInit(&minor);
-    if (major == GSS_S_COMPLETE)
-        major = gssEapLocalAttrProviderInit(&minor);
+    if (GSS_ERROR(major))
+        goto cleanup;
 
+    major = gssEapSamlAttrProvidersInit(&minor);
+    if (GSS_ERROR(major))
+        goto cleanup;
+
+    /* Allow Shibboleth initialization failure to be non-fatal */
+    gssEapLocalAttrProviderInit(&minor);
+
+cleanup:
 #ifdef GSSEAP_DEBUG
     assert(major == GSS_S_COMPLETE);
 #endif