change maat_plugin_table_get_ex_data() key type from uuid_t to uuid string

This commit is contained in:
luwenpeng
2024-09-26 15:21:08 +08:00
parent 5d3ee62d23
commit bb9f4eecc1
5 changed files with 7 additions and 7 deletions

View File

@@ -286,7 +286,7 @@ int intercept_policy_select(struct intercept_policy_enforcer *enforcer, uuid_t *
{
curr_rule_id = &rule_id_array[i];
uuid_unparse(*curr_rule_id, str_rule_id);
param = (struct intercept_param *)maat_plugin_table_get_ex_data(enforcer->maat, enforcer->table_name, (const char *)curr_rule_id, sizeof(uuid_t));
param = (struct intercept_param *)maat_plugin_table_get_ex_data(enforcer->maat, enforcer->table_name, (const char *)str_rule_id, strlen(str_rule_id));
if (param == NULL)
{
TFE_LOG_INFO(enforcer->logger, "Failed to get intercept parameter of policy %s.", str_rule_id);
@@ -353,7 +353,7 @@ int intercept_policy_enforce(struct intercept_policy_enforcer *enforcer, struct
}
uuid_unparse(rule_id, str_rule_id);
param = (struct intercept_param *)maat_plugin_table_get_ex_data(enforcer->maat, enforcer->table_name, (const char *)&rule_id, sizeof(uuid_t));
param = (struct intercept_param *)maat_plugin_table_get_ex_data(enforcer->maat, enforcer->table_name, (const char *)str_rule_id, strlen(str_rule_id));
if (param == NULL)
{
TFE_LOG_INFO(enforcer->logger, "Failed to get intercept parameter of policy %s.", str_rule_id);