Bläddra i källkod

Merge pull request #1969 from hpcc-systems/candidate-3.6.x

Merge latest 3.6.x fixes back into master

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 13 år sedan
förälder
incheckning
d46cf2aa37

+ 2 - 0
cmake_modules/commonSetup.cmake

@@ -282,6 +282,8 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
         ELSE()
           message(FATAL_ERROR "OPENLDAP requested but package not found")
         ENDIF()
+      ELSE()
+        add_definitions (-D_NO_LDAP)
       ENDIF(USE_OPENLDAP)
 
       IF (USE_CPPUNIT)

+ 3 - 3
dali/server/CMakeLists.txt

@@ -43,7 +43,6 @@ include_directories (
          ${CMAKE_BINARY_DIR}
          ${CMAKE_BINARY_DIR}/oss
     )
-
 ADD_DEFINITIONS( -D_CONSOLE )
 
 if (WIN32)
@@ -58,10 +57,11 @@ add_executable ( daserver ${SRCS} )
 install ( TARGETS daserver DESTINATION ${OSSDIR}/bin)
 target_link_libraries ( daserver 
          jlib
-         LdapSecurity 
          mp 
          hrpc 
          remote 
          dalibase 
     )
-
+IF (USE_OPENLDAP)
+target_link_libraries ( daserver LdapSecurity )
+ENDIF(USE_OPENLDAP)

+ 64 - 6
deployment/deployutils/deployutils.cpp

@@ -1770,13 +1770,70 @@ bool generateHeadersFromXsd(IPropertyTree* pEnv, const char* xsdName, const char
   return obj.generateHeaders();
 }
 
-IPropertyTree* generateTreeFromXsd(const IPropertyTree* pEnv, IPropertyTree* pSchema, const char* compName, bool allSubTypes, bool wizFlag, CWizardInputs* pWInputs, bool genOptional)
+IPropertyTree* generateTreeFromXsd(const IPropertyTree* pEnv, IPropertyTree* pSchema,
+                                   const char* compName, const char* buildSetName,
+                                   const IPropertyTree* pCfg, const char* servicename,
+                                   bool allSubTypes, bool wizFlag, CWizardInputs* pWInputs,
+                                   bool forceOptional)
 {
+  bool flag = true;
+
+  if (!forceOptional)
+  {
+    StringBuffer xpath, genEnvConf, prop;
+    Owned<IProperties> algProp;
+    xpath.clear().appendf("Software/EspProcess/EspService[@name='%s']/LocalConfFile", servicename);
+    const char* pConfFile = pCfg->queryProp(xpath.str());
+    xpath.clear().appendf("Software/EspProcess/EspService[@name='%s']/LocalEnvConfFile", servicename);
+    const char* pEnvConfFile = pCfg->queryProp(xpath.str());
+
+    if (pConfFile && *pConfFile && pEnvConfFile && *pEnvConfFile)
+    {
+      Owned<IProperties> pParams = createProperties(pConfFile);
+      Owned<IProperties> pEnvParams = createProperties(pEnvConfFile);
+      const char* genenv = pParams->queryProp("wizardalgorithm");
+
+      if (!genenv || !*genenv)
+        genenv = "genenvrules.conf";
+
+      const char* cfgpath = pEnvParams->queryProp("configs");
+
+      if (!cfgpath || !*cfgpath)
+        cfgpath = CONFIG_DIR;
+
+      genEnvConf.clear().append(cfgpath);
+
+      if (genEnvConf.charAt(genEnvConf.length() - 1) != PATHSEPCHAR)
+        genEnvConf.append(PATHSEPCHAR);
+
+      genEnvConf.append(genenv);
+    }
+
+    if (genEnvConf.length() && checkFileExists(genEnvConf.str()))
+      algProp.setown(createProperties(genEnvConf.str()));
+
+    enum GenOptional {GENOPTIONAL_ALL, GENOPTIONAL_NONE, GENOPTIONAL_COMPS};
+    GenOptional genOpt = GENOPTIONAL_COMPS;
+    algProp->getProp("do_not_gen_optional", prop);
+    StringArray doNotGenOpt;
+    DelimToStringArray(prop.str(), doNotGenOpt, ",");
+
+    if (doNotGenOpt.length() == 0)
+      genOpt = GENOPTIONAL_ALL;
+    else if (doNotGenOpt.length() == 1 && !strcmp(doNotGenOpt.item(0), "all"))
+      genOpt = GENOPTIONAL_NONE;
+
+    if (genOpt == GENOPTIONAL_ALL || (genOpt == GENOPTIONAL_COMPS && doNotGenOpt.find(buildSetName) == NotFound ))
+      flag = true;
+    else if (genOpt == GENOPTIONAL_NONE || (genOpt == GENOPTIONAL_COMPS && doNotGenOpt.find(buildSetName) != NotFound ))
+      flag = false;
+  }
+
   Owned<IPropertyTree> pCompTree(createPTree(compName));
   CGenerateJSFromXSD obj(pEnv, pSchema, "", compName);
   obj.setCompTree(pCompTree, allSubTypes);
   obj.setWizardFlag(wizFlag);
-  obj.setGenerateOptional(genOptional);
+  obj.setGenerateOptional(flag);
   obj.setWizard(pWInputs);
   obj.generateHeaders();
   return pCompTree.getLink();
@@ -3452,7 +3509,8 @@ void mergeAttributes(IPropertyTree* pTo, IPropertyTree* pFrom)
   }
 }
 
