Commit graph

533 commits

Author SHA1 Message Date
Jon Siwek
2aa84eb86e Deprecate BroType::GetField() and BroType::HasField() 2020-05-14 17:18:00 -07:00
Jon Siwek
103fed9f01 Deprecate RecordType::FieldType(), replace with GetFieldType() 2020-05-14 17:18:00 -07:00
Jon Siwek
455fc29b1a Migrate TypeList to store IntrusivePtrs
This changes return types of TypeList::Types() and
IndexType::IndexTypes() to return std::vector instead of type_list*
2020-05-14 17:18:00 -07:00
Jon Siwek
a60e5e9582 Migrate SMB analyzer to use IntrusivePtr
Deprecates the utf16_bytestring_to_utf8_val() function with replacement
being utf16_to_utf8_val().
2020-05-14 17:18:00 -07:00
Jon Siwek
1abed4fd4c Migrate Tag classes to use IntrusivePtr
Deprecates various methods that previously took raw pointers
2020-05-14 17:18:00 -07:00
Jon Siwek
61649d5da7 Deprecate various IP/packet header Val-building methods
And supply new alternatives that use IntrusivePtr
2020-05-14 17:18:00 -07:00
Jon Siwek
156686b237 Correct spelling of DCE/RPC operation string NetrLogonSameLogonWithFlags
Fixes GH-952
2020-05-04 18:03:14 -07:00
Jon Siwek
fda9498276 Merge remote-tracking branch 'origin/topic/seth/more-file-type-ident'
* origin/topic/seth/more-file-type-ident:
  Adds a note in NEWS about the signature addition and restructuring
  Fixes a small bug in one signature with a duplicate name.
  Organized and added to the shipped file identification signatures.
2020-04-29 16:32:41 -07:00
Seth Hall
43661a2b0b Adds a note in NEWS about the signature addition and restructuring 2020-04-29 11:34:00 -04:00
Tim Wojtulewicz
cb40dbd58b Merge remote-tracking branch 'origin/topic/jsiwek/intrusive-ptr-chipping'
* origin/topic/jsiwek/intrusive-ptr-chipping:
  Deprecate returning Val* from BIFs
  Deprecate binpac::string_to_val
  Deprecate binpac::bytestring_to_val, replace with binpac::to_stringval
  Update deprecated BifEvent::generate_* usages
  Deprecate Connection::Event and Analyzer::Event methods
  Deprecate BuildConnVal() methods and update usages to ConnVal()
  Update all BIFs to return IntrusivePtr instead of Val*
  Update deprecated ValManager::GetPort usages
  Update deprecated ValManager::GetEmptyString usages
  Update deprecated ValManager::GetCount usages
  Update deprecated ValManager::GetInt usages
  Update deprecated ValManager::GetBool usages
  Update deprecated ValManager GetTrue/GetFalse usages
  Deprecate all ValManager "Get" methods
  Change BIFs to return a wrapper object
2020-04-24 16:20:08 -07:00
Johanna Amann
e3de46ba9b Remove connection_external
This event was forgotten in our broccoli cleanup. It cannot be
raised by anything anymore.
2020-04-21 09:00:05 -07:00
Jon Siwek
80d3918b13 Deprecate returning Val* from BIFs 2020-04-20 15:20:42 -07:00
Jon Siwek
6c0a9b0d8f Deprecate binpac::string_to_val 2020-04-20 14:43:06 -07:00
Jon Siwek
743303950b Deprecate binpac::bytestring_to_val, replace with binpac::to_stringval 2020-04-20 14:30:49 -07:00
Jon Siwek
81517bd703 Update deprecated BifEvent::generate_* usages 2020-04-17 18:42:58 -07:00
Jon Siwek
9b2fb29aca Deprecate Connection::Event and Analyzer::Event methods
And update usages to the "EnqueueEvent" methods.
2020-04-16 19:45:30 -07:00
Jon Siwek
2a63e4a4a2 Deprecate BuildConnVal() methods and update usages to ConnVal()
The later being a new method that returns IntrusivePtr
2020-04-16 17:00:01 -07:00
Jon Siwek
202b3f877d Deprecate all ValManager "Get" methods
Alternate methods that return IntrusivePtr are available in similarly
named methods that omit the "Get" prefix.
2020-04-16 16:40:57 -07:00
Johanna Amann
876c803d75 Merge remote-tracking branch 'origin/topic/timw/776-using-statements'
* origin/topic/timw/776-using-statements:
  Remove 'using namespace std' from SerialTypes.h
  Remove other using statements from headers
  GH-776: Remove using statements added by PR 770

