Commit graph

5140 commits

Author SHA1 Message Date
Daniel Thayer
6bf8e892b3 Fix typo in Bro 2.2 NEWS
The examples about string indexing for Bro 2.2 had a typo (comma should
be colon).
2013-12-18 14:51:08 -06:00
Daniel Thayer
0a90ddc1dd Merge remote-tracking branch 'origin/master' into topic/dnthayer/doc-updates 2013-12-18 14:35:22 -06:00
Daniel Thayer
415fe678e2 Fixed typo in the Quick Start Guide
Also clarified the instructions about modifying crontab.
2013-12-18 14:31:56 -06:00
Robin Sommer
ae9e0d4cb6 Fixing segfault with mismatching set &default in record field. 2013-12-18 09:17:05 -08:00
Robin Sommer
540ae8ad51 Updating submodule. 2013-12-16 20:15:28 -08:00
Robin Sommer
5efce5c7e4 Compile fix. 2013-12-16 12:26:12 -08:00
Robin Sommer
b91b62b2b1 Test updates. 2013-12-16 11:57:57 -08:00
Robin Sommer
5a8360af24 Updating submodules. 2013-12-16 11:57:57 -08:00
Robin Sommer
87a1618309 Start of a plugin writing how-to.
See doc/devel/plugins.rst. It includes a simple example and background
on how things work.
2013-12-16 11:57:57 -08:00
Robin Sommer
a80dd10215 Updates of the dynamic plugin code.
Includes:

    - Cleanup of the plugin API, in particular generally changing
      const char* to std::string

    - Renaming environment variable BRO_PLUGINS to BRO_PLUGIN_PATH,
      defaulting to <prefix>/lib/bro/plugins

    - Reworking how dynamic plugins are searched and activated. See
      doc/devel/plugins.rst for details.

    - New @load-plugin directive to explicitly activate a plugin

    - Support for Darwin. (Linux untested right now)

    - The init-plugin updates come with support for "make test", "make
      sdist", and "make bdist" (see how-to).

    - Test updates.