-void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, StringBuffer& sbNewName, IConstEnvironment* pEnvironment)
+void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, StringBuffer& sbNewName, IConstEnvironment* pEnvironment,
+                              const IPropertyTree* pCfg, const char* serviceName)
 {
   Owned<IPropertyTree> pBindings = createPTreeFromXMLString(xmlArg && *xmlArg ? xmlArg : "<EspServiceBindings/>");
   const char* type = pBindings->queryProp(XML_ATTR_TYPE);
@@ -3506,7 +3564,7 @@ void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, Strin
     }
 
     IPropertyTree* pEspService = pEnvRoot->queryPropTree(xpath.str());  
-    IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+    IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, pCfg, serviceName);
 
     StringBuffer sb(type);
 
@@ -3531,7 +3589,7 @@ void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, Strin
   if (!flag)
   {
     IPropertyTree* pEspService = pEnvRoot->queryPropTree(xpath.str());  
-    IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+    IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, pCfg, serviceName);
     StringBuffer sbNewName(XML_TAG_ESPBINDING);
     xpath.clear().appendf("%s[@name='%s']/EspBinding", processName, espName);
 
@@ -3666,4 +3724,4 @@ bool validateEnv(IConstEnvironment* pConstEnv, bool abortOnException)
   }
 
   return true;
-}
+}

+ 6 - 3
deployment/deployutils/deployutils.hpp

@@ -54,8 +54,10 @@ extern DEPLOYUTILS_API bool generateHeaderForTopology(const IPropertyTree* pEnv,
 extern DEPLOYUTILS_API bool generateHeadersForEnvSettings(const IPropertyTree* pEnv, StringBuffer& sbDefn, bool writeOut = false);
 extern DEPLOYUTILS_API bool generateHeadersForEnvXmlView(const IPropertyTree* pEnv, StringBuffer& sbDefn, bool writeOut = false);
 extern DEPLOYUTILS_API bool getComputersListWithUsage(const IPropertyTree* pEnv, StringBuffer& sbComputers, StringBuffer& sbFilter);
-extern DEPLOYUTILS_API IPropertyTree* generateTreeFromXsd(const IPropertyTree* pEnv, IPropertyTree* pSchema, const char* compName, bool allSubTypes = true, 
-                                                          bool cloudFlag = false, CWizardInputs* pWInputs = NULL, bool genOptional = true);
+extern DEPLOYUTILS_API IPropertyTree* generateTreeFromXsd(const IPropertyTree* pEnv, IPropertyTree* pSchema, const char* compName,
+                                                          const char* buildSetName, const IPropertyTree* pCfg, const char* servicename,
+                                                          bool allSubTypes = true, bool cloudFlag = false, CWizardInputs* pWInputs = NULL,
+                                                          bool forceOptional=false);
 extern DEPLOYUTILS_API bool checkComponentReferences(const IPropertyTree* pEnv, IPropertyTree* pCompNode, const char* compName, StringBuffer& sMsg, const char* szNewName=NULL);
 extern DEPLOYUTILS_API bool generateHeaderForComponent(const IPropertyTree* pEnv, IPropertyTree* pSchema, const char* compName);
 extern DEPLOYUTILS_API const char* getUniqueName(const IPropertyTree* pEnv, StringBuffer& sName, const char* xpath, const char* category);
@@ -81,7 +83,8 @@ extern DEPLOYUTILS_API void runScript(StringBuffer& output, StringBuffer& errMsg
 extern DEPLOYUTILS_API bool validateIPS(const char* ipAddressList);
 extern DEPLOYUTILS_API void getSummary(const IPropertyTree* pEnvRoot, StringBuffer& respXmlStr , bool prepareLink);
 extern DEPLOYUTILS_API void mergeAttributes(IPropertyTree* pTo, IPropertyTree* pFrom);
-extern DEPLOYUTILS_API void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, StringBuffer& sbNewName, IConstEnvironment* pConstEnv);
+extern DEPLOYUTILS_API void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, StringBuffer& sbNewName, IConstEnvironment* pConstEnvconst,
+                                                     const IPropertyTree* pCfg, const char* serviceName);
 extern DEPLOYUTILS_API bool updateDirsWithConfSettings(IPropertyTree* pEnvRoot, IProperties* pParams, bool ovrLog = true, bool ovrRun = true);
 extern DEPLOYUTILS_API bool validateEnv(IConstEnvironment* pConstEnv, bool abortOnException = true);
 #endif

