Commit graph

11634 commits

Author SHA1 Message Date
Jon Siwek
21c75b46eb Improve logging of supervised node errors
Now getting sent through standard Reporter framework in the Supervisor
process.
2020-01-16 14:23:08 -08:00
Jon Siwek
8a145ee1a2 Fix supervised node inheritence of command-line script paths
They're now converting to absolute paths in the argument parsing phase
such that if a supervised node switches working directory, it can still
load the referenced script.
2020-01-16 13:11:04 -08:00
Jon Siwek
38cd56a3db Improve normalize_path() util function
It didn't always properly handle ".." when the preceding path component
was also the first component.
2020-01-16 13:08:01 -08:00
Robin Sommer
0d29a80519 Merge remote-tracking branch 'origin/topic/jsiwek/ftp-adat-fix'
* origin/topic/jsiwek/ftp-adat-fix:
  Handle invalid Base64 encodings in FTP ADAT analyzer
2020-01-16 13:27:03 +00:00
Jon Siwek
dbca14e1fc Use a timer to check for death of supervised node's parent 2020-01-15 15:27:53 -08:00
Jon Siwek
7ddd311583 Improve supervisor checks for parent process termination
Comparing parent process ID to 1 to detect loss of parent process was
not necessarily portable, so now it stores parent PID pre-fork and then
monitors for any change.
2020-01-15 14:42:13 -08:00
Jon Siwek
1db7a222a0 Handle invalid Base64 encodings in FTP ADAT analyzer 2020-01-15 12:44:10 -08:00
Jon Siwek
899a987527 Improve handling of premature supervisor stem exit
i.e. if the stem process terminates before the supervisor registers a
SIGCHLD handler.
2020-01-14 20:25:27 -08:00
Jon Siwek
f5b3673890 Improve supervisor signal handler safety
Now should only be making async-signal-safe calls
2020-01-14 18:56:34 -08:00
Jon Siwek
3e1a9ebec3 Remove unused supervisor config options
Since those related to offline pcap reading are not implemented yet.
2020-01-14 17:33:37 -08:00
Tim Wojtulewicz
227d29db80 Use the list of files from clang-tidy when searching for unit tests
The previous method for searching for these files included everything from src/3rdparty, which breaks when rapidjson is included. We don't want to include that directory anyways. We already had a good list of files to scan from the previous clang-tidy and adding any that are missing is an easy task.
2020-01-14 15:44:59 -07:00
Tim Wojtulewicz
23f551876c Optimize json_escape_utf8 a bit by removing repeated calls to string methods 2020-01-14 15:43:25 -07:00
Tim Wojtulewicz
ee0619f999 Expand unit test for json_escape_utf8 to include all of the strings from the ascii-json-utf8 btest 2020-01-14 15:43:25 -07:00
Tim Wojtulewicz
46e7308422 GHI-595: Convert from nlohmann/json to rapidjson for performance reasons 2020-01-14 15:43:25 -07:00
Jon Siwek
4d712d6203 Cleanup minor Supervisor TODOs
e.g. Mainly making default parameter for restart/destroy/status API
calls to operate on all nodes.
2020-01-14 13:41:46 -08:00
Jon Siwek
80b3aef486 Improve supervisor debug logging
Mainly making stem process debug messages sent up to parent supervisor
process and included in its debug.log though option to print to stderr
remains in form of environment variable in case debugging breaking
change to the IPC mechanism itself.
2020-01-14 11:24:46 -08:00
Jon Siwek
f59e3da4f7 Merge remote-tracking branch 'origin/sethhall-fix-ssl-files-warning'
* origin/sethhall-fix-ssl-files-warning:
  Fix warning when reading files from non-network sources
2020-01-14 09:46:19 -08:00
Seth Hall
d9ed76c90a
Fix warning when reading files from non-network sources
If files are being read from non-network sources, there was a warning in the SSL base scripts about missing the f$conns field.
2020-01-14 10:53:02 -05:00
Jon Siwek
0ff99c3df8 Separate supervisor node config and status data structures 2020-01-13 20:09:05 -08:00
Johanna Amann
382c4ddc2f &on_change: add insertion/change notifications.
Also - work with sets in addition to tables.
2020-01-13 19:39:40 -08:00
Johanna Amann
b343cf9bb7 &on_change working for removals from tables.
Insertions and changes are still noops.
2020-01-13 15:28:56 -08:00
Johanna Amann
5b5d36cd83 Change signature of &on_change handler
After thinking about this for quite a while (and starting
implementation) - for now I think it is much easier to not allow the
table &on_change handler to change the result of a change - but to only
be notified that a change happened.

