Lines Matching defs:rule
1905 cil_tree_log(parse_current, CIL_ERR, "Bad roletransition rule");
1951 cil_tree_log(parse_current, CIL_ERR, "Bad roleallow rule");
2091 struct cil_avrule *rule = NULL;
2103 cil_avrule_init(&rule);
2105 rule->is_extended = 0;
2106 rule->rule_kind = rule_kind;
2108 rule->src_str = parse_current->next->data;
2109 rule->tgt_str = parse_current->next->next->data;
2111 rc = cil_fill_classperms_list(parse_current->next->next->next, &rule->perms.classperms);
2116 ast_node->data = rule;
2122 cil_tree_log(parse_current, CIL_ERR, "Bad allow rule");
2123 cil_destroy_avrule(rule);
2127 void cil_destroy_avrule(struct cil_avrule *rule)
2129 if (rule == NULL) {
2133 if (!rule->is_extended) {
2134 cil_destroy_classperms_list(&rule->perms.classperms);
2136 if (rule->perms.x.permx_str == NULL && rule->perms.x.permx != NULL) {
2137 cil_destroy_permissionx(rule->perms.x.permx);
2141 free(rule);
2251 struct cil_avrule *rule = NULL;
2263 cil_avrule_init(&rule);
2265 rule->is_extended = 1;
2266 rule->rule_kind = rule_kind;
2267 rule->src_str = parse_current->next->data;
2268 rule->tgt_str = parse_current->next->next->data;
2271 rule->perms.x.permx_str = parse_current->next->next->next->data;
2273 cil_permissionx_init(&rule->perms.x.permx);
2275 rc = cil_fill_permissionx(parse_current->next->next->next->cl_head, rule->perms.x.permx);
2281 ast_node->data = rule;
2287 cil_tree_log(parse_current, CIL_ERR, "Bad allowx rule");
2288 cil_destroy_avrule(rule);
2303 struct cil_type_rule *rule = NULL;
2315 cil_type_rule_init(&rule);
2317 rule->rule_kind = rule_kind;
2318 rule->src_str = parse_current->next->data;
2319 rule->tgt_str = parse_current->next->next->data;
2320 rule->obj_str = parse_current->next->next->next->data;
2321 rule->result_str = parse_current->next->next->next->next->data;
2323 ast_node->data = rule;
2329 cil_tree_log(parse_current, CIL_ERR, "Bad type rule");
2330 cil_destroy_type_rule(rule);
2334 void cil_destroy_type_rule(struct cil_type_rule *rule)
2336 if (rule == NULL) {
2340 free(rule);
3379 struct cil_type_rule *rule = NULL;
3381 cil_type_rule_init(&rule);
3383 rule->rule_kind = CIL_TYPE_TRANSITION;
3384 rule->src_str = s1;
3385 rule->tgt_str = s2;
3386 rule->obj_str = s3;
3387 rule->result_str = s4;
3389 ast_node->data = rule;