+ 5 - 31
deployment/deployutils/wizardInputs.cpp

@@ -152,7 +152,6 @@ void CWizardInputs::setWizardRules()
    m_roxieAgentRedType.clear().append("Circular");
    m_roxieAgentRedChannels = 2;
    m_roxieAgentRedOffset = 1;
-   m_genOptForAllComps = GENOPTIONAL_ALL;
 
    if(m_algProp)
    {
@@ -204,16 +203,6 @@ void CWizardInputs::setWizardRules()
           DelimToStringArray(prop.str(), m_doNotGenComp, ",");
        else if(!strcmp (iter->getPropKey(),"comps_on_all_nodes"))
           DelimToStringArray(prop.str(), m_compOnAllNodes, ",");
-       else if(!strcmp (iter->getPropKey(),"do_not_gen_optional"))
-       {
-          DelimToStringArray(prop.str(), m_doNotGenOptOnComps, ",");
-          if (m_doNotGenOptOnComps.length() == 0)
-            m_genOptForAllComps = GENOPTIONAL_ALL;
-          else if (m_doNotGenOptOnComps.length() == 1 && !strcmp(m_doNotGenOptOnComps.item(0), "all"))
-            m_genOptForAllComps = GENOPTIONAL_NONE;
-          else
-            m_genOptForAllComps = GENOPTIONAL_COMPS;
-       }
        else if(!strcmp(iter->getPropKey(), "topology_for_comps"))
         DelimToStringArray(prop.str(), m_clusterForTopology, ",");
        else if (!strcmp(iter->getPropKey(), "roxie_agent_redundancy"))
@@ -607,7 +596,7 @@ void CWizardInputs::getDefaultsForWizard(IPropertyTree* pNewEnvTree)
   Owned<IPropertyTree> pBuildTree = createPTreeFromIPT(pNewEnvTree->queryPropTree("./"XML_TAG_PROGRAMS));
   xpath.clear().appendf("./%s/%s/", XML_TAG_BUILD, XML_TAG_BUILDSET);
   Owned<IPropertyTreeIterator> buildSetInsts = pBuildTree->getElements(xpath.str());
-  bool genOptional = true;
+
   ForEach(*buildSetInsts)
   {
     IPropertyTree* pBuildSet = &buildSetInsts->query();
@@ -619,12 +608,7 @@ void CWizardInputs::getDefaultsForWizard(IPropertyTree* pNewEnvTree)
     {
       Owned<IPropertyTree> pSchema = loadSchema(pBuildTree->queryPropTree("./"XML_TAG_BUILD"[1]"), pBuildSet, buildSetPath, NULL);
 
-      if (m_genOptForAllComps == GENOPTIONAL_ALL || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) == NotFound ))
-        genOptional = true;
-      else if (m_genOptForAllComps == GENOPTIONAL_NONE || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) != NotFound ))
-        genOptional = false;
-
-      Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, true, true, this, genOptional);
+      Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, buildSetName, m_cfg, m_service.str(), true, true, this);
       xpath.clear().appendf("./%s/%s/[%s=\"%s\"]", XML_TAG_SOFTWARE, processName, XML_ATTR_BUILDSET, buildSetName);
       IPropertyTree* pSWCompTree = pNewEnvTree->queryPropTree(xpath.str());
 
