Commit graph

15378 commits

Author SHA1 Message Date
zeek-bot
5954d9d36c Update doc submodule [nomail] [skip ci] 2022-07-13 00:48:15 +00:00
Tim Wojtulewicz
6b4c99c64a Merge remote-tracking branch 'origin/topic/timw/more-bro-renaming'
* origin/topic/timw/more-bro-renaming:
  Rename bro_version and BRO_PLUGIN_BRO_VERSION to zeek names
  Update binpac, bifcl, and gen-zam submodules for renaming changes
  Deprecate BRO_PLUGIN_API_VERSION, create zeek::PLUGIN_API_VERSION
  Deprecate HOOK_BRO_OBJ_DTOR and related methods
  Miscellaneous deprecations and renaming
  Rename all of bro lexer methods and such
  Stop installing the bro symlink, it's been long enough
  Deprecate bro_inet_ntop.{c,h}
  Deprecate bro_int_t and bro_uint_t
2022-07-12 14:18:05 -07:00
Tim Wojtulewicz
a9328b5c44 Rename bro_version and BRO_PLUGIN_BRO_VERSION to zeek names 2022-07-12 13:58:42 -07:00
Tim Wojtulewicz
25c63ed7ab Update binpac, bifcl, and gen-zam submodules for renaming changes 2022-07-12 13:58:42 -07:00
Tim Wojtulewicz
99bc16073a Deprecate BRO_PLUGIN_API_VERSION, create zeek::PLUGIN_API_VERSION 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
1496b99a34 Deprecate HOOK_BRO_OBJ_DTOR and related methods 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
4d4c6280e9 Miscellaneous deprecations and renaming 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
d875ad1a96 Rename all of bro lexer methods and such 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
8829292c0c Stop installing the bro symlink, it's been long enough 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
18ae40277a Deprecate bro_inet_ntop.{c,h} 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
f624c18383 Deprecate bro_int_t and bro_uint_t 2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
d066013793 Merge remote-tracking branch 'origin/topic/timw/btest-cleanup'
* origin/topic/timw/btest-cleanup:
  Run clang-format on all of our plugin test c++ files
2022-07-12 12:00:19 -07:00
Tim Wojtulewicz
dc65b6248c Run clang-format on all of our plugin test c++ files 2022-07-12 11:59:55 -07:00
Benjamin Bannier
a7e632557a Publish container images to ECR in addition to docker.io. 2022-07-12 10:21:52 +02:00
Christian Kreibich
b59bfe5558 Merge branch 'topic/christian/gh-2259-fix-dir-test'
* topic/christian/gh-2259-fix-dir-test:
  Fix race condition in scripts.base.utils.dir test
  Remove needless "touch" in scripts.base.utils.dir test
2022-07-11 17:29:42 -07:00
Christian Kreibich
3d87400f1d Fix race condition in scripts.base.utils.dir test
The sequence of

- adding a new file
- deleting an existing one
- waiting for Zeek to notice the addition
- re-adding the pre-existing file

was prone to a race: it could happen that Zeek's directory observation would see
the new file in one round, and by the time the next round happens the removal
and re-addition had already happened, thus missing the change and failing the
test.

This avoids the race by placing the removal of the existing file before the
addition of the new one, ensuring that when Zeek notices the addition (and
pushes the test to the next round), it has also seen the removal, so the
re-addition cannot get lost.
2022-07-11 16:26:45 -07:00
Christian Kreibich
e2a7b890ed Remove needless "touch" in scripts.base.utils.dir test
This touch happened after teardown of Zeek, so didn't add to the test.
2022-07-11 16:05:37 -07:00
Christian Kreibich
e947e1d1c2 Management framework: additional context in a few log messages
This adds request IDs in a few places that didn't mention them, and makes
requests to the Supervisor that act on all current nodes explicit.
2022-07-11 13:00:35 -07:00
Christian Kreibich
f6597ffabf Management framework: await Supervisor peering before sending agent's hello
Failing to do so could open a race condition in which a quickly connecting
controller could send instructions whose resulting Supervisor interactions got
lost.
2022-07-11 13:00:35 -07:00
Christian Kreibich
a505a7814f Management framework: remove outdated comment
The agent has a request_expired timeout handler at this point.
2022-07-11 13:00:35 -07:00
Tim Wojtulewicz
f3313df743 Merge remote-tracking branch 'origin/topic/bbannier/issue-2238'
* origin/topic/bbannier/issue-2238:
  Fix default build with `--disable-cpp-tests`.
