策略验证添加漏掉的TSG_OBJ_APP_ID表注册代码
This commit is contained in:
@@ -56,6 +56,7 @@ enum security_scan_table
|
||||
PXY_SECURITY_FTP_URI,
|
||||
PXY_SECURITY_FTP_CONTENT,
|
||||
PXY_SECURITY_FTP_ACCOUNT,
|
||||
PXY_SECURITY_APP_ID,
|
||||
__SECURITY_TABLE_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -117,6 +117,7 @@ int protoco_field_type_str2idx(enum verify_policy_type type, const char *action_
|
||||
table_name[PXY_SECURITY_FTP_URI] = "TSG_FIELD_FTP_URI";
|
||||
table_name[PXY_SECURITY_FTP_CONTENT] = "TSG_FIELD_FTP_CONTENT";
|
||||
table_name[PXY_SECURITY_FTP_ACCOUNT] = "TSG_FIELD_FTP_ACCOUNT";
|
||||
table_name[PXY_SECURITY_APP_ID] = "TSG_OBJ_APP_ID";
|
||||
break;
|
||||
case PXY_TABLE_DEFENCE:
|
||||
break;
|
||||
@@ -243,8 +244,8 @@ cJSON *get_query_from_request(const char *data, int thread_id)
|
||||
if(item && item->type==cJSON_String)
|
||||
{
|
||||
policy_query->query_obj[i].protocol_field = protoco_field_type_str2idx(policy_query->type, item->valuestring, buff, &p);
|
||||
if(policy_query->query_obj[i].protocol_field == __SECURITY_TABLE_MAX ||
|
||||
policy_query->query_obj[i].protocol_field == __SCAN_TABLE_MAX)
|
||||
if ((policy_query->type == PXY_TABLE_MANIPULATION && policy_query->query_obj[i].protocol_field == __SCAN_TABLE_MAX)
|
||||
|| (policy_query->type == PXY_TABLE_SECURITY && policy_query->query_obj[i].protocol_field == __SECURITY_TABLE_MAX))
|
||||
{
|
||||
mesa_runtime_log(RLOG_LV_FATAL, MODULE_NAME, "policy table name error, table name = %s", item->valuestring);
|
||||
goto free;
|
||||
|
||||
@@ -63,7 +63,7 @@ struct pangu_http_ctx
|
||||
size_t n_enforce;
|
||||
struct Maat_rule_t * enforce_rules;
|
||||
int n_read;
|
||||
struct Maat_hit_path_t hit_path[128];
|
||||
struct Maat_hit_path_t hit_path[2048];
|
||||
int thread_id;
|
||||
};
|
||||
|
||||
@@ -549,6 +549,7 @@ int security_policy_init(struct verify_policy * verify, const char* profile_path
|
||||
table_name[PXY_SECURITY_FTP_URI] = "TSG_FIELD_FTP_URI";
|
||||
table_name[PXY_SECURITY_FTP_CONTENT] = "TSG_FIELD_FTP_CONTENT";
|
||||
table_name[PXY_SECURITY_FTP_ACCOUNT] = "TSG_FIELD_FTP_ACCOUNT";
|
||||
table_name[PXY_SECURITY_APP_ID] = "TSG_OBJ_APP_ID";
|
||||
|
||||
for (int i = 0; i < __SECURITY_TABLE_MAX; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user