summaryrefslogtreecommitdiff
path: root/common/src/intercept_policy.cpp
diff options
context:
space:
mode:
authorluwenpeng <[email protected]>2024-09-26 15:21:08 +0800
committerluwenpeng <[email protected]>2024-09-26 15:21:08 +0800
commitbb9f4eecc1b8a4ed4dd592f14196c5719f8454ba (patch)
tree5970aa6ca8b5bcb6cf3f27a2aca34d8d62fcea23 /common/src/intercept_policy.cpp
parent5d3ee62d23253218243c9be831ffa084add3ef80 (diff)
change maat_plugin_table_get_ex_data() key type from uuid_t to uuid string
Diffstat (limited to 'common/src/intercept_policy.cpp')
-rw-r--r--common/src/intercept_policy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/src/intercept_policy.cpp b/common/src/intercept_policy.cpp
index 1b1e33c..0921b84 100644
--- a/common/src/intercept_policy.cpp
+++ b/common/src/intercept_policy.cpp
@@ -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);