2022-07-11 09:47:00 -07:00
Tim Wojtulewicz
c4ccc37789 Merge remote-tracking branch 'origin/topic/vern/lambda-profiling-fix'
* origin/topic/vern/lambda-profiling-fix:
  fix for script profiling of lambda functions
2022-07-11 09:45:25 -07:00
Tim Wojtulewicz
1226aa538a Merge remote-tracking branch 'origin/topic/vern/zam-vector-cond-fix'
* origin/topic/vern/zam-vector-cond-fix:
  Fix for ZAM optimization of '?' conditional with vector-valued result
2022-07-11 09:44:05 -07:00
Robin Sommer
8df0d02528 Bump documentation. 2022-07-11 12:52:12 +02:00
Robin Sommer
62e9bf5628 Merge remote-tracking branch 'origin/topic/awelzel/policy-pattern-literal-dots'
* origin/topic/awelzel/policy-pattern-literal-dots:
  policy: Use literal dots for patterns used against content-type and hostname
2022-07-11 12:51:08 +02:00
Arne Welzel
c4970e6d4a policy: Use literal dots for patterns used against content-type and hostname
The following two patterns were identified while reviewing patterns that
match on any characters. The intention likely was to match actual
literal dots.
2022-07-11 10:34:47 +02:00
Christian Kreibich
9607deeae0 Stop signal-masking upon running unit tests
It helps to be able to ctrl-c these.
2022-07-10 21:50:47 -07:00
Dominik Charousset
d3ad3c618a Avoid race conditions in broker.ssl-mismatch test 2022-07-10 15:47:43 +02:00
Christian Kreibich
9138d5c64e Pause signal-masking during script parsing
Script parsing includes reading script content from stdin, which in turn
includes interactive Zeek sessions. Keeping the signals masked there broke
ctrl-c behavior.
2022-07-09 11:19:41 -07:00
Christian Kreibich
5beb68194d Add btests to verify Zeek's handling of SIGTERM and reading stdin
The core.load-stdin test checks Zeek's ability to read scripts from stdin.
core.sigterm-regular and core.sigterm-stdin verify that SIGTERM shuts down a
Zeek process during normal operation and while reading script content from
stdin, respectively. For technical reasons we don't test with SIGINT, as ctrl-c
would trigger -- see comments for details.
2022-07-09 11:17:14 -07:00
mAsk°
ccc9d0a002
Merge branch 'zeek:master' into topic/amazingpp/table-values-and-keys 2022-07-09 21:07:49 +08:00
Benjamin Bannier
b13f8f4dd4 Fix default build with --disable-cpp-tests.
For a build configured with `--disable-cpp-tests` we globally set
`-DDOCTEST_CONFIG_DISABLE`. Spicy does not expect this define to be used
and its unit tests fail to build with it.

This patch adds a Zeek-side workaround for that. We now do not build the
Spicy unit test targets as part of `ALL` anymore.

Closes #2238.
2022-07-09 12:57:32 +02:00
Christian Kreibich
963b27f054 Add procps/procps-ng to several CI Docker images
It helps to have "ps" available for testing.
2022-07-09 00:52:44 -07:00
zeek-bot
d957f883df Update doc submodule [nomail] [skip ci] 2022-07-09 00:43:07 +00:00
Tim Wojtulewicz
c697c8e19f Merge remote-tracking branch 'origin/topic/timw/fix-broken-broker-convert-call'
* origin/topic/timw/fix-broken-broker-convert-call:
  Fix usage of broker::convert(double,timespan)