@@ -868,7 +852,6 @@ void CWizardInputs::getEspBindingInformation(IPropertyTree* pNewEnvTree)
      compName.clear().append(pEspProcess->queryProp(XML_ATTR_NAME));
      xpath.clear().appendf("./%s/%s/%s[@processName=\"%s\"]", XML_TAG_PROGRAMS, XML_TAG_BUILD, XML_TAG_BUILDSET, XML_TAG_ESPSERVICE);
      Owned<IPropertyTreeIterator> espServiceIter = pNewEnvTree->getElements(xpath.str());
-     bool genOptional = true;
        
      ForEach (*espServiceIter)
      {
@@ -889,16 +872,12 @@ void CWizardInputs::getEspBindingInformation(IPropertyTree* pNewEnvTree)
 
            const char* buildSetName = pEspService->queryProp(XML_ATTR_NAME);
            const char* processName = pEspService->queryProp(XML_ATTR_PROCESS_NAME);
-           if (m_genOptForAllComps == GENOPTIONAL_ALL || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) == NotFound ))
-             genOptional = true;
-           else if (m_genOptForAllComps == GENOPTIONAL_NONE || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) != NotFound ))
-             genOptional = false;
 
            StringBuffer buildSetPath;
            Owned<IPropertyTree> pSchema = loadSchema(pNewEnvTree->queryPropTree("./Programs/Build[1]"), pEspService, buildSetPath, NULL);
 
            xmlArg.clear().appendf("<EspServiceBindings type=\"EspBinding\" compName=\"%s\" > <Item name=\"%s\" params=\"pcType=EspProcess::pcName=%s::subType=EspBinding::subTypeKey=%s \"/></EspServiceBindings>", compName.str(), espServiceName.str(), compName.str(), espServiceName.str());
-           addEspBindingInformation(xmlArg, pNewEnvTree, sbNewName, NULL);
+           addEspBindingInformation(xmlArg, pNewEnvTree, sbNewName, NULL, m_cfg, m_service.str());
            
            xpath.clear().appendf("./%s/%s/%s/[%s=\"\"]", XML_TAG_SOFTWARE, XML_TAG_ESPPROCESS, XML_TAG_ESPBINDING, XML_ATTR_SERVICE);
            IPropertyTree* pEspBindingInfo = pNewEnvTree->queryPropTree(xpath.str());
@@ -911,7 +890,7 @@ void CWizardInputs::getEspBindingInformation(IPropertyTree* pNewEnvTree)
            xpath.clear().appendf("%s/%s[%s=\"%s\"]/Properties", XML_TAG_SOFTWARE, XML_TAG_ESPSERVICE, XML_ATTR_NAME, (espServiceName.toLowerCase()).str());
            IPropertyTree* pSvcProps = pNewEnvTree->queryPropTree(xpath.str());
 
-           Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, true, false, 0, genOptional);
+           Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, buildSetName, m_cfg, m_service.str(), true, false, 0);
 
            Owned<IPropertyTreeIterator> i = pSvcProps->getElements("Authenticate");
            ForEach(*i)
@@ -1122,12 +1101,7 @@ void CWizardInputs::addComponentToSoftware(IPropertyTree* pNewEnvTree, IProperty
   if (processName && *processName && buildSetName && * buildSetName && xsdFileName && *xsdFileName)
   {
     Owned<IPropertyTree> pSchema = loadSchema(m_buildSetTree->queryPropTree("./"XML_TAG_PROGRAMS"/"XML_TAG_BUILD"[1]"), pBuildSet, buildSetPath, NULL);
-    IPropertyTree* pCompTree;
-
-    if (m_genOptForAllComps == GENOPTIONAL_ALL || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) == NotFound ))
-      pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, false);
-    else if (m_genOptForAllComps == GENOPTIONAL_NONE || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) != NotFound ))
-      pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, false, false, 0, false);
+    IPropertyTree* pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, buildSetName, m_cfg, m_service.str(), false);
 
     sbNewName.clear();
     if (strstr(buildSetName ,"my") == NULL && (strcmp(buildSetName, "topology") != 0))

+ 0 - 8
deployment/deployutils/wizardInputs.hpp

@@ -42,13 +42,6 @@ interface IPropertyTree;
 using std::string;
 using std::map;
 