Includes small fixes in files that changed since the merge request was
made.

Also includes a few small indentation fixes.
2020-04-09 13:31:07 -07:00
Jon Siwek
1210257af9 Update submodule(s)
[nomail]
2020-04-08 14:06:56 -07:00
Johanna Amann
4ee84b69f2 Merge remote-tracking branch 'origin/topic/jsiwek/udp_content_delivery_ports_use_resp'
* origin/topic/jsiwek/udp_content_delivery_ports_use_resp:
  Add "udp_content_ports" option
  Add new "udp_content_delivery_ports_use_resp" option
2020-04-07 14:28:49 -07:00
Jon Siwek
e66148a13a Merge branch 'topic/ak/rdpeudp'
- Squashed the original commit set
- Cleaned up formatting
- Fixed register_for_ports() for right RDPEUDP analyzer

* topic/ak/rdpeudp:
  Add RDP over UDP analyzer
2020-04-02 18:31:40 -07:00
Robin Sommer
033fdcca74 Merge branch 'topic/timw/the-great-embooleanating'
(Squashed this one before merge).

* topic/timw/the-great-embooleanating:
  The Great Embooleanating
2020-03-31 06:57:39 +00:00
Tim Wojtulewicz
fd5e15b116 The Great Embooleanating
A large number of functions had return values and/or arguments changed
to use ``bool`` types instead of ``int``.
2020-03-31 06:41:54 +00:00
Johanna Amann
5453c6004e Merge remote-tracking branch 'origin/topic/jsiwek/rocksdb-opt-in'
* origin/topic/jsiwek/rocksdb-opt-in:
  GH-878: Make RocksDB usage opt-in and add --enable-rocksdb configure flag

Fixes GH-878
2020-03-30 13:23:09 -07:00
Jon Siwek
3c1ad8b962 GH-878: Make RocksDB usage opt-in and add --enable-rocksdb configure flag 2020-03-26 12:18:42 -07:00
Jon Siwek
5e496e43b7 Deprecate Analyzer::ConnectionEvent()
And update usages to Analyzer::EnqueueConnEvent()
2020-03-25 18:40:49 -07:00
Jon Siwek
e394ea38bc Deprecate file_analysis::File::FileEvent methods using val_list args
And update usages to the overload that takes a zeek::Args instead.
2020-03-25 18:40:49 -07:00
Jon Siwek
de47a50dde Deprecate Connection::ConnectionEvent methods
And update usages to Connection::EnqueueEvent
2020-03-25 18:39:56 -07:00
Jon Siwek
0db484cc7a Deprecate EventMgr::QueueEvent() and update usages to Enqueue() 2020-03-25 16:09:33 -07:00
Jon Siwek
b667c637df Deprecate Func::Call(val_list*, ...)
The version taking a vector of intrusive pointers should be used
instead.  A variadic version is also added that forwards all arguments.
2020-03-24 20:48:32 -07:00
Jon Siwek
4e1ac4e124 Use vector<IntrusivePtr<Val>> for Func::Call and Event queuing args
This change may break BIFs that use @ARGS@, @ARG@, or @ARGC@ since their
types have changed.
2020-03-24 16:50:18 -07:00
Johanna Amann
da5fca7163 Merge branch 'topic/johanna/gh-744-cache-the-heck-out-of-these-certs'
* topic/johanna/gh-744-cache-the-heck-out-of-these-certs:
  X509 caching API change: callback gets entry directly
  Address feedback
  Small default updates & external baselines.
  X509 caching: small API changes, tests & test updates
  Certificate caching - now working in principle.
  First (sadly not completely working) approach at caching X509 certificates
