From 2171304fc8cff4ca867d1d948e3555f2424818d0 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Mon, 16 May 2011 10:05:20 +0200 Subject: [PATCH] catch exceptions initialising Shibboleth --- moonshot/mech_eap/util_shib.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/moonshot/mech_eap/util_shib.cpp b/moonshot/mech_eap/util_shib.cpp index b01bf7b..15a8b44 100644 --- a/moonshot/mech_eap/util_shib.cpp +++ b/moonshot/mech_eap/util_shib.cpp @@ -434,13 +434,18 @@ gss_eap_shib_attr_provider::initWithJsonObject(const gss_eap_attr_ctx *ctx, bool gss_eap_shib_attr_provider::init(void) { - if (SPConfig::getConfig().getFeatures() == 0 && - ShibbolethResolver::init() == false) - return false; + bool ret = false; - gss_eap_attr_ctx::registerProvider(ATTR_TYPE_LOCAL, createAttrContext); + try { + if (SPConfig::getConfig().getFeatures() == 0) + ret = ShibbolethResolver::init(); + } catch (exception &e) { + } - return true; + if (ret) + gss_eap_attr_ctx::registerProvider(ATTR_TYPE_LOCAL, createAttrContext); + + return ret; } void -- 2.1.4