From: Shravan Rangarajuvenkata (shrarang) Date: Mon, 18 Oct 2021 17:48:30 +0000 (+0000) Subject: Merge pull request #3109 in SNORT/snort3 from ~CLJUDGE/snort3:snort3_change_efp_api_n... X-Git-Tag: 3.1.15.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6bbbee956877581e4bab5b86ea96ff5e3e8d81d;p=thirdparty%2Fsnort3.git Merge pull request #3109 in SNORT/snort3 from ~CLJUDGE/snort3:snort3_change_efp_api_name to master Squashed commit of the following: commit 688e16cf8b054340cea70ad844a2b59de72f1680 Author: cljudge Date: Wed Oct 13 22:50:23 2021 -0400 appid: Update the name of the lua API function that adds process name to client app mappings. --- diff --git a/src/network_inspectors/appid/lua_detector_api.cc b/src/network_inspectors/appid/lua_detector_api.cc index 18b09e9a0..b0946b529 100644 --- a/src/network_inspectors/appid/lua_detector_api.cc +++ b/src/network_inspectors/appid/lua_detector_api.cc @@ -992,7 +992,7 @@ static int client_add_payload(lua_State* L) * @param process_name/stack - encrypted fingerprint process name * @param process_score - encrypted fingerprint process_score */ -static int client_add_fingerprint_process(lua_State* L) +static int add_process_to_client_mapping(lua_State* L) { auto& ud = *UserData::check(L, DETECTOR, 1); // Verify detector user data and that we are NOT in packet context @@ -1352,14 +1352,14 @@ static int register_callback(lua_State* L, LuaObject& ud, AppInfoFlags flag) static int detector_register_client_callback(lua_State* L) { - auto& ud = *UserData::check(L, DETECTOR, 1); + const auto& ud = *UserData::check(L, DETECTOR, 1); return register_callback(L, *ud, APPINFO_FLAG_CLIENT_DETECTOR_CALLBACK); } static int detector_register_service_callback(lua_State* L) { - auto& ud = *UserData::check(L, DETECTOR, 1); + const auto& ud = *UserData::check(L, DETECTOR, 1); return register_callback(L, *ud, APPINFO_FLAG_SERVICE_DETECTOR_CALLBACK); } @@ -2719,7 +2719,7 @@ static const luaL_Reg detector_methods[] = { "client_addPayload", client_add_payload }, /* add client mapping for process name derived by fingerprinting */ - { "client_addFingerprintProcess", client_add_fingerprint_process }, + { "addProcessToClientMapping", add_process_to_client_mapping }, //HTTP Multi Pattern engine { "CHPCreateApp", detector_chp_create_application },