-typedef enum GenOptional_
-{
-    GENOPTIONAL_ALL,
-    GENOPTIONAL_NONE,
-    GENOPTIONAL_COMPS
-} GenOptional;
-
 class CInstDetails : public CInterface, implements IInterface
 {
   public: 
@@ -132,7 +125,6 @@ private:
    StringArray m_doNotGenOptOnComps;
    StringArray m_clusterForTopology;
    MapStringToStringArray m_compForTopology; 
-   GenOptional m_genOptForAllComps;
    MapStringToStringArray m_invalidServerCombo;
    unsigned m_supportNodes;
    unsigned m_roxieNodes;

+ 3 - 1
esp/services/CMakeLists.txt

@@ -17,7 +17,9 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ################################################################################
 add_subdirectory (ecldirect)
-add_subdirectory (ws_access)
+IF (USE_OPENLDAP)
+    add_subdirectory (ws_access)
+ENDIF(USE_OPENLDAP)
 add_subdirectory (ws_account)
 add_subdirectory (ws_config)
 add_subdirectory (ws_dfu)

+ 11 - 11
esp/services/WsDeploy/WsDeployService.cpp

@@ -1080,7 +1080,7 @@ bool CWsDeployFileInfo::saveSetting(IEspContext &context, IEspSaveSettingRequest
                 StringBuffer buildSetPath;
                 Owned<IPropertyTree> pSchema = loadSchema(pEnvRoot->queryPropTree("./Programs/Build[1]"), pBuildSet, buildSetPath, m_Environment);
 
-                Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+                Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
                 StringBuffer sbtmp(pszSubType);
                 StringBuffer sb;
                 const char* psz = strrchr(pszSubType, '/');
@@ -1537,7 +1537,7 @@ bool CWsDeployFileInfo::saveSetting(IEspContext &context, IEspSaveSettingRequest
               const char* processName = pBuildSet->queryProp(XML_ATTR_PROCESS_NAME);
               StringBuffer buildSetPath;
               Owned<IPropertyTree> pSchema = loadSchema(pEnvRoot->queryPropTree("./Programs/Build[1]"), pBuildSet, buildSetPath, m_Environment);
-              Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+              Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
 
               Owned<IPropertyTreeIterator> i = pSvcProps->getElements("Authenticate");
               ForEach(*i)
@@ -2959,7 +2959,7 @@ bool CWsDeployFileInfo::displaySettings(IEspContext &context, IEspDisplaySetting
 
       //add any missing parameters
       Owned<IPropertyTree> pSrcTree = createPTreeFromXMLString(xml);
-      Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, true);
+      Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName(), true, false, 0, true);
 
       if (pNewCompTree)
       {
@@ -3220,7 +3220,7 @@ bool CWsDeployFileInfo::displaySettings(IEspContext &context, IEspDisplaySetting
       else if (!strcmp(pszCompType, "RoxieCluster"))
       {
         Owned<IPropertyTree> pSrcTree = createPTreeFromXMLString(xml);
-        pNewCompTree.setown(generateTreeFromXsd(pEnvRoot, pSchema, processName));
+        pNewCompTree.setown(generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName()));
 
         if (!strcmp(pszCompType, "RoxieCluster"))
         {
@@ -3987,7 +3987,7 @@ bool CWsDeployFileInfo::handleComponent(IEspContext &context, IEspHandleComponen
       StringBuffer buildSetPath;
       Owned<IPropertyTree> pSchema = loadSchema(pEnvRoot->queryPropTree("./Programs/Build[1]"), pBuildSet, buildSetPath, m_Environment);
       xpath.clear().appendf("./Software/%s[@name='%s']", processName, buildSetName);
-      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, false);
+      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName(), false);
       IPropertyTree* pInstTree = pCompTree->queryPropTree(XML_TAG_INSTANCE);
 
       if (pInstTree)
@@ -4118,7 +4118,7 @@ bool CWsDeployFileInfo::handleInstance(IEspContext &context, IEspHandleInstanceR
           pNode->addProp(attrName.str(), szAttrib);
         }
 
-        Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, true);
+        Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSet, m_pService->getCfg(), m_pService->getName(), true);
 
         if (pNewCompTree)
         {
@@ -4283,7 +4283,7 @@ bool CWsDeployFileInfo::handleEspServiceBindings(IEspContext &context, IEspHandl
       }
 
       IPropertyTree* pEspService = pEnvRoot->queryPropTree(xpath.str());    
-      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
       StringBuffer sb(type);
 
       if (!strncmp(sb.str(), "_", 1))
@@ -4310,7 +4310,7 @@ bool CWsDeployFileInfo::handleEspServiceBindings(IEspContext &context, IEspHandl
     if (!flag)
     {
       IPropertyTree* pEspService = pEnvRoot->queryPropTree(xpath.str());    
-      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
       StringBuffer sbNewName(XML_TAG_ESPBINDING);
       xpath.clear().appendf("%s[@name='%s']/EspBinding", processName, espName);
 
@@ -4722,7 +4722,7 @@ bool CWsDeployFileInfo::handleRows(IEspContext &context, IEspHandleRowsRequest &
 
   StringBuffer buildSetPath;
   Owned<IPropertyTree> pSchema = loadSchema(pEnvRoot->queryPropTree("./Programs/Build[1]"), pBuildSet, buildSetPath, m_Environment);
-  IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+  IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
 
   if (!strcmp(operation, "Add"))
   {
@@ -4789,7 +4789,7 @@ bool CWsDeployFileInfo::handleRows(IEspContext &context, IEspHandleRowsRequest &
         }
 
         IPropertyTree* pComponent = pEnvRoot->queryPropTree(xpath.str());   
-        IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+        IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
         StringBuffer sb(rowType);
 
         if (!strncmp(sb.str(), "_", 1))
@@ -6786,7 +6786,7 @@ bool CWsDeployFileInfo::checkForRequiredComponents(IPropertyTree* pEnvRoot, cons
         StringBuffer buildSetPath, sbNewName;
         Owned<IPropertyTree> pSchema = loadSchema(pEnvRoot->queryPropTree("./Programs/Build[1]"), pBuildSet, buildSetPath, m_Environment);
         xpath.clear().appendf("./Software/%s[@name='%s']", processName, compOnAllNodes.item(i));
-        pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, false);
+        pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, pBuildSet->queryProp(XML_ATTR_NAME), m_pService->getCfg(), m_pService->getName(), false);
         IPropertyTree* pInstTree = pCompTree->queryPropTree(XML_TAG_INSTANCE);
 
         if (pInstTree)

+ 0 - 1
esp/services/ecldirect/CMakeLists.txt

@@ -61,7 +61,6 @@ target_link_libraries ( EclDirect
          jlib
          xmllib 
          esphttp 
-         LdapSecurity 
          mp 
          hrpc 
          remote 

+ 3 - 2
esp/services/ws_account/CMakeLists.txt

@@ -61,7 +61,8 @@ target_link_libraries ( ws_account
          jlib
          xmllib 
          esphttp 
-         LdapSecurity 
          securesocket 
     )
-
+IF (USE_OPENLDAP)
+target_link_libraries ( ws_account LdapSecurity )
+ENDIF(USE_OPENLDAP)

+ 4 - 0
esp/services/ws_account/ws_accountService.cpp

@@ -17,7 +17,9 @@
 ############################################################################## */
 
 #include "ws_accountService.hpp"
+#ifdef _USE_OPENLDAP
 #include "ldapsecurity.ipp"
+#endif
 #include "exception_util.hpp"
 
 const int CUTOFF_MAJOR = 533;
@@ -29,6 +31,7 @@ void Cws_accountEx::init(IPropertyTree *cfg, const char *process, const char *se
 {
 }
 
+#ifdef _USE_OPENLDAP
 bool Cws_accountEx::onUpdateUser(IEspContext &context, IEspUpdateUserRequest & req, IEspUpdateUserResponse & resp)
 {
     try
@@ -160,6 +163,7 @@ bool Cws_accountEx::onWhoAmI(IEspContext &context, IEspWhoAmIRequest &req, IEspW
     }
     return true;
 }
+#endif
 
 bool Cws_accountEx::onVerifyUser(IEspContext &context, IEspVerifyUserRequest &req, IEspVerifyUserResponse &resp)
 {

+ 10 - 0
esp/services/ws_account/ws_accountService.hpp

@@ -37,6 +37,7 @@ public:
 
     virtual void getNavigationData(IEspContext &context, IPropertyTree & data)
     {
+#ifdef _USE_OPENLDAP
         bool isFF = false;
         StringBuffer browserUserAgent;
         context.getUseragent(browserUserAgent);
@@ -64,8 +65,10 @@ public:
                 ensureNavLink(*folder, "Relogin", "/Ws_Access/FirefoxNotSupport?form_", "Relogin", NULL, NULL, 0, true);//Force the menu to use this setting
             ensureNavLink(*folder, "Who Am I", "/Ws_Account/WhoAmI", "WhoAmI", NULL, NULL, 0, true);//Force the menu to use this setting
         }
+#endif
     }
 
+#ifdef _USE_OPENLDAP
     int onGetInstantQuery(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *service, const char *method)
     {
         if(!stricmp(method, "LogoutUser")||!stricmp(method, "LogoutUserRequest"))
@@ -138,6 +141,7 @@ public:
         else
             return Cws_accountSoapBinding::onGetInstantQuery(context, request, response, service, method);
     }
+#endif
 };
 
 class Cws_accountEx : public Cws_account
@@ -147,9 +151,15 @@ public:
 
     virtual void init(IPropertyTree *cfg, const char *process, const char *service);
 
+#ifdef _USE_OPENLDAP
     virtual bool onUpdateUser(IEspContext &context, IEspUpdateUserRequest &req, IEspUpdateUserResponse &resp);
     virtual bool onUpdateUserInput(IEspContext &context, IEspUpdateUserInputRequest &req, IEspUpdateUserInputResponse &resp);
     virtual bool onWhoAmI(IEspContext &context, IEspWhoAmIRequest &req, IEspWhoAmIResponse &resp);
+#else
+    virtual bool onUpdateUser(IEspContext &context, IEspUpdateUserRequest &req, IEspUpdateUserResponse &resp) {return true;};
+    virtual bool onUpdateUserInput(IEspContext &context, IEspUpdateUserInputRequest &req, IEspUpdateUserInputResponse &resp) {return true;};
+    virtual bool onWhoAmI(IEspContext &context, IEspWhoAmIRequest &req, IEspWhoAmIResponse &resp) {return true;};
+#endif
     virtual bool onVerifyUser(IEspContext &context, IEspVerifyUserRequest &req, IEspVerifyUserResponse &resp);
 };
 

+ 0 - 2
esp/services/ws_dfu/CMakeLists.txt

@@ -53,7 +53,6 @@ include_directories (
          ./../../../common/deftype 
          ./../../../ecl/hql 
          ./../../../system/security/securesocket 
-         ./../../../system/security/LdapSecurity 
          ./../../../system/security/shared 
          ./../../../system/include 
          ./../../../common/workunit 
@@ -92,7 +91,6 @@ target_link_libraries ( ws_dfu
          dalift 
          SMCLib 
          dfuXRefLib 
-         LdapSecurity 
          dfuwu 
          securesocket 
          roxiecommlib 

+ 0 - 3
esp/services/ws_dfu/ws_dfuService.cpp

@@ -50,13 +50,10 @@
 #include "exception_util.hpp"
 
 #include "ws_dfuService.hpp"
-#include "ldapsecurity.hpp"
 
 #include "hqlerror.hpp"
 #include "eclrtl.hpp"
 
-///#define TESTDATASET 1
-
 #define     Action_Delete           "Delete"
 #define     Action_AddtoSuperfile   "Add To Superfile"
 static const char* FEATURE_URL="DfuAccess";

+ 0 - 1
esp/services/ws_ecl/CMakeLists.txt

@@ -66,7 +66,6 @@ target_link_libraries ( ws_ecl
          jlib
          xmllib 
          esphttp 
-         LdapSecurity 
          mp 
          hrpc 
          remote 

+ 0 - 1
esp/services/ws_machine/CMakeLists.txt

@@ -65,7 +65,6 @@ target_link_libraries ( ws_machine
          roxiecommlib
          xmllib 
          esphttp 
-         LdapSecurity 
          mp 
          hrpc 
          remote 

+ 3 - 1
esp/services/ws_smc/CMakeLists.txt

@@ -69,7 +69,6 @@ target_link_libraries ( ws_smc
          jlib
          xmllib 
          esphttp 
-         LdapSecurity 
          mp 
          hrpc 
          remote 
@@ -97,4 +96,7 @@ target_link_libraries ( ws_smc
          roxiemanager 
          ws_workunits 
     )
+IF (USE_OPENLDAP)
+target_link_libraries ( ws_smc LdapSecurity )
+ENDIF(USE_OPENLDAP)
 

+ 12 - 2
esp/services/ws_smc/ws_smcService.cpp

@@ -18,7 +18,9 @@
 
 #pragma warning (disable : 4786)
 
+#ifdef _USE_OPENLDAP
 #include "ldapsecurity.ipp"
+#endif
 #include "ws_smcService.hpp"
 #include "wshelpers.hpp"
 
@@ -285,8 +287,12 @@ bool CWsSMCEx::onActivity(IEspContext &context, IEspActivityRequest &req, IEspAc
 
         double version = context.getClientVersion();
 
+#ifdef _USE_OPENLDAP
         CLdapSecManager* secmgr = dynamic_cast<CLdapSecManager*>(context.querySecManager());
         if(req.getFromSubmitBtn() && secmgr && secmgr->isSuperUser(context.queryUser()))
+#else
+        if(req.getFromSubmitBtn())
+#endif
         {
             StringBuffer chatURLStr, bannerStr;
             const char* chatURL = req.getChatURL();
@@ -347,11 +353,14 @@ bool CWsSMCEx::onActivity(IEspContext &context, IEspActivityRequest &req, IEspAc
 
         if (version > 1.05)
         {
+#ifdef _USE_OPENLDAP
             int UserPermission = -1;
             CLdapSecManager* secmgr = dynamic_cast<CLdapSecManager*>(context.querySecManager());
             if(secmgr && secmgr->isSuperUser(context.queryUser()))
                 UserPermission = 0;
-
+#else
+            int UserPermission = 0;
+#endif
             resp.setUserPermission(UserPermission);
             resp.setShowBanner(m_BannerAction);
             resp.setShowChatURL(m_EnableChatURL);
@@ -1138,10 +1147,11 @@ bool CWsSMCEx::onSetBanner(IEspContext &context, IEspSetBannerRequest &req, IEsp
 {
     try
     {
+#ifdef _USE_OPENLDAP
         CLdapSecManager* secmgr = dynamic_cast<CLdapSecManager*>(context.querySecManager());
         if(!secmgr || !secmgr->isSuperUser(context.queryUser()))
             throw MakeStringException(ECLWATCH_SUPER_USER_ACCESS_DENIED, "access denied, administrators only.");
-
+#endif
         StringBuffer chatURLStr, bannerStr;
         const char* chatURL = req.getChatURL();
         const char* banner = req.getBannerContent();

+ 0 - 1
esp/services/ws_topology/CMakeLists.txt

@@ -77,7 +77,6 @@ target_link_libraries ( ws_topology
          deftype 
          workunit 
          SMCLib 
-         LdapSecurity 
          securesocket 
          swapnodelib
          )

+ 0 - 1
esp/services/ws_workunits/CMakeLists.txt

@@ -97,7 +97,6 @@ target_link_libraries ( ws_workunits
          schedulectrl
          roxiecommlib
          roxiemanager
-         LdapSecurity
          hql
          jhtree
          fileview2

+ 2 - 2
initfiles/componentfiles/configxml/thor.xsd.in

@@ -454,7 +454,7 @@
           </xs:appinfo>
         </xs:annotation>
       </xs:attribute>
-      <xs:attribute name="autoCopyBackup" type="xs:boolean" default="true">
+      <xs:attribute name="autoCopyBackup" type="xs:boolean" default="false">
         <xs:annotation>
           <xs:appinfo>
             <tooltip>If files at primary location are missing, copy into place from backup location</tooltip>
@@ -533,7 +533,7 @@
           </xs:appinfo>
         </xs:annotation>
       </xs:attribute>
-      <xs:attribute name="monitorDaliFileServer" type="xs:boolean" default="false">
+      <xs:attribute name="monitorDaliFileServer" type="xs:boolean" default="true">
         <xs:annotation>
           <xs:appinfo>
             <tooltip>Warn if dafilesrv process is not running on computers</tooltip>

+ 2 - 0
system/security/CMakeLists.txt

@@ -16,7 +16,9 @@
 #    You should have received a copy of the GNU Affero General Public License
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ################################################################################
+IF (USE_OPENLDAP)
 add_subdirectory (LdapSecurity)
+ENDIF(USE_OPENLDAP)
 add_subdirectory (securesocket)
 add_subdirectory (test)
 if (USE_ZLIB)

+ 2 - 0
system/security/test/CMakeLists.txt

@@ -16,5 +16,7 @@
 #    You should have received a copy of the GNU Affero General Public License
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ################################################################################
+IF (USE_OPENLDAP)
 add_subdirectory (ldapsecuritytest)
+ENDIF(USE_OPENLDAP)
 add_subdirectory (myssl)