TSG-14946: 安全策略支持allow(deny)和monitor动作同时命中
This commit is contained in:
@@ -3080,6 +3080,27 @@ size_t tsg_matched_rules_select(struct maat *feather, TSG_SERVICE service, long
|
||||
return offset;
|
||||
}
|
||||
|
||||
size_t tsg_select_rules_by_action(struct maat_rule *matched_rules, size_t n_matched_rules, struct maat_rule *rules, size_t n_rules, unsigned char action)
|
||||
{
|
||||
size_t offset=0;
|
||||
for(size_t i=0; i<n_matched_rules; i++)
|
||||
{
|
||||
if(offset>=n_rules)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(matched_rules[i].action!=action)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
rules[offset++]=matched_rules[i];
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
size_t tsg_select_rules_by_service_id(struct maat_rule *matched_rules, size_t n_matched_rules, struct maat_rule *rules, size_t n_rules, enum TSG_SERVICE service_id)
|
||||
{
|
||||
size_t offset=0;
|
||||
|
||||
Reference in New Issue
Block a user