I might re-think this lateron - the reasoning is that this makes
development easier, and that I am not quite sure about potential
side-effects for things that assume that a table change does take
effect.
2020-01-13 13:38:48 -08:00
Johanna Amann
68167d14aa Merge remote-tracking branch 'origin/master' into topic/johanna/table-changes 2020-01-13 10:43:35 -08:00
Jon Siwek
520c6e3ebf Merge branch 'master' into topic/jsiwek/supervisor 2020-01-13 10:27:34 -08:00
Jon Siwek
9c353f56f1 Updating submodule(s).
[nomail]
2020-01-13 10:08:21 -08:00
Jon Siwek
6cb73e505b Updating submodule(s).
[nomail]
2020-01-13 09:32:15 -08:00
Robin Sommer
bcf9dbac94 Update submodules. 2020-01-13 12:11:08 +00:00
Robin Sommer
ae9e79969e Fix method returning a reference to a temporary.
Found by cppcheck, via by Arthur Wong.
2020-01-13 11:24:20 +00:00
Jon Siwek
5191e14eff Add stdout/stderr redirection option to supervised node config 2020-01-10 19:48:31 -08:00
Jon Siwek
263a5f404a Add cpu affinity option to supervised node config 2020-01-10 18:25:42 -08:00
Jon Siwek
6218f99b96 Update timeouts for a btest 2020-01-09 19:05:23 -08:00
Jon Siwek
b34d7a8443 Update doc submodule 2020-01-09 19:04:41 -08:00
Tim Wojtulewicz
03eb1d43d2 Merge remote-tracking branch 'origin/topic/jsiwek/btest-asan-options'
* origin/topic/jsiwek/btest-asan-options:
  Extend ASAN_OPTIONS in btests instead of overwrite
2020-01-09 13:39:49 -08:00
Jon Siwek
da0185a60f Update external test repo commit hash 2020-01-09 12:29:02 -08:00
Tim Wojtulewicz
50a0835b41 Convert type-checking macros to actual functions 2020-01-09 11:43:09 -08:00
Tim Wojtulewicz
1e41d7f583 Merge remote-tracking branch 'origin/topic/jsiwek/doctest-leakcheck'
* origin/topic/jsiwek/doctest-leakcheck:
  Enable LeakSanitizer for unit tests run via doctest
2020-01-09 11:38:28 -08:00
Tim Wojtulewicz
d845627daa Merge remote-tracking branch 'origin/topic/jazoff/ntlm-field-error'
* origin/topic/jazoff/ntlm-field-error:
  fix NTLM field value access
2020-01-09 10:26:00 -08:00
Johanna Amann
96329e2172 Merge remote-tracking branch 'origin/master' into topic/johanna/table-changes 2020-01-09 12:48:20 -05:00
Johanna Amann
bf31587c2c Beginning implementation of &on_change for tables. 2020-01-09 12:47:16 -05:00
Jon Siwek
a4089bc659 Enable LeakSanitizer for unit tests run via doctest 2020-01-08 21:14:40 -08:00
Jon Siwek
1f3ec434a8 Extend ASAN_OPTIONS in btests instead of overwrite 2020-01-08 21:04:18 -08:00
Jon Siwek
00cd04b0ae Extend Supervisor Node config with list of custom scripts 2020-01-08 14:52:46 -08:00
Jon Siwek
297317b232 Organize command-line options for Supervisor filtering/inheritance
Also have stem process execv() with original command-line arguments so
that they're re-parsed and inherited correctly by supervised-nodes in
the event the stem process needs to be re-created.
2020-01-08 14:05:19 -08:00
Jon Siwek
000d902b86 Merge branch 'master' into topic/jsiwek/supervisor 2020-01-08 10:36:26 -08:00
Jon Siwek
66ca20b737 Increase timeout for a few btests
Saw these start being sensitive running an "ASan -O0" build locally
2020-01-08 10:31:16 -08:00
Justin Azoff
80469a1fde fix NTLM field value access
The fields being checked for existence were not the same as the fields
being accessed.
2020-01-08 11:40:28 -05:00
Jon Siwek
3273169385 Preserve optimization setting for sanitizer build 2020-01-07 20:58:35 -08:00
Jon Siwek
0e19520e13 Fix Supervisor memory leak 2020-01-07 20:42:43 -08:00
Jon Siwek
6046da9993 Merge branch 'master' into topic/jsiwek/supervisor 2020-01-07 16:57:58 -08:00
Jon Siwek
22431dbecb Use string_view in Supervisor API where possible 2020-01-07 11:59:39 -08:00