From 7791cd8800df622549d07d269a1e8c1f58f8f3bc Mon Sep 17 00:00:00 2001 From: Jim DeFabia Date: Thu, 5 Jan 2023 15:11:57 -0500 Subject: [PATCH 01/11] HPCC-28428 Fix typo in PG code Signed-off-by: Jim DeFabia --- .../ECLProgrammersGuide/PRG_Mods/PrG_Using_Group_Function.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/EN_US/ECLProgrammersGuide/PRG_Mods/PrG_Using_Group_Function.xml b/docs/EN_US/ECLProgrammersGuide/PRG_Mods/PrG_Using_Group_Function.xml index cb2b39930a1..db1128433d0 100644 --- a/docs/EN_US/ECLProgrammersGuide/PRG_Mods/PrG_Using_Group_Function.xml +++ b/docs/EN_US/ECLProgrammersGuide/PRG_Mods/PrG_Using_Group_Function.xml @@ -110,7 +110,7 @@ OUTPUT(i2); TRANSFORM(RECORDOF(ProgGuide.Accounts), SELF := LEFT)); ds0 := DISTRIBUTE(bf,RANDOM()) : PERSIST('~PROGGUIDE::PERSIST::TestGroupSort'); -ds1 := DISTRIBUTE(ds,HASH32(personid)); +ds1 := DISTRIBUTE(ds0,HASH32(personid)); // do a global sort s1 := SORT(ds0,personid,opendate,-balance); From f916a77fdeebc2e784d4ee5cf46fc4478d011002 Mon Sep 17 00:00:00 2001 From: Jim DeFabia Date: Wed, 18 Jan 2023 12:41:11 -0500 Subject: [PATCH 02/11] HPCC-25205 Clarify Std.File.Copy forcePush parameter Signed-off-by: Jim DeFabia --- docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Copy.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Copy.xml b/docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Copy.xml index 7b3f3ecded5..4ed996c323f 100644 --- a/docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Copy.xml +++ b/docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Copy.xml @@ -164,8 +164,9 @@ Optional. A boolean TRUE or FALSE flag indicating whether to execute the copy process on the source nodes and push to the targets - instead of executing on the targets and pulling from the source. If - omitted, the default is FALSE. + instead of executing on the targets and pulling from the source. + This option is only valid within the same environment. If omitted, + the default is FALSE. From fee7b84d1d9df874e8867bdb34550a6b879126a3 Mon Sep 17 00:00:00 2001 From: Jim DeFabia Date: Fri, 20 Jan 2023 12:05:29 -0500 Subject: [PATCH 03/11] HPCC-24982 Clarify how to conditionally compile using __TARGET_PLATFORM__ Signed-off-by: Jim DeFabia --- .../ECLR_mods/Basics-Constants.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Basics-Constants.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Basics-Constants.xml index a04ce43d03e..3bdea78508b 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Basics-Constants.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Basics-Constants.xml @@ -256,7 +256,18 @@ MyDec2 := 3.14159265358979323846d // value of MyDec2 is the DECIMAL Example: - IMPORT STD; + // Any modules referenced inside the condition must be declared outside of the condition +// This will avoid syntax errors +prod_thor_dali := _Control.IPAddress.prod_thor_dali; + #IF(_TARGET_PLATFORM_ in ['thorlcr']) + Output('thor'); + prod_thor_dali; + #ELSE + Output('not thor'); + #END + +//Second example +IMPORT STD; STRING14 fGetDateTimeString() := #IF(__ECL_VERSION_MAJOR__ > 5) or ((__ECL_VERSION_MAJOR__ = 5) AND (__ECL_VERSION_MINOR__ >= 2)) STD.Date.SecondsToString(STD.Date.CurrentSeconds(true), '%Y%m%d%H%M%S'); From 625587234a516b3236fca91be7c3bc320046e54f Mon Sep 17 00:00:00 2001 From: Jim DeFabia Date: Fri, 20 Jan 2023 12:10:31 -0500 Subject: [PATCH 04/11] HPCC-20804 Clarify the use of Boolean logic in a RECORD structure Signed-off-by: Jim DeFabia --- docs/EN_US/ECLLanguageReference/ECLR_mods/RecordStructure.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/RecordStructure.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/RecordStructure.xml index a530aaa64a9..839fa7e929c 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/RecordStructure.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/RecordStructure.xml @@ -132,7 +132,8 @@ records. If the condition expression references fields in the RECORD preceding the IFBLOCK, those references must use SELF. prepended to the fieldname to - disambiguate the reference. + disambiguate the reference. This is only for use in RECORD + structures that define files on disk. From 61e34918e4defce23f01a1a7aa0f1c561ff52208 Mon Sep 17 00:00:00 2001 From: Jim DeFabia Date: Fri, 20 Jan 2023 12:17:58 -0500 Subject: [PATCH 05/11] HPCC-23892 Clarify how trailing spaces are considered when comparing Signed-off-by: Jim DeFabia --- .../ECLR_mods/ExpressionsandOperatos.xml | 8 +++++--- docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Find.xml | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/ExpressionsandOperatos.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/ExpressionsandOperatos.xml index ccbf1398889..c53726577c9 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/ExpressionsandOperatos.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/ExpressionsandOperatos.xml @@ -20,7 +20,7 @@ Standard arithmetic operators arithmetic operators are supported for use in expressions, listed here in their - evaluation precedence. + evaluation precedence. @@ -324,7 +324,9 @@ The Greater Than or Equal operator must have the Greater Than (>) sign first. For the expression a <=> b, the Equivalence Comparison operator - returns -1 if a<b, 0 if a=b, and 1 if a>b. When STRINGs are compared - for equivalence, trailing spaces are ignored. + returns -1 if a<b, 0 if a=b, and 1 if a>b. When STRINGs are + compared, trailing spaces are generally ignored. Standard library + functions, such as Std.Str.Find(), may consider trailing spaces. See the + Standard Library Reference for specific details. diff --git a/docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Find.xml b/docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Find.xml index 43e839380d5..4ea0d129fd5 100644 --- a/docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Find.xml +++ b/docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Find.xml @@ -79,7 +79,8 @@ specified instance is greater than the number of occurrences of the target in the source, Find returns - zero (0). + zero (0). Trailing spaces are considered to be significant when + comparing. Example: From e4aae8ce1b841bd2d9fdc8b1f55c682d613893f0 Mon Sep 17 00:00:00 2001 From: Jim DeFabia Date: Fri, 20 Jan 2023 11:20:32 -0500 Subject: [PATCH 06/11] HPCC-16628 Improve the example code of AGGREGATE in the ECL Lang Ref Signed-off-by: Jim DeFabia --- .../ECLR_mods/BltInFunc-AGGREGATE.xml | 100 ++++++++++++------ 1 file changed, 67 insertions(+), 33 deletions(-) diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-AGGREGATE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-AGGREGATE.xml index c643242e673..71f95741919 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-AGGREGATE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-AGGREGATE.xml @@ -15,14 +15,18 @@ RIGHT1 ,RIGHT2 RIGHT2 - ) ] [, groupingfields - ] [, LOCAL + ) | groupingfields ] [, LOCAL LOCAL | FEW FEW | MANY MANY - ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ] [, UNORDERED | ORDERED( bool + ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ + ( numthreads ) ] ] [, + ALGORITHM( name ) ] + ) @@ -93,50 +97,70 @@ Optional. Indicates that the expression will result in more than 10,000 records. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -159,7 +183,7 @@ The operation is implicitly local, in that the maintransform is called to process records locally on each node, and the result records on each node are then merged to produce - the global result. + the global result. TRANSFORM Function Requirements - AGGREGATE @@ -216,38 +240,48 @@ maintransform. If it can't, then the user will need to specify one. - inRecord := RECORD + //Example 1: Produce a list of box contents by concatenating a string: +IMPORT Std; +inRec := RECORD UNSIGNED box; - STRING text{MAXLENGTH(10)}; + STRING text{MAXLENGTH(100)}; END; -inTable := DATASET([{1,'Fred'},{1,'Freddy'}, - {2,'Freddi'},{3,'Fredrik'},{1,'FredJon'}], inRecord); - -//Example 1: Produce a list of box contents by concatenating a string: - -outRecord1 := RECORD +inds := DATASET([{1,'Fred1'},{1,'Freddy1'},{1,'FredJon1'}, + {3,'Fred3'},{3,'Freddy3'},{3,'FredJon3'}, + {4,'Fred4'},{4,'Freddy4'},{4,'FredJon4'}, + {2,'Freddi'},{2,'Fredrik'}], inRec,DISTRIBUTED); +outRec := RECORD UNSIGNED box; STRING contents{MAXLENGTH(200)}; END; -outRecord1 t1(inRecord l, outRecord1 r) := TRANSFORM +outRec t1(inds l, outRec r) := TRANSFORM SELF.box := l.box; - SELF.contents := r.contents + IF(r.contents <> '', ',', '') + l.text; + SELF.contents:= r.contents +IF(r.contents <> '', ',', '') +l.text +'-' +(Std.System.ThorLib.Node()+1); END; -outRecord1 t2(outRecord1 r1, outRecord1 r2) := TRANSFORM +outRec t2(outRec r1, outRec r2) := TRANSFORM SELF.box := r1.box; - SELF.contents := r1.contents + ',' + r2.contents; + SELF.contents := r1.contents + '::' + r2.contents; END; -OUTPUT(AGGREGATE(inTable, outRecord1, t1(LEFT, RIGHT), t2(RIGHT1, RIGHT2), LEFT.box)); - -//This example could eliminate the merge transform if the SELF.contents expression in -//the t1 TRANSFORM were simpler, like this: -// SELF.contents := r.contents + ',' + l.text; -//which would make the AGGREGATE function like this: -// OUTPUT(AGGREGATE(inTable, outRecord1, t1(LEFT, RIGHT), LEFT.box)); - +OUTPUT(AGGREGATE(inds, outRec, t1(LEFT, RIGHT), t2(RIGHT1, RIGHT2), LEFT.box)); +//because there is a "group by" field, this will never call the second TRANSFORM +//because "group by" puts all grouped recs on a single node +//and it produces one result rec for each unique "group by" value + +OUTPUT(AGGREGATE(inds, outRec, t1(LEFT, RIGHT), t2(RIGHT1, RIGHT2))); +//without the "group by" field, this calls the second TRANSFORM on a multi-node cluster +//and the second TRANSFORM produces a single result record after merging the results from +//each node + //Example 2: A PIGMIX style grouping operation: +inRecord := RECORD + UNSIGNED box; + STRING text{MAXLENGTH(10)}; +END; +inTable := DATASET([{1,'Fred'},{1,'Freddy'}, + {2,'Freddi'},{3,'Fredrik'},{1,'FredJon'}], inRecord); + outRecord2 := RECORD UNSIGNED box; DATASET(inRecord) items; From abf37add232b7d375882bd1fa04cf19a55177928 Mon Sep 17 00:00:00 2001 From: g-pan Date: Mon, 23 Jan 2023 12:34:45 -0500 Subject: [PATCH 07/11] HPCC-28776 Remove Python2 from environment.conf Signed-off-by: g-pan --- initfiles/etc/DIR_NAME/environment.conf.in | 6 ------ 1 file changed, 6 deletions(-) diff --git a/initfiles/etc/DIR_NAME/environment.conf.in b/initfiles/etc/DIR_NAME/environment.conf.in index 75090c237bb..1a3590a8bc6 100644 --- a/initfiles/etc/DIR_NAME/environment.conf.in +++ b/initfiles/etc/DIR_NAME/environment.conf.in @@ -50,12 +50,6 @@ jvmoptions=-XX:-UsePerfData # In most cases, skipping the cleanup is harmless and avoids these lockups skipPythonCleanup=true -# Although HPCC platform includes plugins for both Python2 and Python3, only one may be safely enabled at a time -# as the Python libraries export the same symbols for both versions. Enabling both may lead to unpredicatable results -# including segfaults or undefined symbol errors. -# -# If you would prefer to use python 2 and disable python3, change the line below to read -# additionalPlugins=python2 # # Multiple paths can be specified (separate with :, or ; on Windows). # Relative paths are assumed to be relative to ${INSTALL_DIR}/versioned From 87194968b9658d02de56e67a58eeead667d246b5 Mon Sep 17 00:00:00 2001 From: Ken Rowland Date: Tue, 17 Jan 2023 14:07:40 -0500 Subject: [PATCH 08/11] HPCC-28789 Keep ESP service execution profile enable per defined service Added profile execution enabled flag to service info structure Removed profile execution enabled flag from HIDL compiler class Signed-Off-By: Kenneth Rowland kenneth.rowland@lexisnexisrisk.com --- tools/hidl/hidlcomp.cpp | 36 +++++++++++++++++++++--------------- tools/hidl/hidlcomp.h | 4 +++- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/tools/hidl/hidlcomp.cpp b/tools/hidl/hidlcomp.cpp index 03cbaff7537..a8e38112115 100644 --- a/tools/hidl/hidlcomp.cpp +++ b/tools/hidl/hidlcomp.cpp @@ -7143,11 +7143,7 @@ void HIDLcompiler::processExecutionProfiling() for (si=servs; si; si=si->next) { StrBuffer serviceProfilingOptions; - bool serviceProfileExecutionEnabled = si->getMetaStringValue(serviceProfilingOptions,"profile_execution"); - - // - // At the HIDL top level, execution profiling is enabled if any service is enabled - executionProfilingEnabled |= serviceProfileExecutionEnabled; + si->executionProfilingEnabled = si->getMetaStringValue(serviceProfilingOptions,"profile_execution"); // // Go through each method and save any profile information to make if faster later when @@ -7160,8 +7156,8 @@ void HIDLcompiler::processExecutionProfiling() // Collect method profile execution values StrBuffer methodProfilingOptions; bool methodProfileExecutionEnabled = mthi->getMetaStringValue(methodProfilingOptions, "profile_execution"); - executionProfilingEnabled |= methodProfileExecutionEnabled; // again, if a method is enabled, set top flag - if (serviceProfileExecutionEnabled || methodProfileExecutionEnabled) + si->executionProfilingEnabled |= methodProfileExecutionEnabled; // again, if a method is enabled, set top flag + if (si->executionProfilingEnabled || methodProfileExecutionEnabled) { if (!mthi->getMetaInt("no_profile_execution")) { @@ -7185,11 +7181,18 @@ void HIDLcompiler::write_esp() outf("#define %s_ESPGEN_INCLUDED\n\n", packagename); outf("#include \"%s_esp.ipp\"\n", packagename); - if (executionProfilingEnabled) + // If any defined service has execution profiling enabled, add the required includes + EspServInfo *si; + for (si=servs;si;si=si->next) { - outs("#include \"espcommon.hpp\"\n"); - outs("#include \"jmetrics.hpp\"\n"); + if (si->executionProfilingEnabled) + { + outs("#include \"espcommon.hpp\"\n"); + outs("#include \"jmetrics.hpp\"\n"); + break; + } } + outs("\n"); outs("#ifdef _WIN32\n"); outs("#include \"edwin.h\"\n"); @@ -7204,7 +7207,6 @@ void HIDLcompiler::write_esp() mi->write_esp(); } - EspServInfo *si; for (si=servs;si;si=si->next) { si->write_esp_binding(); @@ -7252,10 +7254,15 @@ void HIDLcompiler::write_esp_ex_ipp() outs("\n\n"); // metrics execution profiling requires the memory header - if (executionProfilingEnabled) + EspServInfo *si; + for (si=servs;si;si=si->next) { - outs("#include \n"); - outs("\n\n"); + if (si->executionProfilingEnabled) + { + outs("#include \n"); + outs("\n\n"); + break; + } } outf("namespace %s\n{\n\n", packagename); @@ -7266,7 +7273,6 @@ void HIDLcompiler::write_esp_ex_ipp() mi->write_esp_ipp(); } - EspServInfo *si; for (si=servs;si;si=si->next) { si->write_esp_service_ipp(); diff --git a/tools/hidl/hidlcomp.h b/tools/hidl/hidlcomp.h index e382d0c979d..2bb4405f6fa 100644 --- a/tools/hidl/hidlcomp.h +++ b/tools/hidl/hidlcomp.h @@ -1185,6 +1185,9 @@ class EspServInfo char *base_; bool needsXslt; +public: + bool executionProfilingEnabled = false; + public: EspServInfo(const char *name) @@ -1335,7 +1338,6 @@ class HIDLcompiler EspMessageInfo *msgs; EspServInfo *servs; IncludeInfo *includes; - bool executionProfilingEnabled = false; }; From 94b1bef8f37fd33792740aab22901347f9b15924 Mon Sep 17 00:00:00 2001 From: Kunal Aswani Date: Mon, 23 Jan 2023 16:01:46 -0500 Subject: [PATCH 09/11] HPCC-28702 PT-BR Translations for 8.12.X Translations added for Brazilian Portuguese (PT-BR). Signed-off-by: Kunal Aswani --- esp/src/src/nls/pt-br/hpcc.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/esp/src/src/nls/pt-br/hpcc.ts b/esp/src/src/nls/pt-br/hpcc.ts index 6ab6cf54d2e..724acb3f373 100644 --- a/esp/src/src/nls/pt-br/hpcc.ts +++ b/esp/src/src/nls/pt-br/hpcc.ts @@ -2,6 +2,7 @@ Abort: "Abortar", AbortedBy: "Abortado pelo", AbortedTime: "Hora de Abortar", + AbortSelectedWorkunits: "Abortar unidade(s) de trabalho selecionada(s)? Seu ID de login será registrado para esta ação no(s) WU(s).", About: "Sobre Plataforma HPCC", AboutGraphControl: "Sobre Controle de Gráphico", AboutHPCCSystems: "Sobre HPCC Systems", @@ -111,6 +112,7 @@ Columns: "Colunas", Command: "Comando", Comment: "Comentário", + CompileCost: "Custo de compilação", Compiled: "Compilado", Compiling: "Compilando", Completed: "Completo", @@ -233,6 +235,7 @@ Downloads: "Abaixamentos", DownloadSelectionAsCSV: "Baixar seleção como CSV", DownloadToCSV: "Transferir para o CSV", + DownloadToCSVNonFlatWarning: "Observação: o download de arquivos CVS pode não ser formatado como esperado", DropZone: "Zona de entrada de arquivos", DueToInctivity: "Você será desconectado de todas as sessões do ECL Watch em 3 minutos devido a inatividade.", Duration: "Duração", @@ -449,8 +452,8 @@ LocalFileSystemsOnly: "Somente Sistemas de Arquivos Locais", Location: "Localização", Lock: "Bloquear", - log_analysis_1: "log_analysis_1*", Log: "Registro", + log_analysis_1: "log_analysis_1*", LogAccessType: "Tipo de acesso ao registro", LogDirectory: "Diretório de Log", LogFile: "Arquivo de log", @@ -641,6 +644,7 @@ PleaseSelectAUserToAdd: "Por favor, selecione um usuário para adicionar", Plugins: "Plugins", Pods: "Pods", + PodsAccessError: "Não é possível recuperar a lista de pods", Port: "Porta", Prefix: "Prefixo", PrefixPlaceholder: "‘nomedoarquivo{:comprimento}, tamanho{:[B|L][1-8]}’", @@ -876,6 +880,7 @@ ThorProcess: "Processo de Thor", ThreadID: "ID do Tópico", Time: "Tempo", + Timeline: "Linha de tempo", TimeMaxTotalExecuteMinutes: "Tempo Máximo Total de Minutos de Execução", TimeMeanTotalExecuteMinutes: "Tempo Médio Total de Minutos de Execução", TimeMinTotalExecuteMinutes: "Tempo Min, Total de Minutos de Execução", From 5180668bb1d33a3fbf4784fdf307143c3659e013 Mon Sep 17 00:00:00 2001 From: Gavin Halliday Date: Tue, 24 Jan 2023 13:31:48 +0000 Subject: [PATCH 10/11] HPCC-28833 Fix Ubuntu 22.10 build warning reported as error Signed-off-by: Gavin Halliday --- esp/services/ws_esdlconfig/ws_esdlconfigservice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp/services/ws_esdlconfig/ws_esdlconfigservice.cpp b/esp/services/ws_esdlconfig/ws_esdlconfigservice.cpp index 4202f84c3bc..a71843d2b99 100644 --- a/esp/services/ws_esdlconfig/ws_esdlconfigservice.cpp +++ b/esp/services/ws_esdlconfig/ws_esdlconfigservice.cpp @@ -291,7 +291,7 @@ bool CWsESDLConfigEx::onPublishESDLDefinition(IEspContext &context, IEspPublishE userdesc->set(user, password, context.querySignature()); } - DBGLOG("CWsESDLConfigEx::onPublishESDLDefinition User=%s",user); + DBGLOG("CWsESDLConfigEx::onPublishESDLDefinition User=%s",user ? user : "(null)"); resp.updateStatus().setCode(0); From d1fcf25ff7b3262df4ac900fc5ffbb297fec7547 Mon Sep 17 00:00:00 2001 From: Russ Whitehead Date: Mon, 23 Jan 2023 10:22:51 -0500 Subject: [PATCH 11/11] HPCC-28825 App core if no root_access map in configuration Check for root_access specification before dereferencing IPropertyTree pointer Signed-off-by: Russ Whitehead --- esp/platform/application_config.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/esp/platform/application_config.cpp b/esp/platform/application_config.cpp index 9e04b3de553..fa4228651a8 100644 --- a/esp/platform/application_config.cpp +++ b/esp/platform/application_config.cpp @@ -210,11 +210,14 @@ void bindAuthResources(IPropertyTree *legacyAuthenticate, IPropertyTree *app, co if (!appAuth) throw MakeStringException(-1, "Can't find application Auth settings. To run without security set 'auth: none'"); IPropertyTree *root_access = appAuth->queryPropTree("root_access"); - StringAttr required(root_access->queryProp("@required")); - StringAttr description(root_access->queryProp("@description")); - StringAttr resource(root_access->queryProp("@resource")); - VStringBuffer locationXml("", resource.str(), required.str(), description.str()); - legacyAuthenticate->addPropTree("Location", createPTreeFromXMLString(locationXml)); + if (root_access)//root_access (feature map, auth map) not required for simple security managers + { + StringAttr required(root_access->queryProp("@required")); + StringAttr description(root_access->queryProp("@description")); + StringAttr resource(root_access->queryProp("@resource")); + VStringBuffer locationXml("", resource.str(), required.str(), description.str()); + legacyAuthenticate->addPropTree("Location", createPTreeFromXMLString(locationXml)); + } VStringBuffer featuresPath("resource_map/%s/Feature", service); Owned features = appAuth->getElements(featuresPath);