rename attribute_name to field_name

This commit is contained in:
liuchang
2024-11-25 03:39:51 +00:00
parent df24326470
commit 57149b3060
24 changed files with 1053 additions and 1053 deletions

View File

@@ -136,7 +136,7 @@ void generate_rule_sample(const char *table_name, int sample_count)
fclose(fp);
}
void generate_object2rule_sample(const char *table_name, const char *attribute_name,
void generate_object2rule_sample(const char *table_name, const char *field_name,
int sample_count)
{
FILE *fp = fopen(table_name, "w+");
@@ -148,7 +148,7 @@ void generate_object2rule_sample(const char *table_name, const char *attribute_n
fprintf(fp, "%d\n", sample_count);
for (int i = 0; i < sample_count; i++) {
fprintf(fp, "%d\t%d\t0\t%s\t1\t1\n", i+1, 100+i, attribute_name);
fprintf(fp, "%d\t%d\t0\t%s\t1\t1\n", i+1, 100+i, field_name);
}
fclose(fp);

View File

@@ -573,7 +573,7 @@
"object_id":1,
"rule_id":2,
"negate_option":3,
"attribute_name":4,
"field_name":4,
"condition_index":5
}
},

View File

@@ -13,7 +13,7 @@
"and_conditions": [
{
"object_name": "Untitled",
"attribute_name": "HTTP_URL",
"field_name": "HTTP_URL",
"objects": [
{
"items": [

View File

@@ -12,7 +12,7 @@
"is_valid": "yes",
"and_conditions": [
{
"attribute_name": "HTTP_URL",
"field_name": "HTTP_URL",
"objects": [
{
"items": [

View File

@@ -12,7 +12,7 @@
"is_valid": "yes",
"and_conditions": [
{
"attribute_name": "HTTP_URL",
"field_name": "HTTP_URL",
"objects": [
{
"items": [

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -68,7 +68,7 @@
"table_id":11,
"table_name":"KEYWORDS_TABLE",
"table_type":"expr",
"schema_tag": "{\"http_response_keywords\": \"attribute\"}"
"schema_tag": "{\"http_response_keywords\": \"field\"}"
},
{
"table_id":12,
@@ -155,7 +155,7 @@
"table_id":24,
"table_name":"IP_PLUS_CONFIG",
"table_type":"ip",
"schema_tag": "{\"attribute_ip_plus_table\": \"attribute\"}"
"schema_tag": "{\"field_ip_plus_table\": \"field\"}"
},
{
"table_id":29,

View File

@@ -155,7 +155,7 @@ int rule_table_set_line(struct maat *maat_inst, const char *table_name,
cJSON_AddItemToArray(object_uuids_array, cJSON_CreateString(and_conditions[i].or_conditions[j].object_uuids_str[k]));
}
cJSON_AddItemToObject(or_condition, "object_uuids", object_uuids_array);
cJSON_AddStringToObject(or_condition, "attribute_name", and_conditions[i].or_conditions[j].attribute_name);
cJSON_AddStringToObject(or_condition, "field_name", and_conditions[i].or_conditions[j].field_name);
cJSON_AddItemToArray(or_conditions_array, or_condition);
}

View File

@@ -8,7 +8,7 @@
struct maat_cmd_or_condition {
const char *object_uuids_str[8];
int object_num;
const char *attribute_name;
const char *field_name;
};
struct maat_cmd_and_condition {