diff options
| author | luwenpeng <[email protected]> | 2024-09-26 15:21:08 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2024-09-26 15:21:08 +0800 |
| commit | bb9f4eecc1b8a4ed4dd592f14196c5719f8454ba (patch) | |
| tree | 5970aa6ca8b5bcb6cf3f27a2aca34d8d62fcea23 /common/src/intercept_policy.cpp | |
| parent | 5d3ee62d23253218243c9be831ffa084add3ef80 (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.cpp | 4 |
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); |