2020-03-12 13:44:07 -07:00
Tim Wojtulewicz
822567b3f9 Merge remote-tracking branch 'origin/topic/jsiwek/32bit-compat'
* origin/topic/jsiwek/32bit-compat:
  Improve formatting of doubles that are close to integers
  Improve HTTP version number comparisons
  Add a 32-bit task to Cirrus CI config
  Replace va_list fmt() overload with vfmt()
  Format tables indexed by patterns consistently across 32-bit/64-bit
  Format interval values consistently across 32-bit/64-bit platforms
2020-02-24 18:49:33 -07:00
Max Kellermann
55398ed5d8 OpaqueVal: use class IntrusivePtr 2020-02-21 20:50:11 +01:00
Jon Siwek
8fed26824b Replace va_list fmt() overload with vfmt()
Using an overload that takes a va_list argument potentially causes
accidental misuse on platforms (e.g. 32-bit) where va_list is
implemented as a type that may collide with commonly-used argument
types.

For example:

    char* c = copy_string("hi");
    fmt("%s", (const char*)c);
    fmt("%s", c);

The first fmt() call correctly goes through fmt(const char*, ...) first,
but the second mistakenly goes through fmt(const char*, va_list) first
because variadic function overloads have lower priority during overload
resolution and va_list on a 32-bit system happens to be defined as a
pointer type that can match with "char*" but not "const char*".
2020-02-14 21:40:36 -08:00
Jon Siwek
996b3d523a Update to start of 3.2.0 development 2020-02-08 16:08:01 -08:00
Jon Siwek
6c72b09bf5 Note new CMake 3.0+ and C++17 requirements in NEWS 2020-02-07 21:11:35 -08:00
Robin Sommer
a394d2e0d7 Update NEWS to point out Broker wireformat change. 2020-02-07 10:38:25 +00:00
Johanna Amann
391164c9bc Merge remote-tracking branch 'origin/topic/johanna/table-on-change'
* origin/topic/johanna/table-on-change:
  &on_change: Address feedback of Jon.
  &on_change: incooperate feedback of Jon.
  &on_change wrapup: documentation, tests, whitespacing
  Table expiry now raises &on_change handlers
  Prevent recursion of &on_change handlers.
  Make bro_broker::val_to_data take a const Val* instead of a Val
  &on_change: add insertion/change notifications.
  &on_change working for removals from tables.
  Change signature of &on_change handler
  Beginning implementation of &on_change for tables.
2020-02-06 15:01:03 -08:00
Tim Wojtulewicz
5171f25e3a Update NEWS about plugin breakage from the include-file changes 2020-02-04 14:15:14 -07:00
Tim Wojtulewicz
fda8e3fd79 Update NEWS and docs submodule 2020-01-31 10:13:10 -07:00
Jon Siwek
70b45d1aba Merge remote-tracking branch 'origin/topic/robin/631-deprecation-v2'
During merge I split the test for bro_init/bro_done/bro_script_loaded
event errors into individual tests since the other testing of the zeek
versions of those events seemed fine to otherwise keep.

* origin/topic/robin/631-deprecation-v2:
  Update NEWS for naming changes.
  Small cleanup and updating submodules.
  Remove test for legacy plugin.
  Remove legancy symlinks in aux/.
  Add warnings when loading scripts ending in ".bro", or using legacy environment variables.
  Fix missing rename.
  No longer symlink local.zeek to local.bro.
  Update notice user agent.
  Remove old_comm_usage_is_ok.
  Remove bro-config.h.in and bro-path-dev.in.
  Change Bro wrapper script to now abort when old executable names are still used.
  Remove APIs that were explicitly deprecated to be removed in 3.1.
