Browse Source

Merge pull request #9466 from RussWhitehead/PSM

HPCC-16808 SecLoader to better handle pluggable secmgr errors

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 years ago
parent
commit
bc5738f75f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      system/security/shared/secloader.hpp

+ 4 - 1
system/security/shared/secloader.hpp

@@ -67,7 +67,10 @@ public:
 
         //Call ISecManager instance factory and return the new instance
         DBGLOG("Calling '%s' in pluggable security manager '%s'", instFactory.str(), libName.str());
-        return xproc(bindingName, *secMgrCfg, *bindingCfg);
+        ISecManager* pPSM = xproc(bindingName, *secMgrCfg, *bindingCfg);
+        if (pPSM == nullptr)
+            throw MakeStringException(-1, "%s Security Manager %s failed to instantiate in call to %s", lsm, libName.str(), instFactory.str());
+        return pPSM;
     }
 
     static ISecManager* loadSecManager(const char* model_name, const char* servicename, IPropertyTree* cfg)