* 'master' of https://github.com/dnthayer/zeek:
  Update tests and baselines due to renaming all scripts
  Rename all scripts to have ".zeek" file extension
  Update a few tests due to scripts with new file extension
  Add test cases to verify new file extension is recognized
  Fix the core/load-duplicates.bro test
  Update script search logic for new file extension
  Remove unnecessary ".bro" from @load directives
This commit is contained in:
Jon Siwek 2019-04-16 11:56:00 -07:00
commit 4574799609
427 changed files with 1921 additions and 1655 deletions

18
CHANGES
View file

@ -1,4 +1,22 @@
2.6-223 | 2019-04-16 11:56:00 -0700
* Update tests and baselines due to renaming all scripts (Daniel Thayer)
* Rename all scripts to have ".zeek" file extension (Daniel Thayer)
* Add test cases to verify new file extension is recognized (Daniel Thayer)
* Fix the core/load-duplicates.bro test (Daniel Thayer)
* Update script search logic for new .zeek file extension (Daniel Thayer)
When searching for script files, look for both the new and old file
extensions. If a file with ".zeek" can't be found, then search for
a file with ".bro" as a fallback.
* Remove unnecessary ".bro" from @load directives (Daniel Thayer)
2.6-212 | 2019-04-12 10:12:31 -0700 2.6-212 | 2019-04-12 10:12:31 -0700
* smb2_write_response event added (Mauro Palumbo) * smb2_write_response event added (Mauro Palumbo)

15
NEWS
View file

