TSG-15381 TFE适配MAAT4的maat_plugin_table_get_ex_data()接口变更

This commit is contained in:
luwenpeng
2023-06-06 10:39:01 +08:00
parent 396f8426f9
commit db5530aa56
9 changed files with 13 additions and 13 deletions

View File

@@ -1471,7 +1471,7 @@ static struct manipulate_profile* get_profile_by_id(int profile_table, int profi
snprintf(cfg_id_str, sizeof(cfg_id_str), "%d", profile_id);
int table_id = g_proxy_rt->plolicy_table_id[profile_table];
result = (struct manipulate_profile*)maat_plugin_table_get_ex_data(g_proxy_rt->feather, table_id, (const char*)cfg_id_str);
result = (struct manipulate_profile*)maat_plugin_table_get_ex_data(g_proxy_rt->feather, table_id, (const char*)cfg_id_str, strlen(cfg_id_str));
return result;
}
@@ -1513,7 +1513,7 @@ static enum proxy_action decide_ctrl_action(long long *results, size_t n_hit,
hit_rules=ALLOC(struct maat_rule_t, n_hit);
for (i = 0; i < n_hit && i<MAX_SCAN_RESULT; i++)
{
get_ex_param =(struct policy_action_param *)maat_plugin_table_get_ex_data(g_proxy_rt->feather, g_proxy_rt->ctrl_compile_idx, (const char *)&results[i]);
get_ex_param =(struct policy_action_param *)maat_plugin_table_get_ex_data(g_proxy_rt->feather, g_proxy_rt->ctrl_compile_idx, (const char *)&results[i], sizeof(results[i]));
if(get_ex_param==NULL)
{
continue;
@@ -1562,7 +1562,7 @@ static enum proxy_action decide_ctrl_action(long long *results, size_t n_hit,
}
*enforce_rules[0]=*prior_rule;
*n_enforce=1;
ex_data=maat_plugin_table_get_ex_data(g_proxy_rt->feather, g_proxy_rt->ctrl_compile_idx, (const char *)&prior_rule->config_id);
ex_data=maat_plugin_table_get_ex_data(g_proxy_rt->feather, g_proxy_rt->ctrl_compile_idx, (const char *)&prior_rule->config_id, sizeof(prior_rule->config_id));
if(ex_data!=NULL)
{
*param=(struct policy_action_param*)ex_data;
@@ -1596,7 +1596,7 @@ static enum proxy_action decide_ctrl_action(long long *results, size_t n_hit,
memcpy(*enforce_rules + exist_enforce_num + 1, monit_rule, n_monit * sizeof(struct maat_rule_t));
}
ex_data=maat_plugin_table_get_ex_data(g_proxy_rt->feather, g_proxy_rt->ctrl_compile_idx, (const char *)&prior_rule->config_id);
ex_data=maat_plugin_table_get_ex_data(g_proxy_rt->feather, g_proxy_rt->ctrl_compile_idx, (const char *)&prior_rule->config_id, sizeof(prior_rule->config_id));
if(ex_data!=NULL)
{
*param=(struct policy_action_param*)ex_data;