Notes: The new hook mechanism, which allows plugins to hook into Bro's
core a well-defined points, is still essentially untested.
2013-12-16 11:57:56 -08:00
Robin Sommer
987452beff Cleanup of plugin component API.
- Move more functionality into base class.
- Remove cctors and assignment operators (weren't actually needed anymore)
- Switch from const char* to std::string.
2013-12-16 10:07:20 -08:00
Robin Sommer
207b7e7102 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Improve warnings emitted from raw/execute input reader.
2013-12-16 08:50:54 -08:00
Vlad Grigorescu
8688c764a0 Fix a couple memleaks. 2013-12-13 15:04:43 -05:00
Robin Sommer
e9413c9361 New default for plugin installation path. 2013-12-12 16:50:56 -08:00
Jon Siwek
8ea56ae567 Improve warnings emitted from raw/execute input reader.
Some return values of the setpgid() call in that parent proc are ok
(or contradict reality).
2013-12-12 13:26:19 -06:00
Robin Sommer
928a5881b1 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Another attempt to improve core.when-interpreter-exceptions unit test.
2013-12-12 07:13:33 -08:00
Jon Siwek
63c36d58f3 Another attempt to improve core.when-interpreter-exceptions unit test.
lookup_hostname("localhost") occassionally timed out (after allowed 10
secs) when running test suite on some systems.  Not sure why, but
changed to use the Exec module for when block conditions instead as the
scope of the test doesn't depend on a particular type of condition, it
just needs something that will work reliably/quickly.
2013-12-11 14:28:23 -06:00
Vlad Grigorescu
f3c0d17541 Basic RADIUS functionality implemented. 2013-12-10 22:09:16 -05:00
Vlad Grigorescu
ccd8b15d52 Merge branch 'master' of ssh://git.bro.org/bro into topic/vladg/radius 2013-12-10 19:40:00 -05:00
Robin Sommer
6c20df11cc Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix uninitialized field in basename/dirname util wrapper.
2013-12-10 15:03:22 -08:00
Jon Siwek
5a67135486 Fix uninitialized field in basename/dirname util wrapper.
Shouldn't cause a problem as it's always set in subclass ctors,
just silences a coverity warning.
2013-12-10 14:08:09 -06:00
Justin Azoff
cbe48258f6 fix the caching of recently validated certs
The recently_validated_certs table was being checked for entries, but
missing hashes were not being added to it after validation.
2013-12-10 11:27:19 -05:00
Robin Sommer
e8739f785b Merge remote-tracking branch 'origin/topic/bernhard/input-error-fixes'
* origin/topic/bernhard/input-error-fixes:
  Several fixes for input manager error handling.

BIT-1106 #merged
2013-12-09 15:21:18 -08:00
Robin Sommer
49a3d53970 Updating submodule(s).
[nomail]
2013-12-09 13:54:23 -08:00
Robin Sommer
ca37f3d2dd Merge remote-tracking branch 'origin/topic/jsiwek/misc-fixes'
BIT-1105 #merged

* origin/topic/jsiwek/misc-fixes:
  Fix table &default reference counting for record ctor expressions.
  Close signature files after done parsing.
  Fix unlikely null ptr deref in broxygen::Manager.
  FreeBSD build fix addendum: unintended variable shadowing.
  Fix build on FreeBSD.
2013-12-09 13:26:47 -08:00
Robin Sommer
5049d68c1b Merge remote-tracking branch 'origin/topic/seth/ie11-software-parsing'
* origin/topic/seth/ie11-software-parsing:
  Updated software framework to support parsing IE11 user-agent strings.
  Fix the irc_reply event for several server message types.

BIT-1104 #merged
2013-12-09 13:21:20 -08:00
Robin Sommer
b8c511f31f Merge remote-tracking branch 'origin/topic/bernhard/ticket1103'
* origin/topic/bernhard/ticket1103:
  fix memory leak in input framework.

BIT-1103 #merged
BIT-1095 # Add to 2.2.1
2013-12-09 13:19:22 -08:00
Robin Sommer
6b743b74f5 Merge remote-tracking branch 'origin/topic/jsiwek/broxygen'
* origin/topic/jsiwek/broxygen:
  Minor Broxygen improvements, addresses BIT-1098.

BIT-1098 #merged
2013-12-09 13:17:48 -08:00
Jon Siwek
dedc39d784 Minor Broxygen improvements, addresses BIT-1098.
- Internals: move type alias table to private static BroType member.

- Sphinx extension: now uses absolute path to bro binary.

- reST ouput formatting: remove "param" from function desriptions
  and change package overview docs so script link+summaries render
  consistently.
2013-12-06 09:35:35 -06:00
Bernhard Amann
3c59aa9459 Several fixes for input manager error handling.
- First:
Due to architectural constraints, it is very hard for the
input framework to handle optional records. For an optional record,
either the whole record has to be missing, or all non-optional elements
of the record have to be defined. This information is not available
to input readers after the records have been unrolled into the threading
types.

Behavior so far was to treat optional records like they are non-optional,
without warning. The patch changes this behavior to emit an error on stream-
creation (during type-checking) and refusing to open the file. I think this
is a better idea - the behavior so far was undocumented and unintuitive.

- Second:
For table and event streams, reader backend creation was done very early,
before actually checking if all arguments are valid. Initialization is moved
after the checks now - this makes a number of delete statements unnecessary.
Also - I suspect threads of failed input reader instances were not deleted
until shutdown

- Third:
Add a couple more consistency checks, e.g. checking if the destination value
of a table has the same type as we need. We did not check everything in all
instances, instead we just assigned the things without caring (which works,
but is not really desirable).

This change also exposed a few bugs in other testcases where table definitions
were wrong (did not respect $want_record)

- Fourth:
Improve error messages and write testcases for all error messages (I think).
2013-12-05 15:53:12 -08:00
Jon Siwek
54ebe98458 Fix table &default reference counting for record ctor expressions. 2013-12-05 14:23:32 -06:00
Seth Hall
bce45cf11e Merge branch 'master' of ssh://git.bro-ids.org/bro 2013-12-05 15:13:31 -05:00
Seth Hall
6d782e6834 Updated software framework to support parsing IE11 user-agent strings. 2013-12-05 15:05:11 -05:00
Jon Siwek
92d2fdd4a6 Close signature files after done parsing. 2013-12-05 13:22:50 -06:00
Jon Siwek
d3e908af3b Fix unlikely null ptr deref in broxygen::Manager. 2013-12-05 12:56:05 -06:00
Bernhard Amann
504d22b91b fix memory leak in input framework.
If the input framework was used to read event streams and
those streams contained records with more than one field, not all
elements of the threading Values were cleaned up.

The reason for this is, that the SendEventStreamEvent function
returned the number of record elements in the outmost record
instead of the number of unrolled elements in the whole vector.

This number is later used to determine how many objects to delete.

Also - add a whole bunch of leak checks for the input framework
that would have caught that and should cover quite a number of
use-cases.
2013-12-05 10:53:12 -08:00
Jon Siwek
be05d7b435 FreeBSD build fix addendum: unintended variable shadowing. 2013-12-05 11:15:02 -06:00
Jon Siwek
21df25d429 Fix build on FreeBSD.
basename(3)/dirname(3) const-ness may vary w/ platform.
2013-12-05 11:01:44 -06:00
Robin Sommer
574018f478 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Improve a unit test involving 'when' conditionals.
2013-12-05 07:54:18 -08:00
Robin Sommer
1732fd77a4 Updating CHANGES and VERSION. 2013-12-05 07:53:26 -08:00
Robin Sommer
81096820f3 Merge remote-tracking branch 'origin/topic/jsiwek/string-slicing-fix'
* origin/topic/jsiwek/string-slicing-fix:
  Support omission of string slice low/high indices, BIT-1097.
2013-12-04 13:45:47 -08:00
Robin Sommer
d5a48f04ac Tweak to SMTP script to adjust for new string slicing behaviour.
Also updating NEWS with a note.
2013-12-04 13:45:46 -08:00
Robin Sommer
3c6f82ca73 More test updates.
The dump-events.bro generates output that would show in the Broxygen
all-script tests. Suppressing that manually in the test for lack of a
better idea.
2013-12-04 13:45:03 -08:00
Jon Siwek
8515d3aa57 Support omission of string slice low/high indices, BIT-1097.
Omission of the low index defaults to 0:

    s = "12345"; s[:3] == "123"

Omission of the high index defaults to length of the string:

    s = "12345"; s[3:] == "45"
2013-12-04 15:11:48 -06:00
Robin Sommer
dda5e43aa9 Merge branch 'topic/robin/string-slicing-fix' 2013-12-04 12:42:22 -08:00
Robin Sommer
8331d0d09b Updating tests. 2013-12-04 12:40:51 -08:00
Robin Sommer
320f2d5ab6 Merge remote-tracking branch 'origin/topic/bernhard/ssl_ciphers_vector'
BIT-1011 #merged

* origin/topic/bernhard/ssl_ciphers_vector:
  Change ciphers in changes ciphers from a set to a vector.
2013-12-04 12:17:22 -08:00
Robin Sommer
dadfcde70e Merge branch 'topic/robin/event-dumper'
Changes:

   - Changing semantics of the new_event() meta event: it's raised
     only for events that have a handler defined. There are too many
     checks in Bro that prevent events wo/ handler from being even
     prepared to raise to do that differently.

   - Adding test case.

* topic/robin/event-dumper:
  New script misc/dump-events.bro, along with core support, that dumps events Bro is raising in an easily readable form.
  Prettyfing Describe() for record types.
2013-12-04 12:13:07 -08:00
Bernhard Amann
b7dc03bb82 Change ciphers in changes ciphers from a set to a vector.
This preserves the ordering of the cipher suites the client sent,
allowing e.g. better client fingerprinting.
2013-12-04 11:38:15 -08:00
Robin Sommer
18a23fbdb8 Merge remote-tracking branch 'origin/topic/jsiwek/string-slicing-fix'
* origin/topic/jsiwek/string-slicing-fix:
  Fix string slice notation, addresses BIT-1097.
2013-12-04 11:23:26 -08:00