2022-07-08 10:13:12 -07:00
AmazingPP
ba552ceeaf Add table_keys function 2022-07-09 01:11:31 +08:00
Tim Wojtulewicz
a266d32dca Fix usage of broker::convert(double,timespan) 2022-07-08 09:57:12 -07:00
Tim Wojtulewicz
0728676fd6 Merge remote-tracking branch 'origin/topic/timw/avoid-extra-reallocs'
* origin/topic/timw/avoid-extra-reallocs:
  Avoid calling safe_realloc unnecessarily from ODesc::Grow()
2022-07-08 09:55:47 -07:00
Tim Wojtulewicz
c9127715c0 Avoid calling safe_realloc unnecessarily from ODesc::Grow() 2022-07-08 09:55:16 -07:00
AmazingPP
cb71b15eab Add table_values function 2022-07-09 00:19:06 +08:00
Robin Sommer
e8e6fa8fed Merge remote-tracking branch 'origin/topic/awelzel/913-plugin-debug-stream-validation'
One change: turns out that zeek-config isn't in PATH, so I prefixed it
with $BUILD.

* origin/topic/awelzel/913-plugin-debug-stream-validation:
  zeek-setup: Validate plugin debug streams during startup
2022-07-08 10:00:39 +02:00
Christian Kreibich
28b7ec2cc5 Bump broker and zeek-archiver submodules to pull in CI updates 2022-07-07 14:20:24 -07:00
Christian Kreibich
23cac286f3 Merge branch 'topic/christian/ci-update'
* topic/christian/ci-update:
  CI: add FreeBSD 13.1 and fix broken link
  CI: Add OpenSUSE Tumbleweed
  CI: drop Ubuntu 21.10, EOL 2022-07-14
  CI: drop Debian 9, EOL 2022-06-30
2022-07-07 14:14:15 -07:00
Vern Paxson
0706e8869d Fix for ZAM optimization of '?' conditional with vector-valued result 2022-07-07 13:08:28 -07:00
Vern Paxson
77ca9ae013 fix for script profiling of lambda functions 2022-07-07 11:01:54 -07:00
Arne Welzel
d703033ae6 zeek-setup: Validate plugin debug streams during startup
Providing an unknown plugin debug stream with -B was previously silently
accepted. This caused user confusing as the behavior is "no output, but
seems to work".

Check the enabled debug streams once all plugins have been loaded and
exit early on for invalid streams.

    $ ZEEK_PLUGIN_PATH=./build zeek -B plugin-zeek-myplugin -e 'print zeek_version();'
    error in <command line>, line 3: No plugin debug stream 'plugin-zeek-myplugin' found

Closes #913.
2022-07-07 17:56:19 +02:00
Robin Sommer
691b099de1 Merge remote-tracking branch 'origin/topic/awelzel/2120-logdir-leftover'
* origin/topic/awelzel/2120-logdir-leftover:
  sqlite default-logdir test: Remove ls ./logs baseline
  logging/sqlite: Recognize Log::default_logdir and place files there if set
  logging: Introduce Log::default_logdir deprecate LogAscii::logdir and per writer logdir
  logging/ascii: Fix .shadow paths when using LogAscii::logdir
2022-07-07 08:06:13 +02:00
Christian Kreibich
94ef182a97 CI: add FreeBSD 13.1 and fix broken link 2022-07-06 21:58:56 -07:00
Arne Welzel
a2bcb1bf28 sqlite default-logdir test: Remove ls ./logs baseline
Observed .sqlite-journal files and missing reporter.sqlite files
in CI runs. Subsequently reading the ./test.sqlite file is more
reliable and should be good enough.
2022-07-06 22:57:14 +02:00
Arne Welzel
93584c7c7f logging/sqlite: Recognize Log::default_logdir and place files there if set 2022-07-06 18:54:29 +02:00