2020-01-30 19:19:56 -08:00
Robin Sommer
6bcd583836 Merge remote-tracking branch 'origin/topic/jsiwek/supervisor'
* origin/topic/jsiwek/supervisor: (44 commits)
  Add note that Supervisor script APIs are unstable until 4.0
  Move command-line arg parsing functions to Options.{h,cc}
  Add btests for supervisor stem/leaf process revival
  Move supervisor control events into SupervisorControl namespace
  Fix supervisor "destroy" call on nodes not currently alive
  Move supervisor source files into supervisor/
  Address supervisor code re-factoring feedback from Robin
  Convert supervisor internals to rapidjson
  Add Supervisor documentation
  Add supervisor btests
  Improve logging of supervised node errors
  Fix supervised node inheritence of command-line script paths
  Improve normalize_path() util function
  Use a timer to check for death of supervised node's parent
  Improve supervisor checks for parent process termination
  Improve handling of premature supervisor stem exit
  Improve supervisor signal handler safety
  Remove unused supervisor config options
  Cleanup minor Supervisor TODOs
  Improve supervisor debug logging
  ...
2020-01-29 13:11:04 +00:00
Robin Sommer
42a7629695 Update NEWS for naming changes. 2020-01-29 12:38:29 +00:00
Frerich Raabe
4955356a52 Document recent fix for decompose_uri in release notes 2020-01-24 22:24:05 +01:00
Robin Sommer
8170baabef Merge remote-tracking branch 'origin/topic/timw/595-rapidjson'
Tweaks:
    - Small change to the logic for removing quotes around strings.
    - Updated NEWS & COPYING.3rdparty
    - Use of intrusive_ptr for stack-allocated StringVals
    - Little bit of refactoring (I would love to merge the two BuildJSON() functions, too, but that's a larger task)

* origin/topic/timw/595-rapidjson:
  Use the list of files from clang-tidy when searching for unit tests
  Optimize json_escape_utf8 a bit by removing repeated calls to string methods
  Expand unit test for json_escape_utf8 to include all of the strings from the ascii-json-utf8 btest
  GHI-595: Convert from nlohmann/json to rapidjson for performance reasons
  Convert type-checking macros to actual functions
2020-01-18 10:49:15 +00:00
Jon Siwek
a4fab5327a Merge remote-tracking branch 'origin/topic/timw/util-unit-tests'
* origin/topic/timw/util-unit-tests:
  fixup! Add unit tests to util.cc and module_util.cc
  Mark safe_snprintf and safe_vsnprintf as deprecated, remove uses of them
  Add unit tests to util.cc and module_util.cc
2020-01-06 09:44:43 -08:00
Jon Siwek
30d0b21ecc Merge remote-tracking branch 'origin/topic/dev/print-to-log'
Adjustments during merge:

- kept the UNKNOWN Log::ID as placeholder value
- changed the coverage.find-bro-logs test to check for arbitrary $path
  field values instead of just string literals
- don't force EnumVal to unsigned integer since the relevant union member
  is the signed integer and added the relevant enum values/types to
  .bif files for easier access
- compare FILE* versus file name to check for stdout equality (don't
  think it matters much, just a bit more efficient)
- minor whitespace/style tweaks

* origin/topic/dev/print-to-log:
  Added a non boolean configuration and other changes as suggested by Jon
  Allow Print Statements to be redirected to a Log# This is a combination of 3 commits.
2019-12-02 13:47:09 -08:00
Robin Sommer
a00f139f1c Merge remote-tracking branch 'origin/topic/jsiwek/gh-646-conn-removal'
Clarified doc strings a bit.

* origin/topic/jsiwek/gh-646-conn-removal:
  GH-646: add new "successful_connection_remove" event
2019-11-18 12:08:12 +00:00