]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
rna: Added log message for missing 'rna.conf' path
authorJuweria Ali Imran <jaliimra@cisco.com>
Mon, 1 Aug 2022 14:45:06 +0000 (10:45 -0400)
committerJuweria Ali Imran <jaliimra@cisco.com>
Mon, 8 Aug 2022 13:56:50 +0000 (09:56 -0400)
src/network_inspectors/rna/rna_module.cc

index 07edde80f679fc216d85c9943e54d7a462aa5611..52097d9b1224d9fd7b164a85cb8c9f62826e5e79 100644 (file)
@@ -448,7 +448,14 @@ bool RnaModule::begin(const char* fqn, int, SnortConfig*)
 bool RnaModule::set(const char* fqn, Value& v, SnortConfig*)
 {
     if (v.is("rna_conf_path"))
+    {
+        struct stat buf;
         mod_conf->rna_conf_path = string(v.get_string());
+        if (stat(mod_conf->rna_conf_path.c_str(), &buf) != 0)
+        {
+            WarningMessage("WARNING: Missing/Incorrect 'rna.conf' path : \"%s\", using system defaults\n" , mod_conf->rna_conf_path.c_str());
+        }
+    }
     else if (v.is("enable_logger"))
         mod_conf->enable_logger = v.get_bool();
     else if (v.is("log_when_idle"))
@@ -701,3 +708,4 @@ TEST_CASE("RNA module", "[rna_module]")
 }
 
 #endif
+