@ -71,6 +71,21 @@ New Functionality
Changed Functionality Changed Functionality
--------------------- ---------------------
- ``$prefix/share/bro/site/local.bro`` has been renamed to
``local.zeek``. If you have made customizations to that file, it
will no longer be loaded by default by BroControl (ZeekControl),
but you can simply copy it to ``local.zeek`. You may also want to
remove old ``local.bro`` files to avoid potential confusion.
- All scripts ending in ``.bro`` that ship with the Zeek source tree have
been renamed to ``.zeek``.
- The search logic for the ``@load`` script directive now prefers files
ending in ``.zeek``, but will fallback to loading a ``.bro`` file if it
exists. E.g. ``@load foo`` will check for ``foo.zeek`` and then ``foo.bro``.
Note that ``@load foo.bro`` will not automatically check for
``@load foo.zeek``.
- The for-loop index variable for vectors has been changed from - The for-loop index variable for vectors has been changed from
'int' to 'count' type. It's unlikely this would alter/break any 'int' to 'count' type. It's unlikely this would alter/break any
script behavior unless they were explicitly inspecting the variable's script behavior unless they were explicitly inspecting the variable's

View file

@ -1 +1 @@
2.6-212 2.6-223

@ -1 +1 @@
Subproject commit 44622332fb1361383799be33e365704caacce199 Subproject commit d787c301ce1183765773a0a7fd29bf142dc11f0d

@ -1 +1 @@
Subproject commit 2c8d31a439a3712af3a7a0342a955a78784521a5 Subproject commit 9ee2eab59925f3b846be6531a0569df3c8580591

@ -1 +1 @@
Subproject commit 41841d8f64bdb062860309f7b36513212e81befa Subproject commit 5d568e69a2f59edf6b026c2e4d591a6c415f51d0

@ -1 +1 @@
Subproject commit a49144d3dd26d906ad906ace97db3d093c510142 Subproject commit 2844f70062c778094c6baf3864177161843517ac

@ -1 +1 @@
Subproject commit de0c8e0ecea39dd556a16f4ecc0d482e936c38ac Subproject commit d1d0a8bb5c7999d81ad0de8b4474fc36ba6431dc

@ -1 +1 @@
Subproject commit 96c787cb396a5aad2d3ea3b2087f2a1fcd6b7216 Subproject commit b232d84996b3da69e1ca08dfc7777b5d24c369e9

2
cmake

@ -1 +1 @@
Subproject commit 0c1ee634a8f915e738da72c797a17aad9cb618dd Subproject commit 1c527236d083af129cf130b205d61b336c475ae8

2
doc

@ -1 +1 @@
Subproject commit e9f6728f13165148ca8ffe0b373148ff78b10c6a Subproject commit 5af14fffad53d2c43541a0169494c8fb9b5b2e46

View file

@ -2,8 +2,8 @@ include(InstallPackageConfigFile)
install(DIRECTORY ./ DESTINATION ${BRO_SCRIPT_INSTALL_PATH} FILES_MATCHING install(DIRECTORY ./ DESTINATION ${BRO_SCRIPT_INSTALL_PATH} FILES_MATCHING
PATTERN "site/local*" EXCLUDE PATTERN "site/local*" EXCLUDE
PATTERN "test-all-policy.bro" EXCLUDE PATTERN "test-all-policy.zeek" EXCLUDE
PATTERN "*.bro" PATTERN "*.zeek"
PATTERN "*.sig" PATTERN "*.sig"
PATTERN "*.fp" PATTERN "*.fp"
) )
@ -11,6 +11,6 @@ install(DIRECTORY ./ DESTINATION ${BRO_SCRIPT_INSTALL_PATH} FILES_MATCHING
# Install all local* scripts as config files since they are meant to be # Install all local* scripts as config files since they are meant to be
# user modify-able. # user modify-able.
InstallPackageConfigFile( InstallPackageConfigFile(
${CMAKE_CURRENT_SOURCE_DIR}/site/local.bro ${CMAKE_CURRENT_SOURCE_DIR}/site/local.zeek
${BRO_SCRIPT_INSTALL_PATH}/site ${BRO_SCRIPT_INSTALL_PATH}/site
local.bro) local.zeek)

View file

@ -1,6 +1,6 @@
module PE; module PE;
@load ./consts.bro @load ./consts
export { export {
redef enum Log::ID += { LOG }; redef enum Log::ID += { LOG };

View file

@ -1,6 +1,6 @@
##! A framework for establishing and controlling a cluster of Bro instances. ##! A framework for establishing and controlling a cluster of Bro instances.
##! In order to use the cluster framework, a script named ##! In order to use the cluster framework, a script named
##! ``cluster-layout.bro`` must exist somewhere in Bro's script search path ##! ``cluster-layout.zeek`` must exist somewhere in Bro's script search path
##! which has a cluster definition of the :bro:id:`Cluster::nodes` variable. ##! which has a cluster definition of the :bro:id:`Cluster::nodes` variable.
##! The ``CLUSTER_NODE`` environment variable or :bro:id:`Cluster::node` ##! The ``CLUSTER_NODE`` environment variable or :bro:id:`Cluster::node`
##! must also be sent and the cluster framework loaded as a package like ##! must also be sent and the cluster framework loaded as a package like
@ -192,7 +192,7 @@ export {
global worker_count: count = 0; global worker_count: count = 0;
## The cluster layout definition. This should be placed into a filter ## The cluster layout definition. This should be placed into a filter
## named cluster-layout.bro somewhere in the BROPATH. It will be ## named cluster-layout.zeek somewhere in the BROPATH. It will be
## automatically loaded if the CLUSTER_NODE environment variable is set. ## automatically loaded if the CLUSTER_NODE environment variable is set.
## Note that BroControl handles all of this automatically. ## Note that BroControl handles all of this automatically.
## The table is typically indexed by node names/labels (e.g. "manager" ## The table is typically indexed by node names/labels (e.g. "manager"
@ -200,7 +200,7 @@ export {
const nodes: table[string] of Node = {} &redef; const nodes: table[string] of Node = {} &redef;
## Indicates whether or not the manager will act as the logger and receive ## Indicates whether or not the manager will act as the logger and receive
## logs. This value should be set in the cluster-layout.bro script (the ## logs. This value should be set in the cluster-layout.zeek script (the
## value should be true only if no logger is specified in Cluster::nodes). ## value should be true only if no logger is specified in Cluster::nodes).
## Note that BroControl handles this automatically. ## Note that BroControl handles this automatically.
const manager_is_logger = T &redef; const manager_is_logger = T &redef;

View file

@ -1,2 +0,0 @@
@load ./main.bro
@load ./magic

View file

@ -0,0 +1,2 @@
@load ./main
@load ./magic

View file

@ -43,8 +43,8 @@ export {
# ### High-level API. # ### High-level API.
# ### # ###
# ### Note - other high level primitives are in catch-and-release.bro, shunt.bro and # ### Note - other high level primitives are in catch-and-release.zeek,
# ### drop.bro # ### shunt.zeek and drop.zeek
## Allows all traffic involving a specific IP address to be forwarded. ## Allows all traffic involving a specific IP address to be forwarded.
## ##

View file

@ -251,7 +251,7 @@ function controller_init_done(controller: Controller)
event OpenFlow::controller_activated(controller$state$_name, controller); event OpenFlow::controller_activated(controller$state$_name, controller);
} }
# Functions that are called from cluster.bro and non-cluster.bro # Functions that are called from cluster.zeek and non-cluster.zeek
function register_controller_impl(tpe: OpenFlow::Plugin, name: string, controller: Controller) function register_controller_impl(tpe: OpenFlow::Plugin, name: string, controller: Controller)
{ {

Some files were not shown because too many files have changed in this diff Show more