Lines Matching refs:rc
126 int rc = 1;
139 rc = 0;
146 rc = -1;
155 return rc;
159 return rc;
274 int rc = -1;
284 rc = 0;
287 return rc;
294 int rc = -1;
298 return rc;
304 rc = list_prepend((struct list *)args, role_node);
305 if (rc != 0)
307 return rc;
312 int rc = -1;
314 rc = list_init(&role_list);
315 if (rc != 0) {
319 rc = hashtab_map(roles_tab, roles_gather_map, role_list);
322 return rc;
331 int rc = -1;
348 rc = list_init(&typealias_lists[scope_id]);
349 if (rc != 0) {
365 return rc;
386 uint32_t rc = -1;
400 rc = hashtab_map(pdb->p_types.table, typealiases_gather_map, pdb);
401 if (rc != 0) {
410 return rc;
429 int rc = -1;
449 return rc;
454 int rc = -1;
469 rc = 0;
471 return rc;
565 int rc = -1;
597 rc = -1;
606 rc = -1;
624 return rc;
687 int rc = -1;
706 rc = -1;
721 return rc;
784 int rc = 0;
789 rc = -1;
793 rc = list_prepend(attr_list, attr_list_node);
794 if (rc != 0) {
802 return rc;
806 return rc;
827 int rc = 0;
893 return rc;
900 int rc = 0;
904 rc = cil_print_attr_strs(indent, pdb, node->is_type, node->set, node->attr_name);
905 if (rc != 0) {
906 return rc;
910 return rc;
955 int rc = 0;
965 rc = -1;
969 rc = cil_add_attr_to_list(attr_list, attr_name, is_type, set);
970 if (rc != 0) {
979 rc = -1;
986 return rc;
991 int rc = 0;
1001 rc = -1;
1016 rc = -1;
1030 return rc;
1035 int rc = 0;
1041 rc = set_to_names(pdb, 0, &rs->roles, attr_list, names, num_names);
1042 if (rc != 0) {
1046 rc = ebitmap_to_names(&rs->roles, pdb->p_role_val_to_name, names, num_names);
1047 if (rc != 0) {
1053 return rc;
1058 int rc = 0;
1064 rc = set_to_names(pdb, 1, ts, attr_list, names, num_names);
1065 if (rc != 0) {
1069 rc = ebitmap_to_names(&ts->types, pdb->p_type_val_to_name, names, num_names);
1070 if (rc != 0) {
1076 return rc;
1092 int rc;
1096 rc = list_init(&attr_list);
1097 if (rc != 0) {
1108 rc = process_typeset(pdb, ts, attr_list, &tnames, &num_tnames);
1109 if (rc != 0) {
1120 rc = cil_print_attr_list(indent, pdb, attr_list);
1121 if (rc != 0) {
1127 return rc;
1134 int rc = -1;
1161 rc = -1;
1180 return rc;
1185 int rc = -1;
1199 rc = process_typeset(pdb, ts, attr_list, &snames, &num_snames);
1200 if (rc != 0) {
1205 rc = process_typeset(pdb, ts, attr_list, &tnames, &num_tnames);
1206 if (rc != 0) {
1213 rc = avrulex_to_cil(indent, pdb, avrule->specified, snames[s], tnames[t], avrule->perms, avrule->xperms);
1215 rc = avrule_to_cil(indent, pdb, avrule->specified, snames[s], tnames[t], avrule->perms);
1217 if (rc != 0) {
1224 rc = avrulex_to_cil(indent, pdb, avrule->specified, snames[s], "self", avrule->perms, avrule->xperms);
1226 rc = avrule_to_cil(indent, pdb, avrule->specified, snames[s], "self", avrule->perms);
1228 if (rc != 0) {
1249 return rc;
1254 int rc = 0;
1267 rc = stack_init(&stack);
1268 if (rc != 0) {
1281 rc = -1;
1287 rc = -1;
1299 rc = -1;
1310 rc = -1;
1322 rc = -1;
1335 rc = -1;
1342 rc = -1;
1352 rc = stack_push(stack, new_val);
1353 if (rc != 0) {
1369 rc = -1;
1377 rc = 0;
1389 return rc;
1394 int rc = 0;
1399 rc = cond_expr_to_cil(indent, pdb, cond->expr, cond->flags);
1400 if (rc != 0) {
1406 rc = avrule_list_to_cil(indent + 2, pdb, cond->avtrue_list, attr_list);
1407 if (rc != 0) {
1415 rc = avrule_list_to_cil(indent + 2, pdb, cond->avfalse_list, attr_list);
1416 if (rc != 0) {
1426 return rc;
1431 int rc = 0;
1446 rc = process_roleset(pdb, rs, role_attr_list, &role_names, &num_role_names);
1447 if (rc != 0) {
1452 rc = process_typeset(pdb, ts, type_attr_list, &type_names, &num_type_names);
1453 if (rc != 0) {
1476 return rc;
1481 int rc = -1;
1492 rc = process_roleset(pdb, rs, attr_list, &roles, &num_roles);
1493 if (rc != 0) {
1498 rc = process_roleset(pdb, rs, attr_list, &new_roles, &num_new_roles);
1499 if (rc != 0) {
1513 rc = 0;
1519 return rc;
1524 int rc = -1;
1542 rc = process_typeset(pdb, ts, attr_list, &stypes, &num_stypes);
1543 if (rc != 0) {
1548 rc = process_typeset(pdb, ts, attr_list, &ttypes, &num_ttypes);
1549 if (rc != 0) {
1561 rc = semantic_level_to_cil(pdb, 1, &rule->trange.level[0]);
1562 if (rc != 0) {
1568 rc = semantic_level_to_cil(pdb, 1, &rule->trange.level[1]);
1569 if (rc != 0) {
1583 rc = 0;
1589 return rc;
1594 int rc = -1;
1606 rc = process_typeset(pdb, ts, attr_list, &stypes, &num_stypes);
1607 if (rc != 0) {
1612 rc = process_typeset(pdb, ts, attr_list, &ttypes, &num_ttypes);
1613 if (rc != 0) {
1638 rc = 0;
1643 return rc;
1677 int rc = -1;
1687 rc = hashtab_map(common->permissions.table, class_perm_to_array, &arr);
1688 if (rc != 0) {
1700 rc = 0;
1704 return rc;
1710 int rc = -1;
1728 rc = stack_init(&stack);
1729 if (rc != 0) {
1743 rc = -1;
1765 rc = -1;
1775 rc = -1;
1781 rc = -1;
1787 rc = ebitmap_to_names(&ts->types, pdb->p_type_val_to_name, &name_list, &num_names);
1788 if (rc != 0) {
1792 rc = ebitmap_to_names(&expr->names, pdb->p_user_val_to_name, &name_list, &num_names);
1793 if (rc != 0) {
1797 rc = ebitmap_to_names(&expr->names, pdb->p_role_val_to_name, &name_list, &num_names);
1798 if (rc != 0) {
1805 rc = -1;
1809 rc = name_list_to_string(name_list, num_names, &names);
1810 if (rc != 0) {
1823 rc = -1;
1833 rc = -1;
1848 rc = -1;
1859 rc = -1;
1871 rc = -1;
1884 rc = -1;
1891 rc = -1;
1901 rc = stack_push(stack, new_val);
1902 if (rc != 0) {
1913 rc = -1;
1920 rc = 0;
1936 return rc;
1942 int rc = -1;
1952 rc = constraint_expr_to_string(pdb, node->expr, &expr);
1953 if (rc != 0) {
1968 rc = 0;
1972 return rc;
1977 int rc = -1;
1992 rc = hashtab_map(class->permissions.table, class_perm_to_array, &arr);
1993 if (rc != 0) {
2016 rc = -1;
2028 rc = -1;
2040 rc = -1;
2057 rc = -1;
2065 rc = constraints_to_cil(indent, pdb, key, class, class->constraints, 1);
2066 if (rc != 0) {
2072 rc = constraints_to_cil(indent, pdb, key, class, class->validatetrans, 0);
2073 if (rc != 0) {
2078 rc = 0;
2082 return rc;
2108 int rc = -1;
2118 rc = list_init(&attr_list);
2119 if (rc != 0) {
2175 rc = process_typeset(pdb, ts, attr_list, &types, &num_types);
2176 if (rc != 0) {
2206 rc = process_typeset(pdb, ts, attr_list, &types, &num_types);
2207 if (rc != 0) {
2222 rc = -1;
2226 rc = cil_print_attr_list(indent, pdb, attr_list);
2227 if (rc != 0) {
2235 return rc;
2240 int rc = -1;
2252 rc = roletype_role_in_ancestor_to_cil(pdb, decl_stack, key, indent);
2253 if (rc != 0) {
2301 rc = -1;
2305 rc = 0;
2308 return rc;
2444 int rc = -1;
2449 rc = 0;
2464 return rc;
2469 int rc = -1;
2481 rc = -1;
2490 return rc;
2535 int rc = -1;
2568 rc = -1;
2574 rc = -1;
2589 rc = 0;
2598 return rc;
2603 int rc = -1;
2605 rc = ocontext_isid_to_cil(pdb, selinux_sid_to_str, SELINUX_SID_SZ, isids);
2606 if (rc != 0) {
2613 return rc;
2627 int rc = -1;
2642 rc = -1;
2662 return rc;
2668 int rc = -1;
2684 rc = -1;
2700 return rc;
2721 int rc = -1;
2729 rc = -1;
2735 rc = -1;
2748 return rc;
2753 int rc = -1;
2761 rc = -1;
2767 rc = -1;
2780 return rc;
2799 int rc = -1;
2811 rc = -1;
2825 return rc;
2831 int rc = -1;
2833 rc = ocontext_isid_to_cil(pdb, xen_sid_to_str, XEN_SID_SZ, isids);
2834 if (rc != 0) {
2841 return rc;
2920 int rc = -1;
2954 rc = -1;
2960 rc = ocon_funcs[ocon](pdb, pdb->ocontexts[ocon]);
2961 if (rc != 0) {
2969 return rc;
3015 int rc = -1;
3026 rc = -1;
3050 rc = 0;
3054 return rc;
3081 int rc = -1;
3091 rc = -1;
3107 rc = 0;
3115 return rc;
3120 int rc = -1;
3136 while ((rc = get_line(&cur, end, &line)) > 0) {
3152 rc = -1;
3180 if (rc == -1) {
3185 rc = 0;
3192 return rc;
3208 int rc = -1;
3227 while ((rc = get_line(&cur, end, &line)) > 0) {
3241 rc = -1;
3249 rc = -1;
3264 if (rc == -1) {
3269 rc = 0;
3275 return rc;
3280 int rc = -1;
3297 while ((rc = get_line(&cur, end, &line)) > 0) {
3311 rc = -1;
3338 rc = -1;
3360 if (rc == -1) {
3365 rc = 0;
3372 return rc;
3395 int rc = -1;
3410 rc = -1;
3425 return rc;
3430 int rc = -1;
3450 rc = -1;
3455 rc = -1;
3458 rc = func_to_cil[sym](indent, pdb, block, decl_stack, key, datum, scope->scope);
3459 if (rc != 0) {
3465 rc = cat_order_to_cil(indent, pdb, map);
3466 if (rc != 0) {
3472 rc = sens_order_to_cil(indent, pdb, map);
3473 if (rc != 0) {
3479 rc = class_order_to_cil(indent, pdb, map);
3480 if (rc != 0) {
3488 return rc;
3493 int rc = -1;
3515 rc = -1;
3536 rc = -1;
3539 rc = func_to_cil[sym](indent, pdb, block, decl_stack, key, datum, SCOPE_REQ);
3540 if (rc != 0) {
3548 return rc;
3554 int rc = -1;
3557 rc = func_to_cil[args->sym_index](args->indent, args->pdb, args->block, args->decl_stack, key, data, SCOPE_REQ);
3558 if (rc != 0) {
3565 return rc;
3570 int rc = -1;
3582 rc = hashtab_map(decl->symtab[args.sym_index].table, additive_scopes_to_cil_map, &args);
3583 if (rc != 0) {
3591 return rc;
3598 int rc = 0;
3633 rc = 1;
3638 return rc;
3643 int rc = -1;
3650 rc = list_init(&type_attr_list);
3651 if (rc != 0) {
3654 rc = list_init(&role_attr_list);
3655 if (rc != 0) {
3659 rc = typealiases_to_cil(indent, pdb, block, stack);
3660 if (rc != 0) {
3664 rc = declared_scopes_to_cil(indent, pdb, block, stack);
3665 if (rc != 0) {
3669 rc = required_scopes_to_cil(indent, pdb, block, stack);
3670 if (rc != 0) {
3674 rc = additive_scopes_to_cil(indent, pdb, block, stack);
3675 if (rc != 0) {
3679 rc = avrule_list_to_cil(indent, pdb, decl->avrules, type_attr_list);
3680 if (rc != 0) {
3684 rc = role_trans_to_cil(indent, pdb, decl->role_tr_rules, role_attr_list, type_attr_list);
3685 if (rc != 0) {
3689 rc = role_allows_to_cil(indent, pdb, decl->role_allow_rules, role_attr_list);
3690 if (rc != 0) {
3694 rc = range_trans_to_cil(indent, pdb, decl->range_tr_rules, type_attr_list);
3695 if (rc != 0) {
3699 rc = filename_trans_to_cil(indent, pdb, decl->filename_trans_rules, type_attr_list);
3700 if (rc != 0) {
3704 rc = cond_list_to_cil(indent, pdb, decl->cond_list, type_attr_list);
3705 if (rc != 0) {
3709 rc = cil_print_attr_list(indent, pdb, type_attr_list);
3710 if (rc != 0) {
3713 rc = cil_print_attr_list(indent, pdb, role_attr_list);
3714 if (rc != 0) {
3722 return rc;
3727 int rc = 0;
3758 rc = block_to_cil(pdb, block, stack, *indent);
3759 if (rc != 0) {
3764 return rc;
3769 int rc = 0;
3786 rc = hashtab_map(pdb->p_commons.table, common_to_cil, NULL);
3787 if (rc != 0) {
3791 rc = block_to_cil(pdb, block, stack, 0);
3792 if (rc != 0) {
3797 return rc;
3802 int rc = -1;
3807 rc = stack_init(&stack);
3808 if (rc != 0) {
3813 rc = global_block_to_cil(pdb, block, stack);
3814 if (rc != 0) {
3819 rc = module_block_to_cil(pdb, block, stack, &indent);
3820 if (rc != 0) {
3833 return rc;
3838 int rc = 0;
3856 rc = block_to_cil(pdb, block, stack, 0);
3857 if (rc != 0) {
3864 return rc;
3871 int rc = -1;
3875 rc = stack_init(&stack);
3876 if (rc != 0) {
3881 rc = global_block_to_cil(pdb, block, stack);
3882 if (rc != 0) {
3887 rc = linked_block_to_cil(pdb, block, stack);
3888 if (rc != 0) {
3896 return rc;
3901 int rc = -1;
3916 rc = -1;
3925 return rc;
3974 int rc = -1;
3985 rc = -1;
4002 return rc;
4007 int rc = -1;
4012 rc = 0;
4019 rc = -1;
4023 rc = fix_module_name(pdb);
4024 if (rc != 0) {
4033 rc = generate_default_level();
4034 if (rc != 0) {
4042 rc = generate_default_object();
4043 if (rc != 0) {
4047 rc = generate_builtin_roles();
4048 if (rc != 0) {
4053 rc = generate_gen_require_attribute();
4054 if (rc != 0) {
4059 rc = handle_unknown_to_cil(pdb);
4060 if (rc != 0) {
4065 rc = generate_mls(pdb);
4066 if (rc != 0) {
4071 rc = role_list_create(pdb->p_roles.table);
4072 if (rc != 0) {
4076 rc = typealias_list_create(pdb);
4077 if (rc != 0) {
4081 rc = polcaps_to_cil(pdb);
4082 if (rc != 0) {
4086 rc = ocontexts_to_cil(pdb);
4087 if (rc != 0) {
4091 rc = genfscon_to_cil(pdb);
4092 if (rc != 0) {
4098 rc = linked_blocks_to_cil(pdb);
4100 rc = blocks_to_cil(pdb);
4102 if (rc != 0) {
4106 rc = 0;
4112 return rc;
4117 int rc = -1;
4125 rc = -1;
4129 rc = sepol_module_policydb_to_cil(fp, &pdb->p, 0);
4130 if (rc != 0) {
4134 rc = seusers_to_cil(mod_pkg);
4135 if (rc != 0) {
4139 rc = netfilter_contexts_to_cil(mod_pkg);
4140 if (rc != 0) {
4144 rc = user_extra_to_cil(mod_pkg);
4145 if (rc != 0) {
4149 rc = file_contexts_to_cil(mod_pkg);
4150 if (rc != 0) {
4154 rc = 0;
4157 return rc;
4162 int rc = -1;
4171 rc = -1;
4182 rc = -1;
4191 rc = -1;
4202 return rc;
4207 int rc = -1;
4215 rc = sepol_policy_file_create(&pf);
4216 if (rc != 0) {
4223 rc = -1;
4231 rc = fp_to_buffer(fp, &data, &data_len);
4232 if (rc != 0) {
4241 rc = sepol_module_package_create(&pkg);
4242 if (rc != 0) {
4247 rc = sepol_module_package_read(pkg, pf, 0);
4248 if (rc != 0) {
4260 if (rc != 0) {
4264 return rc;