Up until now, suricatactl would delete any directory that is provided as
an argument on command line. This patch adds a basic test for the
directories `tmp`, `00` and `ff` in order to justify that the provided
directory is actually a filestore directory.
Additionally, some code has been broken up and made more readable and
pythonic.
Closes redmine ticket #2843
output-json-ftp.c: In function ‘JsonFTPLogger’:
output-json-ftp.c:129:9: warning: ‘js_respcode_list’ may be used uninitialized in this function [-Wmaybe-uninitialized]
129 | json_object_set_new(cjs, "completion_code", js_respcode_list);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
output-json-ftp.c:74:13: note: ‘js_respcode_list’ was declared here
74 | json_t *js_respcode_list;
| ^~~~~~~~~~~~~~~~
output-json-ftp.c:128:9: warning: ‘js_resplist’ may be used uninitialized in this function [-Wmaybe-uninitialized]
128 | json_object_set_new(cjs, "reply", js_resplist);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
output-json-ftp.c:73:13: note: ‘js_resplist’ was declared here
73 | json_t *js_resplist;
| ^~~~~~~~~~~
Stop falling back to the old method of installing rules into
/etc/suricata/rules if Suricata-Update is not available.
The goal here is to move away from the behaviour of installing
rules to /etc/suricata/rules as part of the default install
process. The engine provided rules are already installed to
/usr/share/suricata/rules, which can then be used as input
to rule management tools such as Suricata-Update.
This does not change the behaviour for Suricata release users
with the bundled Suricata-Update.
Also removes Oinkmaster and PulledPork suggestion for rule
management.
Older versions of Sphinx will generate duplicate IDs when you have
options like:
.. option:: some-option
.. option:: some-other-option
The version of Sphinx provided on CentOS 7 has this issue, newer
versions of Sphinx do not. As CentOS 7 is still a popular
distribution, change ".. option" to ".. describe" which has the
same visual output, but does not generate links.
Datasets are sets/lists of data that can be accessed or added from
the rule language.
This patch implements 3 data types:
1. string (or buffer)
2. md5
3. sha256
The patch also implements 2 new rule keywords:
1. dataset
2. datarep
The dataset keyword allows matching against a list of values to see if
it exists or not. It can also add the value to the set. The set can
optionally be stored to disk on exit.
The datarep support matching/lookups only. With each item in the set a
reputation value is stored and this value can be matched against. The
reputation value is unsigned 16 bit, so values can be between 0 and 65535.
Datasets can be registered in 2 ways:
1. through the yaml
2. through the rules
The goal of this rules based approach is that rule writers can start using
this without the need for config changes.
A dataset is implemented using a thash hash table. Each dataset is its own
separate thash.
Thread safe hash table implementation based on the Flow hash, IP Pair
hash and others.
Hash is array of buckets with per bucket locking. Each bucket has a
list of elements which also individually use locking.
Plus:
- Set latest known working stable Rust to 1.37.0.
- Remove test for --disable-rust, as that as option is
not respected anymore.
- Add test for old/unsupported version of Rust to make
sure ./configure fails.
- Other minor cleanups.
As AC_SUBST doesn't expand to anything in the shell script, this
will generate a bad script on older versions of autoconf.
Change the logic to eliminate the possibility of an empty
if or else block.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/3124
Get rid of enable-rust-debug flag and use enable-debug for acheiving the
desired functionality. From now, adding `--enable-debug` to `configure`
shall create an [unoptimitized + debuginfo] target. Rest behavior stays
the same.
Closes redmine ticket #3054
1. Set WARN_UNUSED macro on DetectSignatureSetAppProto.
2. Replace all direct 'sets' of Signature::alproto from keyword registration.
Closes redmine ticket #3006.