Actions
Bug #4678
closedConfiguration test mode succeeds when reference.config file contains invalid content
Description
When testing configuration settings (-T), invalid content in reference.config
doesn't result in the "test" failing.
If reference.config
contains
this is not correct
then
$ src/suricata -c suricata.yaml -T --set reference-config-file=reference.config -S ~/rules/be.rule [1607765] 2/9/2021 -- 13:51:11 - (suricata.c:1683) <Info> (ParseCommandLine) -- Running suricata under test mode [1607765] 2/9/2021 -- 13:51:11 - (suricata.c:1091) <Notice> (LogVersion) -- This is Suricata version 7.0.0-dev (148277ec9 2021-07-20) running in SYSTEM mode [1607765] 2/9/2021 -- 13:51:12 - (util-reference-config.c:247) <Error> (SCRConfAddReference) -- [ERRCODE: SC_ERR_REFERENCE_CONFIG(175)] - Invalid Reference Config in reference.config file [1607765] 2/9/2021 -- 13:51:12 - (suricata.c:2850) <Notice> (SuricataMain) -- Configuration provided was successfully loaded. Exiting. $ echo $? 0
Expected behavior:
jlucovsky@ ~/src/jal/suricata (master) $ src/suricata -c suricata.yaml -T --set reference-config-file=reference.config -S ~/rules/be.rule [1607765] 2/9/2021 -- 13:51:11 - (suricata.c:1683) <Info> (ParseCommandLine) -- Running suricata under test mode [1607765] 2/9/2021 -- 13:51:11 - (suricata.c:1091) <Notice> (LogVersion) -- This is Suricata version 7.0.0-dev (148277ec9 2021-07-20) running in SYSTEM mode [1607765] 2/9/2021 -- 13:51:12 - (util-reference-config.c:247) <Error> (SCRConfAddReference) -- [ERRCODE: SC_ERR_REFERENCE_CONFIG(175)] - Invalid Reference Config in reference.config file [1607765] 2/9/2021 -- 08:39:15 - (util-threshold-config.c:257) <Warning> (tbd) -- [ERRCODE: SC_WARN_REFERENCE_CONFIG(338)] - Error loading reference configuration from /tmp/reference.config [1607765] 2/9/2021 -- 08:39:15 - (suricata.c:2187) <Error> (LoadSignatures) -- [ERRCODE: SC_ERR_NO_RULES_LOADED(43)] - Loading signatures failed $ echo $? 1
Updated by Jeff Lucovsky about 3 years ago
- Copied from Bug #4659: Configuration test mode succeeds when reference.config file contains invalid content added
Updated by Victor Julien about 3 years ago
- Target version changed from 5.0.8 to 5.0.9
Updated by Jeff Lucovsky over 2 years ago
- Status changed from Assigned to In Progress
Cherry-pick commit(s):
Updated by Jeff Lucovsky over 2 years ago
- Status changed from In Progress to Assigned
Updated by Jeff Lucovsky over 2 years ago
- Status changed from Assigned to In Progress
Cherry-pick commit(s)
- be2155b4edb712913166cb5e8c10b36fb4362f2a
- b53fced45254ca267e75ea7e8c60afab82ea1e08
Updated by Jeff Lucovsky over 2 years ago
- Status changed from In Progress to In Review
Updated by Jeff Lucovsky over 2 years ago
- Status changed from In Review to Closed
Actions