Lines Matching refs:rc
109 int rc = SEPOL_ERR; in __cil_resolve_perms() local
117 rc = __cil_resolve_perms(class_symtab, common_symtab, curr->data, &sub_list); in __cil_resolve_perms()
118 if (rc != SEPOL_OK) { in __cil_resolve_perms()
125 rc = cil_symtab_get_datum(class_symtab, curr->data, &perm_datum); in __cil_resolve_perms()
126 if (rc == SEPOL_ENOENT) { in __cil_resolve_perms()
128 rc = cil_symtab_get_datum(common_symtab, curr->data, &perm_datum); in __cil_resolve_perms()
131 if (rc != SEPOL_OK) { in __cil_resolve_perms()
144 return rc; in __cil_resolve_perms()
149 int rc = SEPOL_ERR; in cil_resolve_classperms() local
154 rc = cil_resolve_name(current, cp->class_str, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_classperms()
155 if (rc != SEPOL_OK) { in cil_resolve_classperms()
167 rc = __cil_resolve_perms(&class->perms, common_symtab, cp->perm_strs, &cp->perms); in cil_resolve_classperms()
168 if (rc != SEPOL_OK) { in cil_resolve_classperms()
175 return rc; in cil_resolve_classperms()
180 int rc = SEPOL_ERR; in cil_resolve_classperms_set() local
183 rc = cil_resolve_name(current, cp_set->set_str, CIL_SYM_CLASSPERMSETS, extra_args, &datum); in cil_resolve_classperms_set()
184 if (rc != SEPOL_OK) { in cil_resolve_classperms_set()
191 rc = cil_resolve_classperms_list(current, cp_set->set->classperms, extra_args); in cil_resolve_classperms_set()
192 if (rc != SEPOL_OK) { in cil_resolve_classperms_set()
200 return rc; in cil_resolve_classperms_set()
205 int rc = SEPOL_ERR; in cil_resolve_classperms_list() local
210 rc = cil_resolve_classperms(current, curr->data, extra_args); in cil_resolve_classperms_list()
211 if (rc != SEPOL_OK) { in cil_resolve_classperms_list()
215 rc = cil_resolve_classperms_set(current, curr->data, extra_args); in cil_resolve_classperms_list()
216 if (rc != SEPOL_OK) { in cil_resolve_classperms_list()
225 return rc; in cil_resolve_classperms_list()
230 int rc = SEPOL_ERR; in cil_resolve_classpermissionset() local
236 rc = cil_resolve_name(current, cps->set_str, CIL_SYM_CLASSPERMSETS, args, &datum); in cil_resolve_classpermissionset()
237 if (rc != SEPOL_OK) { in cil_resolve_classpermissionset()
241 rc = cil_resolve_classperms_list(current, cps->classperms, extra_args); in cil_resolve_classpermissionset()
242 if (rc != SEPOL_OK) { in cil_resolve_classpermissionset()
259 return rc; in cil_resolve_classpermissionset()
282 int rc = SEPOL_ERR; in cil_resolve_avrule() local
288 rc = cil_resolve_name(current, rule->src_str, CIL_SYM_TYPES, args, &src_datum); in cil_resolve_avrule()
289 if (rc != SEPOL_OK) { in cil_resolve_avrule()
300 rc = cil_resolve_name(current, rule->tgt_str, CIL_SYM_TYPES, args, &tgt_datum); in cil_resolve_avrule()
301 if (rc != SEPOL_OK) { in cil_resolve_avrule()
310 rc = cil_resolve_classperms_list(current, rule->classperms, extra_args); in cil_resolve_avrule()
311 if (rc != SEPOL_OK) { in cil_resolve_avrule()
318 return rc; in cil_resolve_avrule()
329 int rc = SEPOL_ERR; in cil_resolve_type_rule() local
331 rc = cil_resolve_name(current, rule->src_str, CIL_SYM_TYPES, extra_args, &src_datum); in cil_resolve_type_rule()
332 if (rc != SEPOL_OK) { in cil_resolve_type_rule()
338 rc = cil_resolve_name(current, rule->tgt_str, CIL_SYM_TYPES, extra_args, &tgt_datum); in cil_resolve_type_rule()
339 if (rc != SEPOL_OK) { in cil_resolve_type_rule()
345 rc = cil_resolve_name(current, rule->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_type_rule()
346 if (rc != SEPOL_OK) { in cil_resolve_type_rule()
351 rc = cil_resolve_name(current, rule->result_str, CIL_SYM_TYPES, extra_args, &result_datum); in cil_resolve_type_rule()
352 if (rc != SEPOL_OK) { in cil_resolve_type_rule()
360 rc = SEPOL_ERR; in cil_resolve_type_rule()
368 return rc; in cil_resolve_type_rule()
377 int rc = SEPOL_ERR; in cil_resolve_typeattributeset() local
379 rc = cil_resolve_name(current, attrtypes->attr_str, CIL_SYM_TYPES, extra_args, &attr_datum); in cil_resolve_typeattributeset()
380 if (rc != SEPOL_OK) { in cil_resolve_typeattributeset()
387 rc = SEPOL_ERR; in cil_resolve_typeattributeset()
394 …rc = cil_resolve_expr(CIL_TYPEATTRIBUTESET, attrtypes->str_expr, &attrtypes->datum_expr, current, … in cil_resolve_typeattributeset()
395 if (rc != SEPOL_OK) { in cil_resolve_typeattributeset()
399 rc = cil_verify_no_self_reference(attr_datum, attrtypes->datum_expr); in cil_resolve_typeattributeset()
400 if (rc != SEPOL_OK) { in cil_resolve_typeattributeset()
413 return rc; in cil_resolve_typeattributeset()
418 int rc = SEPOL_ERR; in cil_resolve_aliasactual() local
425 rc = cil_flavor_to_symtab_index(flavor, &sym_index); in cil_resolve_aliasactual()
426 if (rc != SEPOL_OK) { in cil_resolve_aliasactual()
429 rc = cil_resolve_name(current, aliasactual->alias_str, sym_index, extra_args, &alias_datum); in cil_resolve_aliasactual()
430 if (rc != SEPOL_OK) { in cil_resolve_aliasactual()
434 rc = cil_resolve_name(current, aliasactual->actual_str, sym_index, extra_args, &actual_datum); in cil_resolve_aliasactual()
435 if (rc != SEPOL_OK) { in cil_resolve_aliasactual()
443 rc = SEPOL_ERR; in cil_resolve_aliasactual()
452 return rc; in cil_resolve_aliasactual()
504 int rc = SEPOL_ERR; in cil_resolve_typepermissive() local
506 rc = cil_resolve_name(current, typeperm->type_str, CIL_SYM_TYPES, extra_args, &type_datum); in cil_resolve_typepermissive()
507 if (rc != SEPOL_OK) { in cil_resolve_typepermissive()
515 rc = SEPOL_ERR; in cil_resolve_typepermissive()
524 return rc; in cil_resolve_typepermissive()
537 int rc = SEPOL_ERR; in cil_resolve_nametypetransition() local
539 rc = cil_resolve_name(current, nametypetrans->src_str, CIL_SYM_TYPES, extra_args, &src_datum); in cil_resolve_nametypetransition()
540 if (rc != SEPOL_OK) { in cil_resolve_nametypetransition()
546 rc = cil_resolve_name(current, nametypetrans->tgt_str, CIL_SYM_TYPES, extra_args, &tgt_datum); in cil_resolve_nametypetransition()
547 if (rc != SEPOL_OK) { in cil_resolve_nametypetransition()
553 rc = cil_resolve_name(current, nametypetrans->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_nametypetransition()
554 if (rc != SEPOL_OK) { in cil_resolve_nametypetransition()
561 rc = cil_resolve_name(current, nametypetrans->name_str, CIL_SYM_NAMES, extra_args, &name_datum); in cil_resolve_nametypetransition()
562 if (rc != SEPOL_OK) { in cil_resolve_nametypetransition()
568 …rc = cil_resolve_name(current, nametypetrans->result_str, CIL_SYM_TYPES, extra_args, &result_datum… in cil_resolve_nametypetransition()
569 if (rc != SEPOL_OK) { in cil_resolve_nametypetransition()
577 rc = SEPOL_ERR; in cil_resolve_nametypetransition()
585 return rc; in cil_resolve_nametypetransition()
595 int rc = SEPOL_ERR; in cil_resolve_rangetransition() local
597 rc = cil_resolve_name(current, rangetrans->src_str, CIL_SYM_TYPES, extra_args, &src_datum); in cil_resolve_rangetransition()
598 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
604 rc = cil_resolve_name(current, rangetrans->exec_str, CIL_SYM_TYPES, extra_args, &exec_datum); in cil_resolve_rangetransition()
605 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
611 rc = cil_resolve_name(current, rangetrans->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_rangetransition()
612 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
618 …rc = cil_resolve_name(current, rangetrans->range_str, CIL_SYM_LEVELRANGES, extra_args, &range_datu… in cil_resolve_rangetransition()
619 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
626 rc = cil_resolve_levelrange(current, rangetrans->range, extra_args); in cil_resolve_rangetransition()
627 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
632 rc = cil_resolve_levelrange(current, rangetrans->range, extra_args); in cil_resolve_rangetransition()
633 if (rc != SEPOL_OK) { in cil_resolve_rangetransition()
641 return rc; in cil_resolve_rangetransition()
660 int rc = SEPOL_ERR; in cil_resolve_classcommon() local
662 rc = cil_resolve_name(current, clscom->class_str, CIL_SYM_CLASSES, extra_args, &class_datum); in cil_resolve_classcommon()
663 if (rc != SEPOL_OK) { in cil_resolve_classcommon()
667 rc = cil_resolve_name(current, clscom->common_str, CIL_SYM_COMMONS, extra_args, &common_datum); in cil_resolve_classcommon()
668 if (rc != SEPOL_OK) { in cil_resolve_classcommon()
676 rc = SEPOL_ERR; in cil_resolve_classcommon()
689 return rc; in cil_resolve_classcommon()
694 int rc = SEPOL_ERR; in cil_resolve_classmapping() local
701 rc = cil_resolve_name(current, mapping->map_class_str, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_classmapping()
702 if (rc != SEPOL_OK) { in cil_resolve_classmapping()
707 rc = cil_symtab_get_datum(&map->perms, mapping->map_perm_str, &datum); in cil_resolve_classmapping()
708 if (rc != SEPOL_OK) { in cil_resolve_classmapping()
714 rc = cil_resolve_classperms_list(current, mapping->classperms, extra_args); in cil_resolve_classmapping()
715 if (rc != SEPOL_OK) { in cil_resolve_classmapping()
730 return rc; in cil_resolve_classmapping()
738 int rc = SEPOL_ERR; in cil_resolve_userrole() local
740 rc = cil_resolve_name(current, userrole->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_userrole()
741 if (rc != SEPOL_OK) { in cil_resolve_userrole()
746 rc = cil_resolve_name(current, userrole->role_str, CIL_SYM_ROLES, extra_args, &role_datum); in cil_resolve_userrole()
747 if (rc != SEPOL_OK) { in cil_resolve_userrole()
761 return rc; in cil_resolve_userrole()
770 int rc = SEPOL_ERR; in cil_resolve_userlevel() local
772 rc = cil_resolve_name(current, usrlvl->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_userlevel()
773 if (rc != SEPOL_OK) { in cil_resolve_userlevel()
779 rc = cil_resolve_name(current, usrlvl->level_str, CIL_SYM_LEVELS, extra_args, &lvl_datum); in cil_resolve_userlevel()
780 if (rc != SEPOL_OK) { in cil_resolve_userlevel()
788 rc = cil_resolve_level(current, user->dftlevel, extra_args); in cil_resolve_userlevel()
789 if (rc != SEPOL_OK) { in cil_resolve_userlevel()
794 rc = cil_resolve_level(current, usrlvl->level, extra_args); in cil_resolve_userlevel()
795 if (rc != SEPOL_OK) { in cil_resolve_userlevel()
804 return rc; in cil_resolve_userlevel()
813 int rc = SEPOL_ERR; in cil_resolve_userrange() local
815 rc = cil_resolve_name(current, userrange->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_userrange()
816 if (rc != SEPOL_OK) { in cil_resolve_userrange()
822 …rc = cil_resolve_name(current, userrange->range_str, CIL_SYM_LEVELRANGES, extra_args, &range_datum… in cil_resolve_userrange()
823 if (rc != SEPOL_OK) { in cil_resolve_userrange()
831 rc = cil_resolve_levelrange(current, user->range, extra_args); in cil_resolve_userrange()
832 if (rc != SEPOL_OK) { in cil_resolve_userrange()
837 rc = cil_resolve_levelrange(current, userrange->range, extra_args); in cil_resolve_userrange()
838 if (rc != SEPOL_OK) { in cil_resolve_userrange()
847 return rc; in cil_resolve_userrange()
854 int rc = SEPOL_ERR; in cil_resolve_userprefix() local
856 rc = cil_resolve_name(current, userprefix->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_userprefix()
857 if (rc != SEPOL_OK) { in cil_resolve_userprefix()
863 return rc; in cil_resolve_userprefix()
871 int rc = SEPOL_ERR; in cil_resolve_selinuxuser() local
873 rc = cil_resolve_name(current, selinuxuser->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_selinuxuser()
874 if (rc != SEPOL_OK) { in cil_resolve_selinuxuser()
880 …rc = cil_resolve_name(current, selinuxuser->range_str, CIL_SYM_LEVELRANGES, extra_args, &lvlrange_… in cil_resolve_selinuxuser()
881 if (rc != SEPOL_OK) { in cil_resolve_selinuxuser()
889 rc = cil_resolve_levelrange(current, selinuxuser->range, extra_args); in cil_resolve_selinuxuser()
890 if (rc != SEPOL_OK) { in cil_resolve_selinuxuser()
895 rc = cil_resolve_levelrange(current, selinuxuser->range, extra_args); in cil_resolve_selinuxuser()
896 if (rc != SEPOL_OK) { in cil_resolve_selinuxuser()
901 rc = SEPOL_OK; in cil_resolve_selinuxuser()
903 return rc; in cil_resolve_selinuxuser()
911 int rc = SEPOL_ERR; in cil_resolve_roletype() local
913 rc = cil_resolve_name(current, roletype->role_str, CIL_SYM_ROLES, extra_args, &role_datum); in cil_resolve_roletype()
914 if (rc != SEPOL_OK) { in cil_resolve_roletype()
919 rc = cil_resolve_name(current, roletype->type_str, CIL_SYM_TYPES, extra_args, &type_datum); in cil_resolve_roletype()
920 if (rc != SEPOL_OK) { in cil_resolve_roletype()
929 return rc; in cil_resolve_roletype()
940 int rc = SEPOL_ERR; in cil_resolve_roletransition() local
942 rc = cil_resolve_name(current, roletrans->src_str, CIL_SYM_ROLES, extra_args, &src_datum); in cil_resolve_roletransition()
943 if (rc != SEPOL_OK) { in cil_resolve_roletransition()
948 rc = cil_resolve_name(current, roletrans->tgt_str, CIL_SYM_TYPES, extra_args, &tgt_datum); in cil_resolve_roletransition()
949 if (rc != SEPOL_OK) { in cil_resolve_roletransition()
955 rc = cil_resolve_name(current, roletrans->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_roletransition()
956 if (rc != SEPOL_OK) { in cil_resolve_roletransition()
961 rc = cil_resolve_name(current, roletrans->result_str, CIL_SYM_ROLES, extra_args, &result_datum); in cil_resolve_roletransition()
962 if (rc != SEPOL_OK) { in cil_resolve_roletransition()
967 rc = SEPOL_ERR; in cil_resolve_roletransition()
977 return rc; in cil_resolve_roletransition()
985 int rc = SEPOL_ERR; in cil_resolve_roleallow() local
987 rc = cil_resolve_name(current, roleallow->src_str, CIL_SYM_ROLES, extra_args, &src_datum); in cil_resolve_roleallow()
988 if (rc != SEPOL_OK) { in cil_resolve_roleallow()
993 rc = cil_resolve_name(current, roleallow->tgt_str, CIL_SYM_ROLES, extra_args, &tgt_datum); in cil_resolve_roleallow()
994 if (rc != SEPOL_OK) { in cil_resolve_roleallow()
1002 return rc; in cil_resolve_roleallow()
1007 int rc = SEPOL_ERR; in cil_resolve_roleattributeset() local
1013 rc = cil_resolve_name(current, attrroles->attr_str, CIL_SYM_ROLES, extra_args, &attr_datum); in cil_resolve_roleattributeset()
1014 if (rc != SEPOL_OK) { in cil_resolve_roleattributeset()
1020 rc = SEPOL_ERR; in cil_resolve_roleattributeset()
1026 …rc = cil_resolve_expr(CIL_ROLEATTRIBUTESET, attrroles->str_expr, &attrroles->datum_expr, current, … in cil_resolve_roleattributeset()
1027 if (rc != SEPOL_OK) { in cil_resolve_roleattributeset()
1031 rc = cil_verify_no_self_reference(attr_datum, attrroles->datum_expr); in cil_resolve_roleattributeset()
1032 if (rc != SEPOL_OK) { in cil_resolve_roleattributeset()
1045 return rc; in cil_resolve_roleattributeset()
1165 int rc = SEPOL_ERR; in __cil_ordered_lists_merge() local
1173 rc = __cil_ordered_list_insert(old, NULL, nfirst, NULL); in __cil_ordered_lists_merge()
1174 return rc; in __cil_ordered_lists_merge()
1197 rc = __cil_ordered_list_insert(old, NULL, nfirst, nmatch); in __cil_ordered_lists_merge()
1198 if (rc != SEPOL_OK) { in __cil_ordered_lists_merge()
1199 return rc; in __cil_ordered_lists_merge()
1216 rc = __cil_ordered_list_insert(old, oprev, ncurr, nmatch); in __cil_ordered_lists_merge()
1217 if (rc != SEPOL_OK) { in __cil_ordered_lists_merge()
1218 return rc; in __cil_ordered_lists_merge()
1241 rc = __cil_ordered_list_insert(old, old->tail, ncurr, NULL); in __cil_ordered_lists_merge()
1242 if (rc != SEPOL_OK) { in __cil_ordered_lists_merge()
1243 return rc; in __cil_ordered_lists_merge()
1256 int rc = SEPOL_ERR; in __cil_ordered_lists_merge_all() local
1266 rc = __cil_ordered_lists_merge(composite, ordered_list->list); in __cil_ordered_lists_merge_all()
1267 if (rc != SEPOL_OK) { in __cil_ordered_lists_merge_all()
1305 int rc = SEPOL_ERR; in cil_resolve_classorder() local
1310 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_classorder()
1311 if (rc != SEPOL_OK) { in cil_resolve_classorder()
1326 return rc; in cil_resolve_classorder()
1338 int rc = SEPOL_ERR; in cil_resolve_sidorder() local
1343 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_SIDS, extra_args, &datum); in cil_resolve_sidorder()
1344 if (rc != SEPOL_OK) { in cil_resolve_sidorder()
1359 return rc; in cil_resolve_sidorder()
1386 int rc = SEPOL_ERR; in cil_resolve_catorder() local
1392 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_CATS, extra_args, &cat_datum); in cil_resolve_catorder()
1393 if (rc != SEPOL_OK) { in cil_resolve_catorder()
1400 rc = SEPOL_ERR; in cil_resolve_catorder()
1415 return rc; in cil_resolve_catorder()
1427 int rc = SEPOL_ERR; in cil_resolve_sensitivityorder() local
1432 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_SENS, extra_args, &datum); in cil_resolve_sensitivityorder()
1433 if (rc != SEPOL_OK) { in cil_resolve_sensitivityorder()
1448 return rc; in cil_resolve_sensitivityorder()
1453 int rc = SEPOL_ERR; in cil_resolve_cats() local
1455 rc = cil_resolve_expr(CIL_CATSET, cats->str_expr, &cats->datum_expr, current, extra_args); in cil_resolve_cats()
1456 if (rc != SEPOL_OK) { in cil_resolve_cats()
1464 return rc; in cil_resolve_cats()
1470 int rc = SEPOL_ERR; in cil_resolve_catset() local
1472 rc = cil_resolve_cats(current, catset->cats, extra_args); in cil_resolve_catset()
1473 if (rc != SEPOL_OK) { in cil_resolve_catset()
1477 rc = cil_verify_no_self_reference((struct cil_symtab_datum *)catset, catset->cats->datum_expr); in cil_resolve_catset()
1478 if (rc != SEPOL_OK) { in cil_resolve_catset()
1484 return rc; in cil_resolve_catset()
1489 int rc = SEPOL_ERR; in cil_resolve_senscat() local
1494 rc = cil_resolve_name(current, (char*)senscat->sens_str, CIL_SYM_SENS, extra_args, &sens_datum); in cil_resolve_senscat()
1495 if (rc != SEPOL_OK) { in cil_resolve_senscat()
1500 rc = cil_resolve_cats(current, senscat->cats, extra_args); in cil_resolve_senscat()
1501 if (rc != SEPOL_OK) { in cil_resolve_senscat()
1516 return rc; in cil_resolve_senscat()
1522 int rc = SEPOL_ERR; in cil_resolve_level() local
1524 rc = cil_resolve_name(current, (char*)level->sens_str, CIL_SYM_SENS, extra_args, &sens_datum); in cil_resolve_level()
1525 if (rc != SEPOL_OK) { in cil_resolve_level()
1533 rc = cil_resolve_cats(current, level->cats, extra_args); in cil_resolve_level()
1534 if (rc != SEPOL_OK) { in cil_resolve_level()
1542 return rc; in cil_resolve_level()
1549 int rc = SEPOL_ERR; in cil_resolve_levelrange() local
1552 rc = cil_resolve_name(current, lvlrange->low_str, CIL_SYM_LEVELS, extra_args, &low_datum); in cil_resolve_levelrange()
1553 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1560 rc = cil_resolve_level(current, lvlrange->low, extra_args); in cil_resolve_levelrange()
1561 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1566 rc = cil_resolve_level(current, lvlrange->low, extra_args); in cil_resolve_levelrange()
1567 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1573 rc = cil_resolve_name(current, lvlrange->high_str, CIL_SYM_LEVELS, extra_args, &high_datum); in cil_resolve_levelrange()
1574 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1581 rc = cil_resolve_level(current, lvlrange->high, extra_args); in cil_resolve_levelrange()
1582 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1587 rc = cil_resolve_level(current, lvlrange->high, extra_args); in cil_resolve_levelrange()
1588 if (rc != SEPOL_OK) { in cil_resolve_levelrange()
1596 return rc; in cil_resolve_levelrange()
1602 int rc = SEPOL_ERR; in cil_resolve_constrain() local
1604 rc = cil_resolve_classperms_list(current, cons->classperms, extra_args); in cil_resolve_constrain()
1605 if (rc != SEPOL_OK) { in cil_resolve_constrain()
1609 rc = cil_resolve_expr(CIL_CONSTRAIN, cons->str_expr, &cons->datum_expr, current, extra_args); in cil_resolve_constrain()
1610 if (rc != SEPOL_OK) { in cil_resolve_constrain()
1617 return rc; in cil_resolve_constrain()
1625 int rc = SEPOL_ERR; in cil_resolve_validatetrans() local
1627 rc = cil_resolve_name(current, validtrans->class_str, CIL_SYM_CLASSES, args, &class_datum); in cil_resolve_validatetrans()
1628 if (rc != SEPOL_OK) { in cil_resolve_validatetrans()
1633 …rc = cil_resolve_expr(CIL_VALIDATETRANS, validtrans->str_expr, &validtrans->datum_expr, current, e… in cil_resolve_validatetrans()
1634 if (rc != SEPOL_OK) { in cil_resolve_validatetrans()
1641 return rc; in cil_resolve_validatetrans()
1652 int rc = SEPOL_ERR; in cil_resolve_context() local
1654 rc = cil_resolve_name(current, context->user_str, CIL_SYM_USERS, extra_args, &user_datum); in cil_resolve_context()
1655 if (rc != SEPOL_OK) { in cil_resolve_context()
1661 rc = cil_resolve_name(current, context->role_str, CIL_SYM_ROLES, extra_args, &role_datum); in cil_resolve_context()
1662 if (rc != SEPOL_OK) { in cil_resolve_context()
1668 rc = cil_resolve_name(current, context->type_str, CIL_SYM_TYPES, extra_args, &type_datum); in cil_resolve_context()
1669 if (rc != SEPOL_OK) { in cil_resolve_context()
1677 rc = SEPOL_ERR; in cil_resolve_context()
1684 …rc = cil_resolve_name(current, context->range_str, CIL_SYM_LEVELRANGES, extra_args, &lvlrange_datu… in cil_resolve_context()
1685 if (rc != SEPOL_OK) { in cil_resolve_context()
1693 rc = cil_resolve_levelrange(current, context->range, extra_args); in cil_resolve_context()
1694 if (rc != SEPOL_OK) { in cil_resolve_context()
1699 rc = cil_resolve_levelrange(current, context->range, extra_args); in cil_resolve_context()
1700 if (rc != SEPOL_OK) { in cil_resolve_context()
1708 return rc; in cil_resolve_context()
1715 int rc = SEPOL_ERR; in cil_resolve_filecon() local
1718 …rc = cil_resolve_name(current, filecon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_filecon()
1719 if (rc != SEPOL_OK) { in cil_resolve_filecon()
1720 return rc; in cil_resolve_filecon()
1724 rc = cil_resolve_context(current, filecon->context, extra_args); in cil_resolve_filecon()
1725 if (rc != SEPOL_OK) { in cil_resolve_filecon()
1726 return rc; in cil_resolve_filecon()
1737 int rc = SEPOL_ERR; in cil_resolve_portcon() local
1740 …rc = cil_resolve_name(current, portcon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_portcon()
1741 if (rc != SEPOL_OK) { in cil_resolve_portcon()
1746 rc = cil_resolve_context(current, portcon->context, extra_args); in cil_resolve_portcon()
1747 if (rc != SEPOL_OK) { in cil_resolve_portcon()
1755 return rc; in cil_resolve_portcon()
1762 int rc = SEPOL_ERR; in cil_resolve_genfscon() local
1765 …rc = cil_resolve_name(current, genfscon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum… in cil_resolve_genfscon()
1766 if (rc != SEPOL_OK) { in cil_resolve_genfscon()
1771 rc = cil_resolve_context(current, genfscon->context, extra_args); in cil_resolve_genfscon()
1772 if (rc != SEPOL_OK) { in cil_resolve_genfscon()
1780 return rc; in cil_resolve_genfscon()
1789 int rc = SEPOL_ERR; in cil_resolve_nodecon() local
1792 rc = cil_resolve_name(current, nodecon->addr_str, CIL_SYM_IPADDRS, extra_args, &addr_datum); in cil_resolve_nodecon()
1793 if (rc != SEPOL_OK) { in cil_resolve_nodecon()
1800 rc = cil_resolve_name(current, nodecon->mask_str, CIL_SYM_IPADDRS, extra_args, &mask_datum); in cil_resolve_nodecon()
1801 if (rc != SEPOL_OK) { in cil_resolve_nodecon()
1808 …rc = cil_resolve_name(current, nodecon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_nodecon()
1809 if (rc != SEPOL_OK) { in cil_resolve_nodecon()
1814 rc = cil_resolve_context(current, nodecon->context, extra_args); in cil_resolve_nodecon()
1815 if (rc != SEPOL_OK) { in cil_resolve_nodecon()
1822 rc = SEPOL_ERR; in cil_resolve_nodecon()
1830 return rc; in cil_resolve_nodecon()
1839 int rc = SEPOL_ERR; in cil_resolve_netifcon() local
1842 …rc = cil_resolve_name(current, netifcon->if_context_str, CIL_SYM_CONTEXTS, extra_args, &ifcon_datu… in cil_resolve_netifcon()
1843 if (rc != SEPOL_OK) { in cil_resolve_netifcon()
1848 rc = cil_resolve_context(current, netifcon->if_context, extra_args); in cil_resolve_netifcon()
1849 if (rc != SEPOL_OK) { in cil_resolve_netifcon()
1855 …rc = cil_resolve_name(current, netifcon->packet_context_str, CIL_SYM_CONTEXTS, extra_args, &packco… in cil_resolve_netifcon()
1856 if (rc != SEPOL_OK) { in cil_resolve_netifcon()
1861 rc = cil_resolve_context(current, netifcon->packet_context, extra_args); in cil_resolve_netifcon()
1862 if (rc != SEPOL_OK) { in cil_resolve_netifcon()
1869 return rc; in cil_resolve_netifcon()
1876 int rc = SEPOL_ERR; in cil_resolve_pirqcon() local
1879 …rc = cil_resolve_name(current, pirqcon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_pirqcon()
1880 if (rc != SEPOL_OK) { in cil_resolve_pirqcon()
1885 rc = cil_resolve_context(current, pirqcon->context, extra_args); in cil_resolve_pirqcon()
1886 if (rc != SEPOL_OK) { in cil_resolve_pirqcon()
1894 return rc; in cil_resolve_pirqcon()
1901 int rc = SEPOL_ERR; in cil_resolve_iomemcon() local
1904 …rc = cil_resolve_name(current, iomemcon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum… in cil_resolve_iomemcon()
1905 if (rc != SEPOL_OK) { in cil_resolve_iomemcon()
1910 rc = cil_resolve_context(current, iomemcon->context, extra_args); in cil_resolve_iomemcon()
1911 if (rc != SEPOL_OK) { in cil_resolve_iomemcon()
1919 return rc; in cil_resolve_iomemcon()
1926 int rc = SEPOL_ERR; in cil_resolve_ioportcon() local
1929 …rc = cil_resolve_name(current, ioportcon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datu… in cil_resolve_ioportcon()
1930 if (rc != SEPOL_OK) { in cil_resolve_ioportcon()
1935 rc = cil_resolve_context(current, ioportcon->context, extra_args); in cil_resolve_ioportcon()
1936 if (rc != SEPOL_OK) { in cil_resolve_ioportcon()
1944 return rc; in cil_resolve_ioportcon()
1951 int rc = SEPOL_ERR; in cil_resolve_pcidevicecon() local
1954 …rc = cil_resolve_name(current, pcidevicecon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_d… in cil_resolve_pcidevicecon()
1955 if (rc != SEPOL_OK) { in cil_resolve_pcidevicecon()
1960 rc = cil_resolve_context(current, pcidevicecon->context, extra_args); in cil_resolve_pcidevicecon()
1961 if (rc != SEPOL_OK) { in cil_resolve_pcidevicecon()
1969 return rc; in cil_resolve_pcidevicecon()
1976 int rc = SEPOL_ERR; in cil_resolve_devicetreecon() local
1979 …rc = cil_resolve_name(current, devicetreecon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_… in cil_resolve_devicetreecon()
1980 if (rc != SEPOL_OK) { in cil_resolve_devicetreecon()
1985 rc = cil_resolve_context(current, devicetreecon->context, extra_args); in cil_resolve_devicetreecon()
1986 if (rc != SEPOL_OK) { in cil_resolve_devicetreecon()
1994 return rc; in cil_resolve_devicetreecon()
2001 int rc = SEPOL_ERR; in cil_resolve_fsuse() local
2004 rc = cil_resolve_name(current, fsuse->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_fsuse()
2005 if (rc != SEPOL_OK) { in cil_resolve_fsuse()
2010 rc = cil_resolve_context(current, fsuse->context, extra_args); in cil_resolve_fsuse()
2011 if (rc != SEPOL_OK) { in cil_resolve_fsuse()
2019 return rc; in cil_resolve_fsuse()
2029 int rc = SEPOL_ERR; in cil_resolve_sidcontext() local
2031 rc = cil_resolve_name(current, sidcon->sid_str, CIL_SYM_SIDS, extra_args, &sid_datum); in cil_resolve_sidcontext()
2032 if (rc != SEPOL_OK) { in cil_resolve_sidcontext()
2038 rc = cil_resolve_name(current, sidcon->context_str, CIL_SYM_CONTEXTS, extra_args, &context_datum); in cil_resolve_sidcontext()
2039 if (rc != SEPOL_OK) { in cil_resolve_sidcontext()
2044 rc = cil_resolve_context(current, sidcon->context, extra_args); in cil_resolve_sidcontext()
2045 if (rc != SEPOL_OK) { in cil_resolve_sidcontext()
2052 rc = SEPOL_ERR; in cil_resolve_sidcontext()
2061 return rc; in cil_resolve_sidcontext()
2069 int rc = SEPOL_ERR; in cil_resolve_blockinherit_link() local
2071 rc = cil_resolve_name(current, inherit->block_str, CIL_SYM_BLOCKS, extra_args, &block_datum); in cil_resolve_blockinherit_link()
2072 if (rc != SEPOL_OK) { in cil_resolve_blockinherit_link()
2080 rc = SEPOL_ERR; in cil_resolve_blockinherit_link()
2094 return rc; in cil_resolve_blockinherit_link()
2103 int rc = SEPOL_ERR; in cil_resolve_blockinherit_copy() local
2107 rc = SEPOL_OK; in cil_resolve_blockinherit_copy()
2115 rc = SEPOL_OK; in cil_resolve_blockinherit_copy()
2120 rc = cil_copy_ast(db, current, item->data); in cil_resolve_blockinherit_copy()
2121 if (rc != SEPOL_OK) { in cil_resolve_blockinherit_copy()
2130 return rc; in cil_resolve_blockinherit_copy()
2138 int rc = SEPOL_ERR; in cil_resolve_blockabstract() local
2140 rc = cil_resolve_name(current, abstract->block_str, CIL_SYM_BLOCKS, extra_args, &block_datum); in cil_resolve_blockabstract()
2141 if (rc != SEPOL_OK) { in cil_resolve_blockabstract()
2147 cil_log(CIL_ERR, "Failed to resolve blockabstract to a block, rc: %d\n", rc); in cil_resolve_blockabstract()
2156 return rc; in cil_resolve_blockabstract()
2166 int rc = SEPOL_ERR; in cil_resolve_in() local
2172 rc = cil_resolve_name(current, in->block_str, CIL_SYM_BLOCKS, extra_args, &block_datum); in cil_resolve_in()
2173 if (rc != SEPOL_OK) { in cil_resolve_in()
2179 rc = cil_copy_ast(db, current, block_node); in cil_resolve_in()
2180 if (rc != SEPOL_OK) { in cil_resolve_in()
2181 printf("Failed to copy in, rc: %d\n", rc); in cil_resolve_in()
2192 return rc; in cil_resolve_in()
2206 int rc = SEPOL_ERR; in cil_resolve_in_list() local
2220 rc = cil_resolve_name(node, in->block_str, CIL_SYM_BLOCKS, extra_args, &block_datum); in cil_resolve_in_list()
2221 if (rc != SEPOL_OK) { in cil_resolve_in_list()
2225 rc = cil_resolve_in(node, extra_args); in cil_resolve_in_list()
2226 if (rc != SEPOL_OK) { in cil_resolve_in_list()
2238 rc = SEPOL_ERR; in cil_resolve_in_list()
2244 rc = SEPOL_OK; in cil_resolve_in_list()
2247 return rc; in cil_resolve_in_list()
2253 int rc = SEPOL_ERR; in cil_resolve_bounds() local
2259 rc = cil_flavor_to_symtab_index(flavor, &index); in cil_resolve_bounds()
2260 if (rc != SEPOL_OK) { in cil_resolve_bounds()
2264 rc = cil_resolve_name(current, bounds->parent_str, index, extra_args, &parent_datum); in cil_resolve_bounds()
2265 if (rc != SEPOL_OK) { in cil_resolve_bounds()
2269 rc = cil_resolve_name(current, bounds->child_str, index, extra_args, &child_datum); in cil_resolve_bounds()
2270 if (rc != SEPOL_OK) { in cil_resolve_bounds()
2281 rc = SEPOL_ERR; in cil_resolve_bounds()
2294 rc = SEPOL_ERR; in cil_resolve_bounds()
2309 rc = SEPOL_ERR; in cil_resolve_bounds()
2316 rc = SEPOL_ERR; in cil_resolve_bounds()
2323 rc = SEPOL_ERR; in cil_resolve_bounds()
2338 return rc; in cil_resolve_bounds()
2343 int rc = SEPOL_ERR; in cil_resolve_default() local
2351 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_default()
2352 if (rc != SEPOL_OK) { in cil_resolve_default()
2362 return rc; in cil_resolve_default()
2367 int rc = SEPOL_ERR; in cil_resolve_defaultrange() local
2375 rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_CLASSES, extra_args, &datum); in cil_resolve_defaultrange()
2376 if (rc != SEPOL_OK) { in cil_resolve_defaultrange()
2386 return rc; in cil_resolve_defaultrange()
2396 int rc = SEPOL_ERR; in cil_resolve_call1() local
2402 rc = cil_resolve_name(current, new_call->macro_str, CIL_SYM_BLOCKS, extra_args, ¯o_datum); in cil_resolve_call1()
2403 if (rc != SEPOL_OK) { in cil_resolve_call1()
2411 rc = SEPOL_ERR; in cil_resolve_call1()
2424 rc = SEPOL_ERR; in cil_resolve_call1()
2437 rc = SEPOL_ERR; in cil_resolve_call1()
2441 rc = SEPOL_ERR; in cil_resolve_call1()
2481 rc = cil_fill_cats(pc, &catset->cats); in cil_resolve_call1()
2482 if (rc != SEPOL_OK) { in cil_resolve_call1()
2504 rc = cil_fill_level(pc->cl_head, level); in cil_resolve_call1()
2505 if (rc != SEPOL_OK) { in cil_resolve_call1()
2506 cil_log(CIL_ERR, "Failed to create anonymous level, rc: %d\n", rc); in cil_resolve_call1()
2528 rc = cil_fill_levelrange(pc->cl_head, range); in cil_resolve_call1()
2529 if (rc != SEPOL_OK) { in cil_resolve_call1()
2530 cil_log(CIL_ERR, "Failed to create anonymous levelrange, rc: %d\n", rc); in cil_resolve_call1()
2552 rc = cil_fill_ipaddr(pc->cl_head, ipaddr); in cil_resolve_call1()
2553 if (rc != SEPOL_OK) { in cil_resolve_call1()
2554 cil_log(CIL_ERR, "Failed to create anonymous ip address, rc; %d\n", rc); in cil_resolve_call1()
2582 rc = cil_fill_classperms_list(pc, &cp->classperms); in cil_resolve_call1()
2583 if (rc != SEPOL_OK) { in cil_resolve_call1()
2601 rc = SEPOL_ERR; in cil_resolve_call1()
2614 rc = SEPOL_ERR; in cil_resolve_call1()
2619 rc = SEPOL_ERR; in cil_resolve_call1()
2625 rc = cil_copy_ast(db, macro_node, current); in cil_resolve_call1()
2626 if (rc != SEPOL_OK) { in cil_resolve_call1()
2627 cil_log(CIL_ERR, "Failed to copy macro, rc: %d\n", rc); in cil_resolve_call1()
2635 return rc; in cil_resolve_call1()
2641 int rc = SEPOL_ERR; in cil_resolve_call2() local
2646 rc = SEPOL_OK; in cil_resolve_call2()
2654 rc = SEPOL_ERR; in cil_resolve_call2()
2728 rc = SEPOL_ERR; in cil_resolve_call2()
2733 rc = cil_resolve_name(current, arg->arg_str, sym_index, extra_args, &(arg->arg)); in cil_resolve_call2()
2734 if (rc != SEPOL_OK) { in cil_resolve_call2()
2743 return rc; in cil_resolve_call2()
2750 int rc = SEPOL_ERR; in cil_resolve_name_call_args() local
2762 rc = cil_flavor_to_symtab_index(arg->flavor, ¶m_index); in cil_resolve_name_call_args()
2766 rc = SEPOL_OK; in cil_resolve_name_call_args()
2775 return rc; in cil_resolve_name_call_args()
2780 int rc = SEPOL_ERR; in cil_resolve_expr() local
2813 rc = cil_resolve_name(parent, curr->data, sym_index, extra_args, &res_datum); in cil_resolve_expr()
2814 if (rc != SEPOL_OK) { in cil_resolve_expr()
2826 rc = cil_resolve_expr(expr_type, curr->data, &datum_sub_expr, parent, extra_args); in cil_resolve_expr()
2827 if (rc != SEPOL_OK) { in cil_resolve_expr()
2842 return rc; in cil_resolve_expr()
2847 int rc = SEPOL_ERR; in cil_resolve_boolif() local
2850 rc = cil_resolve_expr(CIL_BOOLEANIF, bif->str_expr, &bif->datum_expr, current, extra_args); in cil_resolve_boolif()
2851 if (rc != SEPOL_OK) { in cil_resolve_boolif()
2858 return rc; in cil_resolve_boolif()
2914 int rc = SEPOL_ERR; in cil_resolve_tunif() local
2925 rc = cil_resolve_expr(CIL_TUNABLEIF, tif->str_expr, &tif->datum_expr, current, extra_args); in cil_resolve_tunif()
2926 if (rc != SEPOL_OK) { in cil_resolve_tunif()
2952 rc = cil_copy_ast(db, true_node, current->parent); in cil_resolve_tunif()
2953 if (rc != SEPOL_OK) { in cil_resolve_tunif()
2959 rc = cil_copy_ast(db, false_node, current->parent); in cil_resolve_tunif()
2960 if (rc != SEPOL_OK) { in cil_resolve_tunif()
2973 return rc; in cil_resolve_tunif()
2979 int rc = SEPOL_OK; in __cil_resolve_ast_node() local
2992 rc = cil_resolve_tunif(node, args); in __cil_resolve_ast_node()
3004 rc = cil_resolve_blockinherit_link(node, args); in __cil_resolve_ast_node()
3009 rc = cil_resolve_blockinherit_copy(node, args); in __cil_resolve_ast_node()
3014 rc = cil_resolve_blockabstract(node, args); in __cil_resolve_ast_node()
3019 rc = cil_resolve_call1(node, args); in __cil_resolve_ast_node()
3024 rc = cil_resolve_call1(node, args); in __cil_resolve_ast_node()
3029 rc = cil_resolve_call2(node, args); in __cil_resolve_ast_node()
3035 rc = cil_resolve_aliasactual(node, args, CIL_TYPE); in __cil_resolve_ast_node()
3038 rc = cil_resolve_aliasactual(node, args, CIL_SENS); in __cil_resolve_ast_node()
3041 rc = cil_resolve_aliasactual(node, args, CIL_CAT); in __cil_resolve_ast_node()
3050 rc = cil_resolve_alias_to_actual(node, CIL_TYPE); in __cil_resolve_ast_node()
3053 rc = cil_resolve_alias_to_actual(node, CIL_SENS); in __cil_resolve_ast_node()
3056 rc = cil_resolve_alias_to_actual(node, CIL_CAT); in __cil_resolve_ast_node()
3065 rc = cil_resolve_sidorder(node, args); in __cil_resolve_ast_node()
3068 rc = cil_resolve_classorder(node, args); in __cil_resolve_ast_node()
3071 rc = cil_resolve_catorder(node, args); in __cil_resolve_ast_node()
3074 rc = cil_resolve_sensitivityorder(node, args); in __cil_resolve_ast_node()
3077 rc = cil_resolve_boolif(node, args); in __cil_resolve_ast_node()
3086 rc = cil_resolve_catset(node, (struct cil_catset*)node->data, args); in __cil_resolve_ast_node()
3095 rc = cil_resolve_senscat(node, args); in __cil_resolve_ast_node()
3098 rc = cil_resolve_classcommon(node, args); in __cil_resolve_ast_node()
3107 rc = cil_resolve_typeattributeset(node, args); in __cil_resolve_ast_node()
3110 rc = cil_resolve_bounds(node, args, CIL_TYPE); in __cil_resolve_ast_node()
3113 rc = cil_resolve_typepermissive(node, args); in __cil_resolve_ast_node()
3116 rc = cil_resolve_nametypetransition(node, args); in __cil_resolve_ast_node()
3119 rc = cil_resolve_rangetransition(node, args); in __cil_resolve_ast_node()
3122 rc = cil_resolve_classpermissionset(node, (struct cil_classpermissionset*)node->data, args); in __cil_resolve_ast_node()
3125 rc = cil_resolve_classmapping(node, args); in __cil_resolve_ast_node()
3128 rc = cil_resolve_avrule(node, args); in __cil_resolve_ast_node()
3131 rc = cil_resolve_type_rule(node, args); in __cil_resolve_ast_node()
3134 rc = cil_resolve_userrole(node, args); in __cil_resolve_ast_node()
3137 rc = cil_resolve_userlevel(node, args); in __cil_resolve_ast_node()
3140 rc = cil_resolve_userrange(node, args); in __cil_resolve_ast_node()
3143 rc = cil_resolve_bounds(node, args, CIL_USER); in __cil_resolve_ast_node()
3146 rc = cil_resolve_userprefix(node, args); in __cil_resolve_ast_node()
3150 rc = cil_resolve_selinuxuser(node, args); in __cil_resolve_ast_node()
3153 rc = cil_resolve_roleattributeset(node, args); in __cil_resolve_ast_node()
3156 rc = cil_resolve_roletype(node, args); in __cil_resolve_ast_node()
3159 rc = cil_resolve_roletransition(node, args); in __cil_resolve_ast_node()
3162 rc = cil_resolve_roleallow(node, args); in __cil_resolve_ast_node()
3165 rc = cil_resolve_bounds(node, args, CIL_ROLE); in __cil_resolve_ast_node()
3168 rc = cil_resolve_level(node, (struct cil_level*)node->data, args); in __cil_resolve_ast_node()
3171 rc = cil_resolve_levelrange(node, (struct cil_levelrange*)node->data, args); in __cil_resolve_ast_node()
3174 rc = cil_resolve_constrain(node, args); in __cil_resolve_ast_node()
3177 rc = cil_resolve_constrain(node, args); in __cil_resolve_ast_node()
3181 rc = cil_resolve_validatetrans(node, args); in __cil_resolve_ast_node()
3184 rc = cil_resolve_context(node, (struct cil_context*)node->data, args); in __cil_resolve_ast_node()
3187 rc = cil_resolve_filecon(node, args); in __cil_resolve_ast_node()
3190 rc = cil_resolve_portcon(node, args); in __cil_resolve_ast_node()
3193 rc = cil_resolve_nodecon(node, args); in __cil_resolve_ast_node()
3196 rc = cil_resolve_genfscon(node, args); in __cil_resolve_ast_node()
3199 rc = cil_resolve_netifcon(node, args); in __cil_resolve_ast_node()
3202 rc = cil_resolve_pirqcon(node, args); in __cil_resolve_ast_node()
3205 rc = cil_resolve_iomemcon(node, args); in __cil_resolve_ast_node()
3208 rc = cil_resolve_ioportcon(node, args); in __cil_resolve_ast_node()
3211 rc = cil_resolve_pcidevicecon(node, args); in __cil_resolve_ast_node()
3214 rc = cil_resolve_devicetreecon(node, args); in __cil_resolve_ast_node()
3217 rc = cil_resolve_fsuse(node, args); in __cil_resolve_ast_node()
3220 rc = cil_resolve_sidcontext(node, args); in __cil_resolve_ast_node()
3225 rc = cil_resolve_default(node, args); in __cil_resolve_ast_node()
3228 rc = cil_resolve_defaultrange(node, args); in __cil_resolve_ast_node()
3238 return rc; in __cil_resolve_ast_node()
3241 return rc; in __cil_resolve_ast_node()
3246 int rc = SEPOL_ERR; in __cil_resolve_ast_node_helper() local
3260 rc = SEPOL_ERR; in __cil_resolve_ast_node_helper()
3277 rc = SEPOL_ERR; in __cil_resolve_ast_node_helper()
3285 rc = SEPOL_OK; in __cil_resolve_ast_node_helper()
3292 rc = SEPOL_OK; in __cil_resolve_ast_node_helper()
3296 rc = __cil_resolve_ast_node(node, extra_args); in __cil_resolve_ast_node_helper()
3297 if (rc == SEPOL_ENOENT && optstack != NULL) { in __cil_resolve_ast_node_helper()
3302 rc = SEPOL_OK; in __cil_resolve_ast_node_helper()
3303 } else if (rc != SEPOL_OK) { in __cil_resolve_ast_node_helper()
3308 return rc; in __cil_resolve_ast_node_helper()
3311 return rc; in __cil_resolve_ast_node_helper()
3316 int rc = SEPOL_ERR; in __cil_resolve_ast_first_child_helper() local
3347 rc = SEPOL_ERR; in __cil_resolve_ast_first_child_helper()
3371 return rc; in __cil_resolve_ast_first_child_helper()
3377 int rc = SEPOL_ERR; in __cil_resolve_ast_last_child_helper() local
3419 return rc; in __cil_resolve_ast_last_child_helper()
3424 int rc = SEPOL_ERR; in cil_resolve_ast() local
3453 …rc = cil_tree_walk(current, __cil_resolve_ast_node_helper, __cil_resolve_ast_first_child_helper, _… in cil_resolve_ast()
3454 if (rc != SEPOL_OK) { in cil_resolve_ast()
3460 rc = cil_resolve_in_list(&extra_args); in cil_resolve_ast()
3461 if (rc != SEPOL_OK) { in cil_resolve_ast()
3474 rc = __cil_verify_ordered(current, CIL_SID); in cil_resolve_ast()
3475 if (rc != SEPOL_OK) { in cil_resolve_ast()
3479 rc = __cil_verify_ordered(current, CIL_CLASS); in cil_resolve_ast()
3480 if (rc != SEPOL_OK) { in cil_resolve_ast()
3484 rc = __cil_verify_ordered(current, CIL_CAT); in cil_resolve_ast()
3485 if (rc != SEPOL_OK) { in cil_resolve_ast()
3489 rc = __cil_verify_ordered(current, CIL_SENS); in cil_resolve_ast()
3490 if (rc != SEPOL_OK) { in cil_resolve_ast()
3518 rc = cil_reset_ast(current); in cil_resolve_ast()
3519 if (rc != SEPOL_OK) { in cil_resolve_ast()
3541 rc = __cil_verify_initsids(db->sidorder); in cil_resolve_ast()
3542 if (rc != SEPOL_OK) { in cil_resolve_ast()
3546 rc = SEPOL_OK; in cil_resolve_ast()
3548 return rc; in cil_resolve_ast()
3560 int rc = SEPOL_ERR; in __cil_resolve_name_with_parents() local
3563 while (node != NULL && rc != SEPOL_OK) { in __cil_resolve_name_with_parents()
3570 rc = cil_symtab_get_datum(symtab, name, datum); in __cil_resolve_name_with_parents()
3574 rc = __cil_resolve_name_with_parents(node->parent, name, sym_index, datum); in __cil_resolve_name_with_parents()
3575 if (rc != SEPOL_OK) { in __cil_resolve_name_with_parents()
3577 rc = __cil_resolve_name_with_parents(NODE(inherit->block), name, sym_index, datum); in __cil_resolve_name_with_parents()
3585 rc = cil_symtab_get_datum(symtab, name, datum); in __cil_resolve_name_with_parents()
3590 rc = cil_resolve_name_call_args(call, name, sym_index, datum); in __cil_resolve_name_with_parents()
3591 if (rc != SEPOL_OK) { in __cil_resolve_name_with_parents()
3593 rc = __cil_resolve_name_with_parents(NODE(call->macro)->parent, name, sym_index, datum); in __cil_resolve_name_with_parents()
3609 return rc; in __cil_resolve_name_with_parents()
3614 int rc = SEPOL_ERR; in __cil_resolve_name_helper() local
3616 rc = __cil_resolve_name_with_parents(node, name, sym_index, datum); in __cil_resolve_name_helper()
3617 if (rc != SEPOL_OK) { in __cil_resolve_name_helper()
3618 rc = __cil_resolve_name_with_root(db, name, sym_index, datum); in __cil_resolve_name_helper()
3620 return rc; in __cil_resolve_name_helper()
3625 int rc = SEPOL_ERR; in cil_resolve_name() local
3639 rc = __cil_resolve_name_helper(db, ast_node->parent, name, sym_index, datum); in cil_resolve_name()
3640 if (rc != SEPOL_OK) { in cil_resolve_name()
3655 rc = __cil_resolve_name_helper(db, node->parent, current, CIL_SYM_BLOCKS, datum); in cil_resolve_name()
3656 if (rc != SEPOL_OK) { in cil_resolve_name()
3664 rc = cil_symtab_get_datum(symtab, current, datum); in cil_resolve_name()
3665 if (rc != SEPOL_OK) { in cil_resolve_name()
3676 rc = SEPOL_ERR; in cil_resolve_name()
3691 rc = cil_symtab_get_datum(symtab, current, datum); in cil_resolve_name()
3693 if (rc != SEPOL_OK) { in cil_resolve_name()
3698 rc = SEPOL_OK; in cil_resolve_name()
3701 if (rc != SEPOL_OK) { in cil_resolve_name()
3721 return rc; in cil_resolve_name()