diff options
| author | root <[email protected]> | 2024-09-20 11:20:21 +0000 |
|---|---|---|
| committer | root <[email protected]> | 2024-09-20 11:20:21 +0000 |
| commit | fc99675b403baffc08da5c5ba357d58d9064427c (patch) | |
| tree | 2888da8cda7ccae003a650648ed08246b2560115 /scanner/expr_matcher/expr_matcher.cpp | |
| parent | 20de47c873c226ffa1717e5d6ad47ac4ce4c8d1b (diff) | |
change type of rule_id, object_id, item_id from (long long) to (uuid_t)
just compile libmaatframe.so, without modifing about test case
Diffstat (limited to 'scanner/expr_matcher/expr_matcher.cpp')
| -rw-r--r-- | scanner/expr_matcher/expr_matcher.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scanner/expr_matcher/expr_matcher.cpp b/scanner/expr_matcher/expr_matcher.cpp index 05aacad..3311ffd 100644 --- a/scanner/expr_matcher/expr_matcher.cpp +++ b/scanner/expr_matcher/expr_matcher.cpp @@ -144,10 +144,12 @@ static int expr_rule_pattern_count(struct expr_rule *rules, size_t n_rule, for (size_t i = 0; i < n_rule; i++) { if (rules[i].n_patterns > MAX_EXPR_PATTERN_NUM) { + char uuid_str[37]; + uuid_unparse(rules[i].expr_uuid, uuid_str); log_fatal(logger, MODULE_EXPR_MATCHER, - "[%s:%d] the number of patterns in expr_rule(rule_id:%lld)" + "[%s:%d] the number of patterns in expr_rule(rule_id:%s)" " should less than %d", __FUNCTION__, __LINE__, - rules[i].expr_id, MAX_EXPR_PATTERN_NUM); + uuid_str, MAX_EXPR_PATTERN_NUM); return -1; } @@ -224,7 +226,7 @@ static struct bool_expr *bool_exprs_new(struct expr_rule *rules, size_t n_rule, bool_exprs[i].items[j].negate_option = 0; } - bool_exprs[i].expr_id = rules[i].expr_id; + uuid_copy(bool_exprs[i].expr_uuid, rules[i].expr_uuid); bool_exprs[i].item_num = rules[i].n_patterns; bool_exprs[i].user_tag = rules[i].tag; } @@ -432,7 +434,7 @@ static int expr_matcher_bool_matcher_match(struct bool_matcher *bm, struct bool_ } for (int index = 0; index < bool_matcher_ret; index++) { - result_array[index].rule_id = match_buff[index].expr_id; + uuid_copy(result_array[index].rule_uuid, match_buff[index].expr_uuid); result_array[index].user_tag = match_buff[index].user_tag; } *n_hit_result = bool_matcher_ret; |
