diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index deb334b..cf762db 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -604,7 +604,7 @@ int Maat_set_feather_opt(Maat_feather_t feather,enum MAAT_INIT_OPT type,const vo md5_file(_feather->json_ctx.json_file, _feather->json_ctx.effective_json_md5); MESA_handle_runtime_log(_feather->logger,RLOG_LV_INFO,maat_module , - "Maat initial with JSON file %s md5: %s,generate index file %s OK.", + "Maat initial with JSON file %s md5: %s, generate index file %s OK.", _feather->json_ctx.json_file, _feather->json_ctx.effective_json_md5, _feather->json_ctx.iris_file); diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index caf61fd..710470e 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -2463,6 +2463,7 @@ void update_group_rule(struct Maat_table_desc* table,const char* table_line,stru struct db_group_rule_t db_group_rule; struct Maat_table_runtime* table_rt=scanner->table_rt[table->table_id]; int ret=0; + memset(&db_group_rule, 0, sizeof(db_group_rule)); ret=sscanf(table_line,"%d\t%d\t%d\t%d", &(db_group_rule.group_id), &(db_group_rule.compile_id), &(db_group_rule.is_valid), diff --git a/test/maat_json.json b/test/maat_json.json index 38f4bd6..dbd16f3 100644 --- a/test/maat_json.json +++ b/test/maat_json.json @@ -573,6 +573,47 @@ ] } ] + }, + { + "compile_id": 143, + "service": 1, + "action": 1, + "do_blacklist": 1, + "do_log": 1, + "user_region": "NOT-logic-test", + "is_valid": "yes", + "groups": [ + { + "not_flag":0, + "regions": [ + { + "table_name": "HTTP_URL", + "table_type": "string", + "table_content": { + "keywords": "must-contained-string-11111", + "expr_type": "none", + "match_method": "sub", + "format": "uncase plain" + } + } + ] + }, + { + "not_flag":1, + "regions": [ + { + "table_name": "HTTP_URL", + "table_type": "string", + "table_content": { + "keywords": "must-not-contained-string-22222", + "expr_type": "none", + "match_method": "sub", + "format": "uncase plain" + } + } + ] + } + ] } ], "plugin_table": [