Lines Matching refs:rc
111 int rc = SEPOL_ERR; in __cil_resolve_perms() local
119 rc = __cil_resolve_perms(class_symtab, common_symtab, curr->data, &sub_list, class_flavor); in __cil_resolve_perms()
120 if (rc != SEPOL_OK) { in __cil_resolve_perms()
127 rc = cil_symtab_get_datum(class_symtab, curr->data, &perm_datum); in __cil_resolve_perms()
128 if (rc == SEPOL_ENOENT) { in __cil_resolve_perms()
130 rc = cil_symtab_get_datum(common_symtab, curr->data, &perm_datum); in __cil_resolve_perms()
133 if (rc != SEPOL_OK) { in __cil_resolve_perms()
154 return rc; in __cil_resolve_perms()
159 int rc = SEPOL_ERR; in cil_resolve_classperms() local
164 rc = cil_resolve_name(current, cp->class_str, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_classperms()
165 if (rc != SEPOL_OK) { in cil_resolve_classperms()
177 rc = __cil_resolve_perms(&class->perms, common_symtab, cp->perm_strs, &cp->perms, FLAVOR(datum)); in cil_resolve_classperms()
178 if (rc != SEPOL_OK) { in cil_resolve_classperms()
185 return rc; in cil_resolve_classperms()
190 int rc = SEPOL_ERR; in cil_resolve_classperms_set() local
193 rc = cil_resolve_name(current, cp_set->set_str, CIL_SYM_CLASSPERMSETS, extra_args, &datum); in cil_resolve_classperms_set()
194 if (rc != SEPOL_OK) { in cil_resolve_classperms_set()
201 rc = cil_resolve_classperms_list(current, cp_set->set->classperms, extra_args); in cil_resolve_classperms_set()
202 if (rc != SEPOL_OK) { in cil_resolve_classperms_set()
210 return rc; in cil_resolve_classperms_set()
215 int rc = SEPOL_ERR; in cil_resolve_classperms_list() local
220 rc = cil_resolve_classperms(current, curr->data, extra_args); in cil_resolve_classperms_list()
221 if (rc != SEPOL_OK) { in cil_resolve_classperms_list()
225 rc = cil_resolve_classperms_set(current, curr->data, extra_args); in cil_resolve_classperms_list()
226 if (rc != SEPOL_OK) { in cil_resolve_classperms_list()
235 return rc; in cil_resolve_classperms_list()
240 int rc = SEPOL_ERR; in cil_resolve_classpermissionset() local
246 rc = cil_resolve_name(current, cps->set_str, CIL_SYM_CLASSPERMSETS, args, &datum); in cil_resolve_classpermissionset()
247 if (rc != SEPOL_OK) { in cil_resolve_classpermissionset()
251 rc = cil_resolve_classperms_list(current, cps->classperms, extra_args); in cil_resolve_classpermissionset()
252 if (rc != SEPOL_OK) { in cil_resolve_classpermissionset()
269 return rc; in cil_resolve_classpermissionset()
292 int rc = SEPOL_ERR; in cil_resolve_permissionx() local
294 rc = cil_resolve_name(current, permx->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_permissionx()
295 if (rc != SEPOL_OK) { in cil_resolve_permissionx()
303 return rc; in cil_resolve_permissionx()
316 int rc = SEPOL_ERR; in cil_resolve_avrule() local
322 rc = cil_resolve_name(current, rule->src_str, CIL_SYM_TYPES, args, &src_datum); in cil_resolve_avrule()
323 if (rc != SEPOL_OK) { in cil_resolve_avrule()
331 rc = cil_resolve_name(current, rule->tgt_str, CIL_SYM_TYPES, args, &tgt_datum); in cil_resolve_avrule()
332 if (rc != SEPOL_OK) { in cil_resolve_avrule()
343 rc = cil_resolve_classperms_list(current, rule->perms.classperms, extra_args); in cil_resolve_avrule()
344 if (rc != SEPOL_OK) { in cil_resolve_avrule()
349 rc = cil_resolve_name(current, rule->perms.x.permx_str, CIL_SYM_PERMX, args, &permx_datum); in cil_resolve_avrule()
350 if (rc != SEPOL_OK) { in cil_resolve_avrule()
355 rc = cil_resolve_permissionx(current, rule->perms.x.permx, extra_args); in cil_resolve_avrule()
356 if (rc != SEPOL_OK) { in cil_resolve_avrule()
365 return rc; in cil_resolve_avrule()
376 int rc = SEPOL_ERR; in cil_resolve_type_rule() local
378 rc = cil_resolve_name(current, rule->src_str, CIL_SYM_TYPES, extra_args, &src_datum); in cil_resolve_type_rule()
379 if (rc != SEPOL_OK) { in cil_resolve_type_rule()
384 rc = cil_resolve_name(current, rule->tgt_str, CIL_SYM_TYPES, extra_args, &tgt_datum); in cil_resolve_type_rule()
385 if (rc != SEPOL_OK) { in cil_resolve_type_rule()
390 rc = cil_resolve_name(current, rule->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_type_rule()
391 if (rc != SEPOL_OK) { in cil_resolve_type_rule()
396 rc = cil_resolve_name(current, rule->result_str, CIL_SYM_TYPES, extra_args, &result_datum); in cil_resolve_type_rule()
397 if (rc != SEPOL_OK) { in cil_resolve_type_rule()
405 rc = SEPOL_ERR; in cil_resolve_type_rule()
413 return rc; in cil_resolve_type_rule()
422 int rc = SEPOL_ERR; in cil_resolve_typeattributeset() local
424 rc = cil_resolve_name(current, attrtypes->attr_str, CIL_SYM_TYPES, extra_args, &attr_datum); in cil_resolve_typeattributeset()
425 if (rc != SEPOL_OK) { in cil_resolve_typeattributeset()
432 rc = SEPOL_ERR; in cil_resolve_typeattributeset()
439 …rc = cil_resolve_expr(CIL_TYPEATTRIBUTESET, attrtypes->str_expr, &attrtypes->datum_expr, current, … in cil_resolve_typeattributeset()
440 if (rc != SEPOL_OK) { in cil_resolve_typeattributeset()
444 rc = cil_verify_no_self_reference(attr_datum, attrtypes->datum_expr); in cil_resolve_typeattributeset()
445 if (rc != SEPOL_OK) { in cil_resolve_typeattributeset()
458 return rc; in cil_resolve_typeattributeset()
468 int rc = SEPOL_ERR; in cil_resolve_expandtypeattribute() local
473 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_TYPES, extra_args, &attr_datum); in cil_resolve_expandtypeattribute()
474 if (rc != SEPOL_OK) { in cil_resolve_expandtypeattribute()
481 rc = SEPOL_ERR; in cil_resolve_expandtypeattribute()
492 return rc; in cil_resolve_expandtypeattribute()
497 int rc = SEPOL_ERR; in cil_resolve_aliasactual() local
504 rc = cil_flavor_to_symtab_index(flavor, &sym_index); in cil_resolve_aliasactual()
505 if (rc != SEPOL_OK) { in cil_resolve_aliasactual()
509 …rc = cil_resolve_name_keep_aliases(current, aliasactual->alias_str, sym_index, extra_args, &alias_… in cil_resolve_aliasactual()
510 if (rc != SEPOL_OK) { in cil_resolve_aliasactual()
515 rc = SEPOL_ERR; in cil_resolve_aliasactual()
519 rc = cil_resolve_name(current, aliasactual->actual_str, sym_index, extra_args, &actual_datum); in cil_resolve_aliasactual()
520 if (rc != SEPOL_OK) { in cil_resolve_aliasactual()
526 rc = SEPOL_ERR; in cil_resolve_aliasactual()
534 rc = SEPOL_ERR; in cil_resolve_aliasactual()
543 return rc; in cil_resolve_aliasactual()
595 int rc = SEPOL_ERR; in cil_resolve_typepermissive() local
597 rc = cil_resolve_name(current, typeperm->type_str, CIL_SYM_TYPES, extra_args, &type_datum); in cil_resolve_typepermissive()
598 if (rc != SEPOL_OK) { in cil_resolve_typepermissive()
606 rc = SEPOL_ERR; in cil_resolve_typepermissive()
615 return rc; in cil_resolve_typepermissive()
628 int rc = SEPOL_ERR; in cil_resolve_nametypetransition() local
630 rc = cil_resolve_name(current, nametypetrans->src_str, CIL_SYM_TYPES, extra_args, &src_datum); in cil_resolve_nametypetransition()
631 if (rc != SEPOL_OK) { in cil_resolve_nametypetransition()
636 rc = cil_resolve_name(current, nametypetrans->tgt_str, CIL_SYM_TYPES, extra_args, &tgt_datum); in cil_resolve_nametypetransition()
637 if (rc != SEPOL_OK) { in cil_resolve_nametypetransition()
642 rc = cil_resolve_name(current, nametypetrans->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_nametypetransition()
643 if (rc != SEPOL_OK) { in cil_resolve_nametypetransition()
650 rc = cil_resolve_name(current, nametypetrans->name_str, CIL_SYM_NAMES, extra_args, &name_datum); in cil_resolve_nametypetransition()
651 if (rc != SEPOL_OK) { in cil_resolve_nametypetransition()
657 …rc = cil_resolve_name(current, nametypetrans->result_str, CIL_SYM_TYPES, extra_args, &result_datum… in cil_resolve_nametypetransition()
658 if (rc != SEPOL_OK) { in cil_resolve_nametypetransition()
666 rc = SEPOL_ERR; in cil_resolve_nametypetransition()
674 return rc; in cil_resolve_nametypetransition()
684 int rc = SEPOL_ERR; in cil_resolve_rangetransition() local
686 rc = cil_resolve_name(current, rangetrans->src_str, CIL_SYM_TYPES, extra_args, &src_datum); in cil_resolve_rangetransition()
687 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
692 rc = cil_resolve_name(current, rangetrans->exec_str, CIL_SYM_TYPES, extra_args, &exec_datum); in cil_resolve_rangetransition()
693 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
698 rc = cil_resolve_name(current, rangetrans->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_rangetransition()
699 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
705 …rc = cil_resolve_name(current, rangetrans->range_str, CIL_SYM_LEVELRANGES, extra_args, &range_datu… in cil_resolve_rangetransition()
706 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
713 rc = cil_resolve_levelrange(current, rangetrans->range, extra_args); in cil_resolve_rangetransition()
714 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
719 rc = cil_resolve_levelrange(current, rangetrans->range, extra_args); in cil_resolve_rangetransition()
720 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
728 return rc; in cil_resolve_rangetransition()
747 int rc = SEPOL_ERR; in cil_resolve_classcommon() local
749 rc = cil_resolve_name(current, clscom->class_str, CIL_SYM_CLASSES, extra_args, &class_datum); in cil_resolve_classcommon()
750 if (rc != SEPOL_OK) { in cil_resolve_classcommon()
754 rc = cil_resolve_name(current, clscom->common_str, CIL_SYM_COMMONS, extra_args, &common_datum); in cil_resolve_classcommon()
755 if (rc != SEPOL_OK) { in cil_resolve_classcommon()
763 rc = SEPOL_ERR; in cil_resolve_classcommon()
780 return rc; in cil_resolve_classcommon()
785 int rc = SEPOL_ERR; in cil_resolve_classmapping() local
792 rc = cil_resolve_name(current, mapping->map_class_str, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_classmapping()
793 if (rc != SEPOL_OK) { in cil_resolve_classmapping()
798 rc = cil_symtab_get_datum(&map->perms, mapping->map_perm_str, &datum); in cil_resolve_classmapping()
799 if (rc != SEPOL_OK) { in cil_resolve_classmapping()
805 rc = cil_resolve_classperms_list(current, mapping->classperms, extra_args); in cil_resolve_classmapping()
806 if (rc != SEPOL_OK) { in cil_resolve_classmapping()
821 return rc; in cil_resolve_classmapping()
829 int rc = SEPOL_ERR; in cil_resolve_userrole() local
831 rc = cil_resolve_name(current, userrole->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_userrole()
832 if (rc != SEPOL_OK) { in cil_resolve_userrole()
837 rc = cil_resolve_name(current, userrole->role_str, CIL_SYM_ROLES, extra_args, &role_datum); in cil_resolve_userrole()
838 if (rc != SEPOL_OK) { in cil_resolve_userrole()
846 return rc; in cil_resolve_userrole()
856 int rc = SEPOL_ERR; in cil_resolve_userlevel() local
858 rc = cil_resolve_name(current, usrlvl->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_userlevel()
859 if (rc != SEPOL_OK) { in cil_resolve_userlevel()
867 rc = SEPOL_ERR; in cil_resolve_userlevel()
874 rc = cil_resolve_name(current, usrlvl->level_str, CIL_SYM_LEVELS, extra_args, &lvl_datum); in cil_resolve_userlevel()
875 if (rc != SEPOL_OK) { in cil_resolve_userlevel()
883 rc = cil_resolve_level(current, user->dftlevel, extra_args); in cil_resolve_userlevel()
884 if (rc != SEPOL_OK) { in cil_resolve_userlevel()
889 rc = cil_resolve_level(current, usrlvl->level, extra_args); in cil_resolve_userlevel()
890 if (rc != SEPOL_OK) { in cil_resolve_userlevel()
899 return rc; in cil_resolve_userlevel()
909 int rc = SEPOL_ERR; in cil_resolve_userrange() local
911 rc = cil_resolve_name(current, userrange->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_userrange()
912 if (rc != SEPOL_OK) { in cil_resolve_userrange()
920 rc = SEPOL_ERR; in cil_resolve_userrange()
927 …rc = cil_resolve_name(current, userrange->range_str, CIL_SYM_LEVELRANGES, extra_args, &range_datum… in cil_resolve_userrange()
928 if (rc != SEPOL_OK) { in cil_resolve_userrange()
936 rc = cil_resolve_levelrange(current, user->range, extra_args); in cil_resolve_userrange()
937 if (rc != SEPOL_OK) { in cil_resolve_userrange()
942 rc = cil_resolve_levelrange(current, userrange->range, extra_args); in cil_resolve_userrange()
943 if (rc != SEPOL_OK) { in cil_resolve_userrange()
952 return rc; in cil_resolve_userrange()
960 int rc = SEPOL_ERR; in cil_resolve_userprefix() local
962 rc = cil_resolve_name(current, userprefix->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_userprefix()
963 if (rc != SEPOL_OK) { in cil_resolve_userprefix()
971 rc = SEPOL_ERR; in cil_resolve_userprefix()
978 return rc; in cil_resolve_userprefix()
987 int rc = SEPOL_ERR; in cil_resolve_selinuxuser() local
989 rc = cil_resolve_name(current, selinuxuser->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_selinuxuser()
990 if (rc != SEPOL_OK) { in cil_resolve_selinuxuser()
998 rc = SEPOL_ERR; in cil_resolve_selinuxuser()
1005 …rc = cil_resolve_name(current, selinuxuser->range_str, CIL_SYM_LEVELRANGES, extra_args, &lvlrange_… in cil_resolve_selinuxuser()
1006 if (rc != SEPOL_OK) { in cil_resolve_selinuxuser()
1013 rc = cil_resolve_levelrange(current, selinuxuser->range, extra_args); in cil_resolve_selinuxuser()
1014 if (rc != SEPOL_OK) { in cil_resolve_selinuxuser()
1019 rc = cil_resolve_levelrange(current, selinuxuser->range, extra_args); in cil_resolve_selinuxuser()
1020 if (rc != SEPOL_OK) { in cil_resolve_selinuxuser()
1025 rc = SEPOL_OK; in cil_resolve_selinuxuser()
1027 return rc; in cil_resolve_selinuxuser()
1035 int rc = SEPOL_ERR; in cil_resolve_roletype() local
1037 rc = cil_resolve_name(current, roletype->role_str, CIL_SYM_ROLES, extra_args, &role_datum); in cil_resolve_roletype()
1038 if (rc != SEPOL_OK) { in cil_resolve_roletype()
1043 rc = cil_resolve_name(current, roletype->type_str, CIL_SYM_TYPES, extra_args, &type_datum); in cil_resolve_roletype()
1044 if (rc != SEPOL_OK) { in cil_resolve_roletype()
1052 return rc; in cil_resolve_roletype()
1063 int rc = SEPOL_ERR; in cil_resolve_roletransition() local
1065 rc = cil_resolve_name(current, roletrans->src_str, CIL_SYM_ROLES, extra_args, &src_datum); in cil_resolve_roletransition()
1066 if (rc != SEPOL_OK) { in cil_resolve_roletransition()
1071 rc = cil_resolve_name(current, roletrans->tgt_str, CIL_SYM_TYPES, extra_args, &tgt_datum); in cil_resolve_roletransition()
1072 if (rc != SEPOL_OK) { in cil_resolve_roletransition()
1077 rc = cil_resolve_name(current, roletrans->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_roletransition()
1078 if (rc != SEPOL_OK) { in cil_resolve_roletransition()
1083 rc = cil_resolve_name(current, roletrans->result_str, CIL_SYM_ROLES, extra_args, &result_datum); in cil_resolve_roletransition()
1084 if (rc != SEPOL_OK) { in cil_resolve_roletransition()
1089 rc = SEPOL_ERR; in cil_resolve_roletransition()
1099 return rc; in cil_resolve_roletransition()
1107 int rc = SEPOL_ERR; in cil_resolve_roleallow() local
1109 rc = cil_resolve_name(current, roleallow->src_str, CIL_SYM_ROLES, extra_args, &src_datum); in cil_resolve_roleallow()
1110 if (rc != SEPOL_OK) { in cil_resolve_roleallow()
1115 rc = cil_resolve_name(current, roleallow->tgt_str, CIL_SYM_ROLES, extra_args, &tgt_datum); in cil_resolve_roleallow()
1116 if (rc != SEPOL_OK) { in cil_resolve_roleallow()
1124 return rc; in cil_resolve_roleallow()
1129 int rc = SEPOL_ERR; in cil_resolve_roleattributeset() local
1135 rc = cil_resolve_name(current, attrroles->attr_str, CIL_SYM_ROLES, extra_args, &attr_datum); in cil_resolve_roleattributeset()
1136 if (rc != SEPOL_OK) { in cil_resolve_roleattributeset()
1142 rc = SEPOL_ERR; in cil_resolve_roleattributeset()
1148 …rc = cil_resolve_expr(CIL_ROLEATTRIBUTESET, attrroles->str_expr, &attrroles->datum_expr, current, … in cil_resolve_roleattributeset()
1149 if (rc != SEPOL_OK) { in cil_resolve_roleattributeset()
1153 rc = cil_verify_no_self_reference(attr_datum, attrroles->datum_expr); in cil_resolve_roleattributeset()
1154 if (rc != SEPOL_OK) { in cil_resolve_roleattributeset()
1167 return rc; in cil_resolve_roleattributeset()
1287 int rc = SEPOL_ERR; in __cil_ordered_lists_merge() local
1295 rc = __cil_ordered_list_insert(old, NULL, nfirst, NULL); in __cil_ordered_lists_merge()
1296 return rc; in __cil_ordered_lists_merge()
1319 rc = __cil_ordered_list_insert(old, NULL, nfirst, nmatch); in __cil_ordered_lists_merge()
1320 if (rc != SEPOL_OK) { in __cil_ordered_lists_merge()
1321 return rc; in __cil_ordered_lists_merge()
1338 rc = __cil_ordered_list_insert(old, oprev, ncurr, nmatch); in __cil_ordered_lists_merge()
1339 if (rc != SEPOL_OK) { in __cil_ordered_lists_merge()
1340 return rc; in __cil_ordered_lists_merge()
1363 rc = __cil_ordered_list_insert(old, old->tail, ncurr, NULL); in __cil_ordered_lists_merge()
1364 if (rc != SEPOL_OK) { in __cil_ordered_lists_merge()
1365 return rc; in __cil_ordered_lists_merge()
1378 int rc = SEPOL_ERR; in insert_unordered() local
1395 rc = SEPOL_ERR; in insert_unordered()
1401 rc = SEPOL_OK; in insert_unordered()
1404 return rc; in insert_unordered()
1413 int rc = SEPOL_ERR; in __cil_ordered_lists_merge_all() local
1423 rc = __cil_ordered_lists_merge(composite, ordered_list->list); in __cil_ordered_lists_merge_all()
1424 if (rc != SEPOL_OK) { in __cil_ordered_lists_merge_all()
1445 rc = insert_unordered(composite, *unordered_lists); in __cil_ordered_lists_merge_all()
1446 if (rc != SEPOL_OK) { in __cil_ordered_lists_merge_all()
1473 int rc = SEPOL_ERR; in cil_resolve_classorder() local
1484 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_classorder()
1485 if (rc != SEPOL_OK) { in cil_resolve_classorder()
1505 return rc; in cil_resolve_classorder()
1517 int rc = SEPOL_ERR; in cil_resolve_sidorder() local
1522 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_SIDS, extra_args, &datum); in cil_resolve_sidorder()
1523 if (rc != SEPOL_OK) { in cil_resolve_sidorder()
1539 return rc; in cil_resolve_sidorder()
1566 int rc = SEPOL_ERR; in cil_resolve_catorder() local
1572 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_CATS, extra_args, &cat_datum); in cil_resolve_catorder()
1573 if (rc != SEPOL_OK) { in cil_resolve_catorder()
1580 rc = SEPOL_ERR; in cil_resolve_catorder()
1596 return rc; in cil_resolve_catorder()
1608 int rc = SEPOL_ERR; in cil_resolve_sensitivityorder() local
1613 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_SENS, extra_args, &datum); in cil_resolve_sensitivityorder()
1614 if (rc != SEPOL_OK) { in cil_resolve_sensitivityorder()
1630 return rc; in cil_resolve_sensitivityorder()
1635 int rc = SEPOL_ERR; in cil_resolve_cats() local
1637 rc = cil_resolve_expr(CIL_CATSET, cats->str_expr, &cats->datum_expr, current, extra_args); in cil_resolve_cats()
1638 if (rc != SEPOL_OK) { in cil_resolve_cats()
1645 return rc; in cil_resolve_cats()
1651 int rc = SEPOL_ERR; in cil_resolve_catset() local
1653 rc = cil_resolve_cats(current, catset->cats, extra_args); in cil_resolve_catset()
1654 if (rc != SEPOL_OK) { in cil_resolve_catset()
1658 rc = cil_verify_no_self_reference((struct cil_symtab_datum *)catset, catset->cats->datum_expr); in cil_resolve_catset()
1659 if (rc != SEPOL_OK) { in cil_resolve_catset()
1665 return rc; in cil_resolve_catset()
1670 int rc = SEPOL_ERR; in cil_resolve_senscat() local
1675 rc = cil_resolve_name(current, (char*)senscat->sens_str, CIL_SYM_SENS, extra_args, &sens_datum); in cil_resolve_senscat()
1676 if (rc != SEPOL_OK) { in cil_resolve_senscat()
1681 rc = cil_resolve_cats(current, senscat->cats, extra_args); in cil_resolve_senscat()
1682 if (rc != SEPOL_OK) { in cil_resolve_senscat()
1697 return rc; in cil_resolve_senscat()
1703 int rc = SEPOL_ERR; in cil_resolve_level() local
1705 rc = cil_resolve_name(current, (char*)level->sens_str, CIL_SYM_SENS, extra_args, &sens_datum); in cil_resolve_level()
1706 if (rc != SEPOL_OK) { in cil_resolve_level()
1714 rc = cil_resolve_cats(current, level->cats, extra_args); in cil_resolve_level()
1715 if (rc != SEPOL_OK) { in cil_resolve_level()
1723 return rc; in cil_resolve_level()
1730 int rc = SEPOL_ERR; in cil_resolve_levelrange() local
1733 rc = cil_resolve_name(current, lvlrange->low_str, CIL_SYM_LEVELS, extra_args, &low_datum); in cil_resolve_levelrange()
1734 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1741 rc = cil_resolve_level(current, lvlrange->low, extra_args); in cil_resolve_levelrange()
1742 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1747 rc = cil_resolve_level(current, lvlrange->low, extra_args); in cil_resolve_levelrange()
1748 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1754 rc = cil_resolve_name(current, lvlrange->high_str, CIL_SYM_LEVELS, extra_args, &high_datum); in cil_resolve_levelrange()
1755 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1762 rc = cil_resolve_level(current, lvlrange->high, extra_args); in cil_resolve_levelrange()
1763 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1768 rc = cil_resolve_level(current, lvlrange->high, extra_args); in cil_resolve_levelrange()
1769 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1777 return rc; in cil_resolve_levelrange()
1783 int rc = SEPOL_ERR; in cil_resolve_constrain() local
1785 rc = cil_resolve_classperms_list(current, cons->classperms, extra_args); in cil_resolve_constrain()
1786 if (rc != SEPOL_OK) { in cil_resolve_constrain()
1790 rc = cil_resolve_expr(CIL_CONSTRAIN, cons->str_expr, &cons->datum_expr, current, extra_args); in cil_resolve_constrain()
1791 if (rc != SEPOL_OK) { in cil_resolve_constrain()
1798 return rc; in cil_resolve_constrain()
1806 int rc = SEPOL_ERR; in cil_resolve_validatetrans() local
1808 rc = cil_resolve_name(current, validtrans->class_str, CIL_SYM_CLASSES, args, &class_datum); in cil_resolve_validatetrans()
1809 if (rc != SEPOL_OK) { in cil_resolve_validatetrans()
1814 …rc = cil_resolve_expr(CIL_VALIDATETRANS, validtrans->str_expr, &validtrans->datum_expr, current, e… in cil_resolve_validatetrans()
1815 if (rc != SEPOL_OK) { in cil_resolve_validatetrans()
1822 return rc; in cil_resolve_validatetrans()
1833 int rc = SEPOL_ERR; in cil_resolve_context() local
1835 rc = cil_resolve_name(current, context->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_context()
1836 if (rc != SEPOL_OK) { in cil_resolve_context()
1844 rc = SEPOL_ERR; in cil_resolve_context()
1850 rc = cil_resolve_name(current, context->role_str, CIL_SYM_ROLES, extra_args, &role_datum); in cil_resolve_context()
1851 if (rc != SEPOL_OK) { in cil_resolve_context()
1857 rc = SEPOL_ERR; in cil_resolve_context()
1864 rc = cil_resolve_name(current, context->type_str, CIL_SYM_TYPES, extra_args, &type_datum); in cil_resolve_context()
1865 if (rc != SEPOL_OK) { in cil_resolve_context()
1872 rc = SEPOL_ERR; in cil_resolve_context()
1879 …rc = cil_resolve_name(current, context->range_str, CIL_SYM_LEVELRANGES, extra_args, &lvlrange_datu… in cil_resolve_context()
1880 if (rc != SEPOL_OK) { in cil_resolve_context()
1887 rc = cil_resolve_levelrange(current, context->range, extra_args); in cil_resolve_context()
1888 if (rc != SEPOL_OK) { in cil_resolve_context()
1893 rc = cil_resolve_levelrange(current, context->range, extra_args); in cil_resolve_context()
1894 if (rc != SEPOL_OK) { in cil_resolve_context()
1902 return rc; in cil_resolve_context()
1909 int rc = SEPOL_ERR; in cil_resolve_filecon() local
1912 …rc = cil_resolve_name(current, filecon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_filecon()
1913 if (rc != SEPOL_OK) { in cil_resolve_filecon()
1914 return rc; in cil_resolve_filecon()
1918 rc = cil_resolve_context(current, filecon->context, extra_args); in cil_resolve_filecon()
1919 if (rc != SEPOL_OK) { in cil_resolve_filecon()
1920 return rc; in cil_resolve_filecon()
1931 int rc = SEPOL_ERR; in cil_resolve_ibpkeycon() local
1934 …rc = cil_resolve_name(current, ibpkeycon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datu… in cil_resolve_ibpkeycon()
1935 if (rc != SEPOL_OK) in cil_resolve_ibpkeycon()
1940 rc = cil_resolve_context(current, ibpkeycon->context, extra_args); in cil_resolve_ibpkeycon()
1941 if (rc != SEPOL_OK) in cil_resolve_ibpkeycon()
1948 return rc; in cil_resolve_ibpkeycon()
1955 int rc = SEPOL_ERR; in cil_resolve_portcon() local
1958 …rc = cil_resolve_name(current, portcon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_portcon()
1959 if (rc != SEPOL_OK) { in cil_resolve_portcon()
1964 rc = cil_resolve_context(current, portcon->context, extra_args); in cil_resolve_portcon()
1965 if (rc != SEPOL_OK) { in cil_resolve_portcon()
1973 return rc; in cil_resolve_portcon()
1980 int rc = SEPOL_ERR; in cil_resolve_genfscon() local
1983 …rc = cil_resolve_name(current, genfscon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum… in cil_resolve_genfscon()
1984 if (rc != SEPOL_OK) { in cil_resolve_genfscon()
1989 rc = cil_resolve_context(current, genfscon->context, extra_args); in cil_resolve_genfscon()
1990 if (rc != SEPOL_OK) { in cil_resolve_genfscon()
1998 return rc; in cil_resolve_genfscon()
2007 int rc = SEPOL_ERR; in cil_resolve_nodecon() local
2010 rc = cil_resolve_name(current, nodecon->addr_str, CIL_SYM_IPADDRS, extra_args, &addr_datum); in cil_resolve_nodecon()
2011 if (rc != SEPOL_OK) { in cil_resolve_nodecon()
2018 rc = cil_resolve_name(current, nodecon->mask_str, CIL_SYM_IPADDRS, extra_args, &mask_datum); in cil_resolve_nodecon()
2019 if (rc != SEPOL_OK) { in cil_resolve_nodecon()
2026 …rc = cil_resolve_name(current, nodecon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_nodecon()
2027 if (rc != SEPOL_OK) { in cil_resolve_nodecon()
2032 rc = cil_resolve_context(current, nodecon->context, extra_args); in cil_resolve_nodecon()
2033 if (rc != SEPOL_OK) { in cil_resolve_nodecon()
2040 rc = SEPOL_ERR; in cil_resolve_nodecon()
2048 return rc; in cil_resolve_nodecon()
2057 int rc = SEPOL_ERR; in cil_resolve_netifcon() local
2060 …rc = cil_resolve_name(current, netifcon->if_context_str, CIL_SYM_CONTEXTS, extra_args, &ifcon_datu… in cil_resolve_netifcon()
2061 if (rc != SEPOL_OK) { in cil_resolve_netifcon()
2066 rc = cil_resolve_context(current, netifcon->if_context, extra_args); in cil_resolve_netifcon()
2067 if (rc != SEPOL_OK) { in cil_resolve_netifcon()
2073 …rc = cil_resolve_name(current, netifcon->packet_context_str, CIL_SYM_CONTEXTS, extra_args, &packco… in cil_resolve_netifcon()
2074 if (rc != SEPOL_OK) { in cil_resolve_netifcon()
2079 rc = cil_resolve_context(current, netifcon->packet_context, extra_args); in cil_resolve_netifcon()
2080 if (rc != SEPOL_OK) { in cil_resolve_netifcon()
2087 return rc; in cil_resolve_netifcon()
2095 int rc = SEPOL_ERR; in cil_resolve_ibendportcon() local
2098 …rc = cil_resolve_name(current, ibendportcon->context_str, CIL_SYM_CONTEXTS, extra_args, &con_datum… in cil_resolve_ibendportcon()
2099 if (rc != SEPOL_OK) in cil_resolve_ibendportcon()
2104 rc = cil_resolve_context(current, ibendportcon->context, extra_args); in cil_resolve_ibendportcon()
2105 if (rc != SEPOL_OK) in cil_resolve_ibendportcon()
2112 return rc; in cil_resolve_ibendportcon()
2119 int rc = SEPOL_ERR; in cil_resolve_pirqcon() local
2122 …rc = cil_resolve_name(current, pirqcon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_pirqcon()
2123 if (rc != SEPOL_OK) { in cil_resolve_pirqcon()
2128 rc = cil_resolve_context(current, pirqcon->context, extra_args); in cil_resolve_pirqcon()
2129 if (rc != SEPOL_OK) { in cil_resolve_pirqcon()
2137 return rc; in cil_resolve_pirqcon()
2144 int rc = SEPOL_ERR; in cil_resolve_iomemcon() local
2147 …rc = cil_resolve_name(current, iomemcon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum… in cil_resolve_iomemcon()
2148 if (rc != SEPOL_OK) { in cil_resolve_iomemcon()
2153 rc = cil_resolve_context(current, iomemcon->context, extra_args); in cil_resolve_iomemcon()
2154 if (rc != SEPOL_OK) { in cil_resolve_iomemcon()
2162 return rc; in cil_resolve_iomemcon()
2169 int rc = SEPOL_ERR; in cil_resolve_ioportcon() local
2172 …rc = cil_resolve_name(current, ioportcon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datu… in cil_resolve_ioportcon()
2173 if (rc != SEPOL_OK) { in cil_resolve_ioportcon()
2178 rc = cil_resolve_context(current, ioportcon->context, extra_args); in cil_resolve_ioportcon()
2179 if (rc != SEPOL_OK) { in cil_resolve_ioportcon()
2187 return rc; in cil_resolve_ioportcon()
2194 int rc = SEPOL_ERR; in cil_resolve_pcidevicecon() local
2197 …rc = cil_resolve_name(current, pcidevicecon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_d… in cil_resolve_pcidevicecon()
2198 if (rc != SEPOL_OK) { in cil_resolve_pcidevicecon()
2203 rc = cil_resolve_context(current, pcidevicecon->context, extra_args); in cil_resolve_pcidevicecon()
2204 if (rc != SEPOL_OK) { in cil_resolve_pcidevicecon()
2212 return rc; in cil_resolve_pcidevicecon()
2219 int rc = SEPOL_ERR; in cil_resolve_devicetreecon() local
2222 …rc = cil_resolve_name(current, devicetreecon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_… in cil_resolve_devicetreecon()
2223 if (rc != SEPOL_OK) { in cil_resolve_devicetreecon()
2228 rc = cil_resolve_context(current, devicetreecon->context, extra_args); in cil_resolve_devicetreecon()
2229 if (rc != SEPOL_OK) { in cil_resolve_devicetreecon()
2237 return rc; in cil_resolve_devicetreecon()
2244 int rc = SEPOL_ERR; in cil_resolve_fsuse() local
2247 rc = cil_resolve_name(current, fsuse->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_fsuse()
2248 if (rc != SEPOL_OK) { in cil_resolve_fsuse()
2253 rc = cil_resolve_context(current, fsuse->context, extra_args); in cil_resolve_fsuse()
2254 if (rc != SEPOL_OK) { in cil_resolve_fsuse()
2262 return rc; in cil_resolve_fsuse()
2272 int rc = SEPOL_ERR; in cil_resolve_sidcontext() local
2274 rc = cil_resolve_name(current, sidcon->sid_str, CIL_SYM_SIDS, extra_args, &sid_datum); in cil_resolve_sidcontext()
2275 if (rc != SEPOL_OK) { in cil_resolve_sidcontext()
2281 rc = cil_resolve_name(current, sidcon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_sidcontext()
2282 if (rc != SEPOL_OK) { in cil_resolve_sidcontext()
2287 rc = cil_resolve_context(current, sidcon->context, extra_args); in cil_resolve_sidcontext()
2288 if (rc != SEPOL_OK) { in cil_resolve_sidcontext()
2295 rc = SEPOL_ERR; in cil_resolve_sidcontext()
2304 return rc; in cil_resolve_sidcontext()
2312 int rc = SEPOL_ERR; in cil_resolve_blockinherit_link() local
2314 rc = cil_resolve_name(current, inherit->block_str, CIL_SYM_BLOCKS, extra_args, &block_datum); in cil_resolve_blockinherit_link()
2315 if (rc != SEPOL_OK) { in cil_resolve_blockinherit_link()
2323 rc = SEPOL_ERR; in cil_resolve_blockinherit_link()
2337 return rc; in cil_resolve_blockinherit_link()
2377 int rc = SEPOL_ERR; in cil_check_recursive_blockinherit() local
2395 rc = SEPOL_ERR; in cil_check_recursive_blockinherit()
2399 rc = SEPOL_OK; in cil_check_recursive_blockinherit()
2402 return rc; in cil_check_recursive_blockinherit()
2411 int rc = SEPOL_ERR; in cil_resolve_blockinherit_copy() local
2415 rc = SEPOL_OK; in cil_resolve_blockinherit_copy()
2423 rc = SEPOL_OK; in cil_resolve_blockinherit_copy()
2428 rc = cil_check_recursive_blockinherit(item->data); in cil_resolve_blockinherit_copy()
2429 if (rc != SEPOL_OK) { in cil_resolve_blockinherit_copy()
2433 rc = cil_copy_ast(db, current, item->data); in cil_resolve_blockinherit_copy()
2434 if (rc != SEPOL_OK) { in cil_resolve_blockinherit_copy()
2443 return rc; in cil_resolve_blockinherit_copy()
2451 int rc = SEPOL_ERR; in cil_resolve_blockabstract() local
2453 rc = cil_resolve_name(current, abstract->block_str, CIL_SYM_BLOCKS, extra_args, &block_datum); in cil_resolve_blockabstract()
2454 if (rc != SEPOL_OK) { in cil_resolve_blockabstract()
2460 cil_log(CIL_ERR, "Failed to resolve blockabstract to a block, rc: %d\n", rc); in cil_resolve_blockabstract()
2469 return rc; in cil_resolve_blockabstract()
2479 int rc = SEPOL_ERR; in cil_resolve_in() local
2485 rc = cil_resolve_name(current, in->block_str, CIL_SYM_BLOCKS, extra_args, &block_datum); in cil_resolve_in()
2486 if (rc != SEPOL_OK) { in cil_resolve_in()
2492 rc = cil_copy_ast(db, current, block_node); in cil_resolve_in()
2493 if (rc != SEPOL_OK) { in cil_resolve_in()
2494 printf("Failed to copy in, rc: %d\n", rc); in cil_resolve_in()
2505 return rc; in cil_resolve_in()
2519 int rc = SEPOL_ERR; in cil_resolve_in_list() local
2533 rc = cil_resolve_name(node, in->block_str, CIL_SYM_BLOCKS, extra_args, &block_datum); in cil_resolve_in_list()
2534 if (rc != SEPOL_OK) { in cil_resolve_in_list()
2538 rc = cil_resolve_in(node, extra_args); in cil_resolve_in_list()
2539 if (rc != SEPOL_OK) { in cil_resolve_in_list()
2551 rc = SEPOL_ERR; in cil_resolve_in_list()
2557 rc = SEPOL_OK; in cil_resolve_in_list()
2560 return rc; in cil_resolve_in_list()
2566 int rc = SEPOL_ERR; in cil_resolve_bounds() local
2572 rc = cil_flavor_to_symtab_index(flavor, &index); in cil_resolve_bounds()
2573 if (rc != SEPOL_OK) { in cil_resolve_bounds()
2577 rc = cil_resolve_name(current, bounds->parent_str, index, extra_args, &parent_datum); in cil_resolve_bounds()
2578 if (rc != SEPOL_OK) { in cil_resolve_bounds()
2583 rc = SEPOL_ERR; in cil_resolve_bounds()
2588 rc = cil_resolve_name(current, bounds->child_str, index, extra_args, &child_datum); in cil_resolve_bounds()
2589 if (rc != SEPOL_OK) { in cil_resolve_bounds()
2594 rc = SEPOL_ERR; in cil_resolve_bounds()
2604 rc = SEPOL_ERR; in cil_resolve_bounds()
2616 rc = SEPOL_ERR; in cil_resolve_bounds()
2628 rc = SEPOL_ERR; in cil_resolve_bounds()
2643 return rc; in cil_resolve_bounds()
2648 int rc = SEPOL_ERR; in cil_resolve_default() local
2656 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_default()
2657 if (rc != SEPOL_OK) { in cil_resolve_default()
2666 return rc; in cil_resolve_default()
2671 int rc = SEPOL_ERR; in cil_resolve_defaultrange() local
2679 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_defaultrange()
2680 if (rc != SEPOL_OK) { in cil_resolve_defaultrange()
2689 return rc; in cil_resolve_defaultrange()
2731 int rc = SEPOL_ERR; in cil_check_recursive_call() local
2745 rc = SEPOL_OK; in cil_check_recursive_call()
2755 rc = SEPOL_ERR; in cil_check_recursive_call()
2759 rc = SEPOL_OK; in cil_check_recursive_call()
2761 return rc; in cil_check_recursive_call()
2771 int rc = SEPOL_ERR; in cil_resolve_call1() local
2777 rc = cil_resolve_name(current, new_call->macro_str, CIL_SYM_BLOCKS, extra_args, ¯o_datum); in cil_resolve_call1()
2778 if (rc != SEPOL_OK) { in cil_resolve_call1()
2786 rc = SEPOL_ERR; in cil_resolve_call1()
2799 rc = SEPOL_ERR; in cil_resolve_call1()
2812 rc = SEPOL_ERR; in cil_resolve_call1()
2816 rc = SEPOL_ERR; in cil_resolve_call1()
2856 rc = cil_fill_cats(pc, &catset->cats); in cil_resolve_call1()
2857 if (rc != SEPOL_OK) { in cil_resolve_call1()
2880 rc = cil_fill_level(pc->cl_head, level); in cil_resolve_call1()
2881 if (rc != SEPOL_OK) { in cil_resolve_call1()
2882 cil_log(CIL_ERR, "Failed to create anonymous level, rc: %d\n", rc); in cil_resolve_call1()
2905 rc = cil_fill_levelrange(pc->cl_head, range); in cil_resolve_call1()
2906 if (rc != SEPOL_OK) { in cil_resolve_call1()
2907 cil_log(CIL_ERR, "Failed to create anonymous levelrange, rc: %d\n", rc); in cil_resolve_call1()
2930 rc = cil_fill_ipaddr(pc->cl_head, ipaddr); in cil_resolve_call1()
2931 if (rc != SEPOL_OK) { in cil_resolve_call1()
2932 cil_log(CIL_ERR, "Failed to create anonymous ip address, rc: %d\n", rc); in cil_resolve_call1()
2961 rc = cil_fill_classperms_list(pc, &cp->classperms); in cil_resolve_call1()
2962 if (rc != SEPOL_OK) { in cil_resolve_call1()
2982 rc = SEPOL_ERR; in cil_resolve_call1()
2995 rc = SEPOL_ERR; in cil_resolve_call1()
3000 rc = SEPOL_ERR; in cil_resolve_call1()
3007 rc = cil_check_recursive_call(current, macro_node); in cil_resolve_call1()
3008 if (rc != SEPOL_OK) { in cil_resolve_call1()
3012 rc = cil_copy_ast(db, macro_node, current); in cil_resolve_call1()
3013 if (rc != SEPOL_OK) { in cil_resolve_call1()
3014 cil_log(CIL_ERR, "Failed to copy macro, rc: %d\n", rc); in cil_resolve_call1()
3022 return rc; in cil_resolve_call1()
3028 int rc = SEPOL_ERR; in cil_resolve_call2() local
3033 rc = SEPOL_OK; in cil_resolve_call2()
3041 rc = SEPOL_ERR; in cil_resolve_call2()
3115 rc = SEPOL_ERR; in cil_resolve_call2()
3120 rc = cil_resolve_name(current, arg->arg_str, sym_index, extra_args, &(arg->arg)); in cil_resolve_call2()
3121 if (rc != SEPOL_OK) { in cil_resolve_call2()
3130 return rc; in cil_resolve_call2()
3137 int rc = SEPOL_ERR; in cil_resolve_name_call_args() local
3149 rc = cil_flavor_to_symtab_index(arg->flavor, ¶m_index); in cil_resolve_name_call_args()
3153 rc = SEPOL_OK; in cil_resolve_name_call_args()
3162 return rc; in cil_resolve_name_call_args()
3167 int rc = SEPOL_ERR; in cil_resolve_expr() local
3200 rc = cil_resolve_name(parent, curr->data, sym_index, extra_args, &res_datum); in cil_resolve_expr()
3201 if (rc != SEPOL_OK) { in cil_resolve_expr()
3213 rc = cil_resolve_expr(expr_type, curr->data, &datum_sub_expr, parent, extra_args); in cil_resolve_expr()
3214 if (rc != SEPOL_OK) { in cil_resolve_expr()
3229 return rc; in cil_resolve_expr()
3234 int rc = SEPOL_ERR; in cil_resolve_boolif() local
3237 rc = cil_resolve_expr(CIL_BOOLEANIF, bif->str_expr, &bif->datum_expr, current, extra_args); in cil_resolve_boolif()
3238 if (rc != SEPOL_OK) { in cil_resolve_boolif()
3245 return rc; in cil_resolve_boolif()
3301 int rc = SEPOL_ERR; in cil_resolve_tunif() local
3312 rc = cil_resolve_expr(CIL_TUNABLEIF, tif->str_expr, &tif->datum_expr, current, extra_args); in cil_resolve_tunif()
3313 if (rc != SEPOL_OK) { in cil_resolve_tunif()
3339 rc = cil_copy_ast(db, true_node, current->parent); in cil_resolve_tunif()
3340 if (rc != SEPOL_OK) { in cil_resolve_tunif()
3346 rc = cil_copy_ast(db, false_node, current->parent); in cil_resolve_tunif()
3347 if (rc != SEPOL_OK) { in cil_resolve_tunif()
3360 return rc; in cil_resolve_tunif()
3365 int rc = SEPOL_ERR; in cil_resolve_userattributeset() local
3371 rc = cil_resolve_name(current, attrusers->attr_str, CIL_SYM_USERS, extra_args, &attr_datum); in cil_resolve_userattributeset()
3372 if (rc != SEPOL_OK) { in cil_resolve_userattributeset()
3378 rc = SEPOL_ERR; in cil_resolve_userattributeset()
3384 …rc = cil_resolve_expr(CIL_USERATTRIBUTESET, attrusers->str_expr, &attrusers->datum_expr, current, … in cil_resolve_userattributeset()
3385 if (rc != SEPOL_OK) { in cil_resolve_userattributeset()
3389 rc = cil_verify_no_self_reference(attr_datum, attrusers->datum_expr); in cil_resolve_userattributeset()
3390 if (rc != SEPOL_OK) { in cil_resolve_userattributeset()
3403 return rc; in cil_resolve_userattributeset()
3408 int rc = SEPOL_OK; in __cil_resolve_ast_node() local
3422 rc = cil_resolve_tunif(node, args); in __cil_resolve_ast_node()
3434 rc = cil_resolve_blockinherit_link(node, args); in __cil_resolve_ast_node()
3439 rc = cil_resolve_blockinherit_copy(node, args); in __cil_resolve_ast_node()
3444 rc = cil_resolve_blockabstract(node, args); in __cil_resolve_ast_node()
3449 rc = cil_resolve_call1(node, args); in __cil_resolve_ast_node()
3454 rc = cil_resolve_call1(node, args); in __cil_resolve_ast_node()
3459 rc = cil_resolve_call2(node, args); in __cil_resolve_ast_node()
3465 rc = cil_resolve_aliasactual(node, args, CIL_TYPE, CIL_TYPEALIAS); in __cil_resolve_ast_node()
3468 rc = cil_resolve_aliasactual(node, args, CIL_SENS, CIL_SENSALIAS); in __cil_resolve_ast_node()
3471 rc = cil_resolve_aliasactual(node, args, CIL_CAT, CIL_CATALIAS); in __cil_resolve_ast_node()
3480 rc = cil_resolve_alias_to_actual(node, CIL_TYPE); in __cil_resolve_ast_node()
3483 rc = cil_resolve_alias_to_actual(node, CIL_SENS); in __cil_resolve_ast_node()
3486 rc = cil_resolve_alias_to_actual(node, CIL_CAT); in __cil_resolve_ast_node()
3495 rc = cil_resolve_sidorder(node, args); in __cil_resolve_ast_node()
3498 rc = cil_resolve_classorder(node, args); in __cil_resolve_ast_node()
3501 rc = cil_resolve_catorder(node, args); in __cil_resolve_ast_node()
3504 rc = cil_resolve_sensitivityorder(node, args); in __cil_resolve_ast_node()
3507 rc = cil_resolve_boolif(node, args); in __cil_resolve_ast_node()
3516 rc = cil_resolve_catset(node, (struct cil_catset*)node->data, args); in __cil_resolve_ast_node()
3525 rc = cil_resolve_senscat(node, args); in __cil_resolve_ast_node()
3528 rc = cil_resolve_classcommon(node, args); in __cil_resolve_ast_node()
3537 rc = cil_resolve_typeattributeset(node, args); in __cil_resolve_ast_node()
3540 rc = cil_resolve_expandtypeattribute(node, args); in __cil_resolve_ast_node()
3543 rc = cil_resolve_bounds(node, args, CIL_TYPE, CIL_TYPEATTRIBUTE); in __cil_resolve_ast_node()
3546 rc = cil_resolve_typepermissive(node, args); in __cil_resolve_ast_node()
3549 rc = cil_resolve_nametypetransition(node, args); in __cil_resolve_ast_node()
3552 rc = cil_resolve_rangetransition(node, args); in __cil_resolve_ast_node()
3555 rc = cil_resolve_classpermissionset(node, (struct cil_classpermissionset*)node->data, args); in __cil_resolve_ast_node()
3558 rc = cil_resolve_classmapping(node, args); in __cil_resolve_ast_node()
3562 rc = cil_resolve_avrule(node, args); in __cil_resolve_ast_node()
3565 rc = cil_resolve_permissionx(node, (struct cil_permissionx*)node->data, args); in __cil_resolve_ast_node()
3568 rc = cil_resolve_type_rule(node, args); in __cil_resolve_ast_node()
3571 rc = cil_resolve_userrole(node, args); in __cil_resolve_ast_node()
3574 rc = cil_resolve_userlevel(node, args); in __cil_resolve_ast_node()
3577 rc = cil_resolve_userrange(node, args); in __cil_resolve_ast_node()
3580 rc = cil_resolve_bounds(node, args, CIL_USER, CIL_USERATTRIBUTE); in __cil_resolve_ast_node()
3583 rc = cil_resolve_userprefix(node, args); in __cil_resolve_ast_node()
3587 rc = cil_resolve_selinuxuser(node, args); in __cil_resolve_ast_node()
3590 rc = cil_resolve_roleattributeset(node, args); in __cil_resolve_ast_node()
3593 rc = cil_resolve_roletype(node, args); in __cil_resolve_ast_node()
3596 rc = cil_resolve_roletransition(node, args); in __cil_resolve_ast_node()
3599 rc = cil_resolve_roleallow(node, args); in __cil_resolve_ast_node()
3602 rc = cil_resolve_bounds(node, args, CIL_ROLE, CIL_ROLEATTRIBUTE); in __cil_resolve_ast_node()
3605 rc = cil_resolve_level(node, (struct cil_level*)node->data, args); in __cil_resolve_ast_node()
3608 rc = cil_resolve_levelrange(node, (struct cil_levelrange*)node->data, args); in __cil_resolve_ast_node()
3611 rc = cil_resolve_constrain(node, args); in __cil_resolve_ast_node()
3614 rc = cil_resolve_constrain(node, args); in __cil_resolve_ast_node()
3618 rc = cil_resolve_validatetrans(node, args); in __cil_resolve_ast_node()
3621 rc = cil_resolve_context(node, (struct cil_context*)node->data, args); in __cil_resolve_ast_node()
3624 rc = cil_resolve_filecon(node, args); in __cil_resolve_ast_node()
3627 rc = cil_resolve_ibpkeycon(node, args); in __cil_resolve_ast_node()
3630 rc = cil_resolve_portcon(node, args); in __cil_resolve_ast_node()
3633 rc = cil_resolve_nodecon(node, args); in __cil_resolve_ast_node()
3636 rc = cil_resolve_genfscon(node, args); in __cil_resolve_ast_node()
3639 rc = cil_resolve_netifcon(node, args); in __cil_resolve_ast_node()
3642 rc = cil_resolve_ibendportcon(node, args); in __cil_resolve_ast_node()
3645 rc = cil_resolve_pirqcon(node, args); in __cil_resolve_ast_node()
3648 rc = cil_resolve_iomemcon(node, args); in __cil_resolve_ast_node()
3651 rc = cil_resolve_ioportcon(node, args); in __cil_resolve_ast_node()
3654 rc = cil_resolve_pcidevicecon(node, args); in __cil_resolve_ast_node()
3657 rc = cil_resolve_devicetreecon(node, args); in __cil_resolve_ast_node()
3660 rc = cil_resolve_fsuse(node, args); in __cil_resolve_ast_node()
3663 rc = cil_resolve_sidcontext(node, args); in __cil_resolve_ast_node()
3668 rc = cil_resolve_default(node, args); in __cil_resolve_ast_node()
3671 rc = cil_resolve_defaultrange(node, args); in __cil_resolve_ast_node()
3674 rc = cil_resolve_userattributeset(node, args); in __cil_resolve_ast_node()
3684 return rc; in __cil_resolve_ast_node()
3687 return rc; in __cil_resolve_ast_node()
3692 int rc = SEPOL_ERR; in __cil_resolve_ast_node_helper() local
3708 rc = SEPOL_ERR; in __cil_resolve_ast_node_helper()
3716 rc = SEPOL_ERR; in __cil_resolve_ast_node_helper()
3727 rc = SEPOL_ERR; in __cil_resolve_ast_node_helper()
3744 rc = SEPOL_ERR; in __cil_resolve_ast_node_helper()
3752 rc = SEPOL_OK; in __cil_resolve_ast_node_helper()
3759 rc = SEPOL_OK; in __cil_resolve_ast_node_helper()
3763 rc = __cil_resolve_ast_node(node, extra_args); in __cil_resolve_ast_node_helper()
3764 if (rc == SEPOL_ENOENT) { in __cil_resolve_ast_node_helper()
3775 rc = SEPOL_OK; in __cil_resolve_ast_node_helper()
3782 return rc; in __cil_resolve_ast_node_helper()
3785 return rc; in __cil_resolve_ast_node_helper()
3790 int rc = SEPOL_ERR; in __cil_resolve_ast_first_child_helper() local
3834 return rc; in __cil_resolve_ast_first_child_helper()
3840 int rc = SEPOL_ERR; in __cil_resolve_ast_last_child_helper() local
3883 return rc; in __cil_resolve_ast_last_child_helper()
3898 int rc = SEPOL_ERR; in cil_resolve_ast() local
3904 return rc; in cil_resolve_ast()
3930 …rc = cil_tree_walk(current, __cil_resolve_ast_node_helper, __cil_resolve_ast_first_child_helper, _… in cil_resolve_ast()
3931 if (rc != SEPOL_OK) { in cil_resolve_ast()
3937 rc = cil_resolve_in_list(&extra_args); in cil_resolve_ast()
3938 if (rc != SEPOL_OK) { in cil_resolve_ast()
3947 rc = SEPOL_ERR; in cil_resolve_ast()
3952 rc = SEPOL_ERR; in cil_resolve_ast()
3957 rc = SEPOL_ERR; in cil_resolve_ast()
3963 rc = SEPOL_ERR; in cil_resolve_ast()
3967 rc = __cil_verify_ordered(current, CIL_SID); in cil_resolve_ast()
3968 if (rc != SEPOL_OK) { in cil_resolve_ast()
3972 rc = __cil_verify_ordered(current, CIL_CLASS); in cil_resolve_ast()
3973 if (rc != SEPOL_OK) { in cil_resolve_ast()
3977 rc = __cil_verify_ordered(current, CIL_CAT); in cil_resolve_ast()
3978 if (rc != SEPOL_OK) { in cil_resolve_ast()
3982 rc = __cil_verify_ordered(current, CIL_SENS); in cil_resolve_ast()
3983 if (rc != SEPOL_OK) { in cil_resolve_ast()
4012 rc = cil_reset_ast(current); in cil_resolve_ast()
4013 if (rc != SEPOL_OK) { in cil_resolve_ast()
4031 rc = __cil_verify_initsids(db->sidorder); in cil_resolve_ast()
4032 if (rc != SEPOL_OK) { in cil_resolve_ast()
4036 rc = SEPOL_OK; in cil_resolve_ast()
4047 return rc; in cil_resolve_ast()
4059 int rc = SEPOL_ERR; in __cil_resolve_name_with_parents() local
4062 while (node != NULL && rc != SEPOL_OK) { in __cil_resolve_name_with_parents()
4069 rc = cil_symtab_get_datum(symtab, name, datum); in __cil_resolve_name_with_parents()
4073 rc = __cil_resolve_name_with_parents(node->parent, name, sym_index, datum); in __cil_resolve_name_with_parents()
4074 if (rc != SEPOL_OK) { in __cil_resolve_name_with_parents()
4076 rc = __cil_resolve_name_with_parents(NODE(inherit->block), name, sym_index, datum); in __cil_resolve_name_with_parents()
4084 rc = cil_symtab_get_datum(symtab, name, datum); in __cil_resolve_name_with_parents()
4089 rc = cil_resolve_name_call_args(call, name, sym_index, datum); in __cil_resolve_name_with_parents()
4090 if (rc != SEPOL_OK) { in __cil_resolve_name_with_parents()
4092 rc = __cil_resolve_name_with_parents(NODE(call->macro)->parent, name, sym_index, datum); in __cil_resolve_name_with_parents()
4108 return rc; in __cil_resolve_name_with_parents()
4113 int rc = SEPOL_ERR; in __cil_resolve_name_helper() local
4115 rc = __cil_resolve_name_with_parents(node, name, sym_index, datum); in __cil_resolve_name_helper()
4116 if (rc != SEPOL_OK) { in __cil_resolve_name_helper()
4117 rc = __cil_resolve_name_with_root(db, name, sym_index, datum); in __cil_resolve_name_helper()
4119 return rc; in __cil_resolve_name_helper()
4124 int rc = SEPOL_ERR; in cil_resolve_name() local
4127 rc = cil_resolve_name_keep_aliases(ast_node, name, sym_index, extra_args, datum); in cil_resolve_name()
4128 if (rc != SEPOL_OK) { in cil_resolve_name()
4144 rc = SEPOL_OK; in cil_resolve_name()
4147 return rc; in cil_resolve_name()
4152 int rc = SEPOL_ERR; in cil_resolve_name_keep_aliases() local
4166 rc = __cil_resolve_name_helper(db, ast_node->parent, name, sym_index, datum); in cil_resolve_name_keep_aliases()
4167 if (rc != SEPOL_OK) { in cil_resolve_name_keep_aliases()
4189 rc = __cil_resolve_name_helper(db, node->parent, current, CIL_SYM_BLOCKS, datum); in cil_resolve_name_keep_aliases()
4190 if (rc != SEPOL_OK) { in cil_resolve_name_keep_aliases()
4198 rc = cil_symtab_get_datum(symtab, current, datum); in cil_resolve_name_keep_aliases()
4199 if (rc != SEPOL_OK) { in cil_resolve_name_keep_aliases()
4210 rc = SEPOL_ERR; in cil_resolve_name_keep_aliases()
4225 rc = cil_symtab_get_datum(symtab, current, datum); in cil_resolve_name_keep_aliases()
4227 if (rc != SEPOL_OK) { in cil_resolve_name_keep_aliases()
4232 rc = SEPOL_OK; in cil_resolve_name_keep_aliases()
4235 if (rc != SEPOL_OK) { in cil_resolve_name_keep_aliases()
4241 return rc; in cil_resolve_name_keep_aliases()