Home | History | Annotate | Download | only in src

Lines Matching refs:cil_rule

986 int __cil_insert_type_rule(policydb_t *pdb, uint32_t kind, uint32_t src, uint32_t tgt, uint32_t obj, uint32_t res, struct cil_type_rule *cil_rule, cond_node_t *cond_node, enum cil_flavor cond_flavor)
1028 cil_rule->src_str, cil_rule->tgt_str, cil_rule->obj_str, cil_rule->result_str);
1061 cil_rule->src_str, cil_rule->tgt_str, cil_rule->obj_str, cil_rule->result_str);
1079 int __cil_type_rule_to_avtab(policydb_t *pdb, const struct cil_db *db, struct cil_type_rule *cil_rule, cond_node_t *cond_node, enum cil_flavor cond_flavor)
1082 uint16_t kind = cil_rule->rule_kind;
1093 rc = __cil_expand_type(cil_rule->src, &src_bitmap);
1096 rc = __cil_expand_type(cil_rule->tgt, &tgt_bitmap);
1099 class_list = cil_expand_class(cil_rule->obj);
1101 rc = __cil_get_sepol_type_datum(pdb, DATUM(cil_rule->result), &sepol_result);
1120 rc = __cil_insert_type_rule(pdb, kind, sepol_src->s.value, sepol_tgt->s.value, sepol_obj->s.value, sepol_result->s.value, cil_rule, cond_node, cond_flavor);
1135 int cil_type_rule_to_policydb(policydb_t *pdb, const struct cil_db *db, struct cil_type_rule *cil_rule)
1137 return __cil_type_rule_to_avtab(pdb, db, cil_rule, NULL, CIL_FALSE);
4618 struct cil_avrule *cil_rule = node->data;
4627 target.is_extended = cil_rule->is_extended;
4628 target.src = cil_rule->src;
4629 target.tgt = cil_rule->tgt;
4630 target.perms = cil_rule->perms;
4632 if (!cil_rule->is_extended) {
4642 __cil_print_rule(" ", neverallow_str, cil_rule);
4667 struct cil_avrule *cil_rule = node->data;
4668 struct cil_symtab_datum *tgt = cil_rule->tgt;
4674 if (!cil_rule->is_extended) {
4683 rc = __cil_add_sepol_type(pdb, db, cil_rule->src, &rule->stypes.types);
4691 rc = __cil_add_sepol_type(pdb, db, cil_rule->tgt, &rule->ttypes.types);
4697 if (!cil_rule->is_extended) {
4698 rc = __cil_rule_to_sepol_class_perms(pdb, cil_rule->perms.classperms, &rule->perms);
4713 rc = __cil_permx_to_sepol_class_perms(pdb, cil_rule->perms.x.permx, &rule->perms);
4718 rc = __cil_permx_bitmap_to_sepol_xperms_list(cil_rule->perms.x.permx->perms, &xperms);
4798 static int cil_avrule_from_sepol(policydb_t *pdb, avtab_ptr_t sepol_rule, struct cil_avrule *cil_rule, void *type_value_to_cil[], struct cil_class *class_value_to_cil[], struct cil_perm **perm_value_to_cil[])
4803 cil_rule->src = type_value_to_cil[k->source_type];
4804 if (!cil_rule->src) goto exit;
4806 cil_rule->tgt = type_value_to_cil[k->target_type];
4807 if (!cil_rule->tgt) goto exit;
4809 cil_rule->perms.classperms = cil_classperms_from_sepol(pdb, k->target_class, d->data, class_value_to_cil, perm_value_to_cil);
4810 if (!cil_rule->perms.classperms) goto exit;