diff --git a/CHANGES b/CHANGES index 3418455d8d..553bba4d79 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,14 @@ +8.0.0-dev.535 | 2025-06-25 19:27:01 +0200 + + * Update zeek.bif (bhaskarbhar) + + * Update init-bare.zeek (bhaskarbhar) + + * Remove `list` from Zeek grammar (Evan Typanski, Corelight) + + Using it would make Zeek segfault (at least in locals). It has been an + error for 15 years. + 8.0.0-dev.530 | 2025-06-25 10:35:53 -0400 * Remove `list` from Zeek grammar (Evan Typanski, Corelight) diff --git a/VERSION b/VERSION index 5f744ffb4e..02830358ca 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.0-dev.530 +8.0.0-dev.535 diff --git a/scripts/base/init-bare.zeek b/scripts/base/init-bare.zeek index cbe4b6fb8b..11d7a665b7 100644 --- a/scripts/base/init-bare.zeek +++ b/scripts/base/init-bare.zeek @@ -375,15 +375,15 @@ type endpoint_stats: record { ## Record containing information about a tag. ## -## .. zeek:see:: get_tags_by_category -type tag_component: record { +## .. zeek:see:: get_plugin_components +type PluginComponent: record { name: string; canonical_name: string; tag: string; enabled: bool; }; -type tag_component_vec : vector of tag_component; +type plugin_component_vec : vector of PluginComponent; ## Arguments given to Zeek from the command line. In order to use this, Zeek ## must use a ``--`` command line argument immediately followed by a script diff --git a/src/script_opt/FuncInfo.cc b/src/script_opt/FuncInfo.cc index 1ff3036e05..29f9a42ae2 100644 --- a/src/script_opt/FuncInfo.cc +++ b/src/script_opt/FuncInfo.cc @@ -317,7 +317,7 @@ static std::unordered_map func_attrs = { {"global_ids", ATTR_IDEMPOTENT}, {"global_options", ATTR_IDEMPOTENT}, {"gsub", ATTR_FOLDABLE}, - {"get_tags_by_category", ATTR_NO_ZEEK_SIDE_EFFECTS}, + {"get_plugin_components", ATTR_NO_ZEEK_SIDE_EFFECTS}, {"has_event_group", ATTR_NO_ZEEK_SIDE_EFFECTS}, {"has_module_events", ATTR_NO_ZEEK_SIDE_EFFECTS}, {"have_spicy", ATTR_IDEMPOTENT}, diff --git a/src/zeek.bif b/src/zeek.bif index 75e0ed1676..6e60ed9904 100644 --- a/src/zeek.bif +++ b/src/zeek.bif @@ -5653,7 +5653,7 @@ function find_in_zeekpath%(p: string%): string ## ## Returns: A vector of records containing the tags of all plugin components ## that belong to the specified category. -function get_tags_by_category%(category: string%): tag_component_vec +function get_plugin_components%(category: string%): plugin_component_vec %{ std::string cat = category->CheckString(); auto type = CategoryStringToEnum(cat); @@ -5664,12 +5664,12 @@ function get_tags_by_category%(category: string%): tag_component_vec return nullptr; } - static auto vec_type = zeek::id::find_type("tag_component_vec"); - static auto rec_type = zeek::id::find_type("tag_component"); + static auto vec_type = zeek::id::find_type("plugin_component_vec"); + static auto rec_type = zeek::id::find_type("PluginComponent"); if ( ! vec_type || ! rec_type ) { - reporter->Error("Required types not found (tag_component or component_vec)"); + reporter->Error("Required types not found (PluginComponent or plugin_component_vec)"); return nullptr; } diff --git a/testing/btest/Baseline/bifs.get_tags_by_category/out b/testing/btest/Baseline/bifs.get_plugin_components/out similarity index 100% rename from testing/btest/Baseline/bifs.get_tags_by_category/out rename to testing/btest/Baseline/bifs.get_plugin_components/out diff --git a/testing/btest/bifs/get_tags_by_category.zeek b/testing/btest/bifs/get_plugin_components.zeek similarity index 79% rename from testing/btest/bifs/get_tags_by_category.zeek rename to testing/btest/bifs/get_plugin_components.zeek index 7fe8e85549..d5cd92a8b0 100644 --- a/testing/btest/bifs/get_tags_by_category.zeek +++ b/testing/btest/bifs/get_plugin_components.zeek @@ -4,7 +4,7 @@ event zeek_init() { - local result = get_tags_by_category("ANALYZER"); + local result = get_plugin_components("ANALYZER"); for (i in result) { diff --git a/testing/btest/opt/ZAM-bif-tracking.zeek b/testing/btest/opt/ZAM-bif-tracking.zeek index c65d4932a0..687871038c 100644 --- a/testing/btest/opt/ZAM-bif-tracking.zeek +++ b/testing/btest/opt/ZAM-bif-tracking.zeek @@ -345,7 +345,7 @@ global known_BiFs = set( "get_reporter_stats", "get_resp_seq", "get_script_comments", - "get_tags_by_category", + "get_plugin_components", "get_thread_stats", "get_timer_stats", "getenv",