]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4493: appid: adding full path to read list of lua detectors
authorAndres Avila Segura (aavilase) <aavilase@cisco.com>
Thu, 21 Nov 2024 13:44:24 +0000 (13:44 +0000)
committerChris Sherwin (chsherwi) <chsherwi@cisco.com>
Thu, 21 Nov 2024 13:44:24 +0000 (13:44 +0000)
Merge in SNORT/snort3 from ~AAVILASE/snort3:reduce_appid_test_load_time to master

Squashed commit of the following:

commit fe548a9e96f666fe57435bf404faac94d58a85bf
Author: Andres Avila Segura <aavilase@cisco.com>
Date:   Wed Oct 23 12:39:40 2024 -0400

    appid: adding full path to read list of lua detectors

src/network_inspectors/appid/lua_detector_module.cc

index f321d6308780336c9288d4ae05240047da5de50c..a463db44f0a0bcc85078ca72223a85d6b7ade90d 100644 (file)
@@ -589,7 +589,8 @@ void ControlLuaDetectorManager::load_lua_detectors(const char* path, bool is_cus
                     appid_log(nullptr, TRACE_WARNING_LEVEL, "appid: leak of %d lua stack elements before detector load\n", lua_top);
                 while (std::getline(file, line))
                 {
-                    process_detector_file(const_cast<char*>(line.c_str()), is_custom);
+                    std::string full_path = std::string(path) + "/" + line;
+                    process_detector_file(const_cast<char*>(full_path.c_str()), is_custom);
                 }
             }
             return;