Lines Matching defs:rc
112 int rc = 1;
125 rc = 0;
132 rc = -1;
141 return rc;
145 return rc;
245 int rc = -1;
257 return rc;
262 int rc = -1;
272 rc = 0;
275 return rc;
282 int rc = -1;
286 return rc;
292 rc = list_prepend((struct list *)args, role_node);
293 return rc;
298 int rc = -1;
300 rc = list_init(&role_list);
301 if (rc != 0) {
305 rc = hashtab_map(roles_tab, roles_gather_map, role_list);
308 return rc;
317 int rc = -1;
333 rc = list_init(&typealias_lists[scope_id]);
334 if (rc != 0) {
345 return rc;
366 uint32_t rc = -1;
378 rc = hashtab_map(pdb->p_types.table, typealiases_gather_map, pdb);
379 if (rc != 0) {
388 return rc;
407 int rc = -1;
427 return rc;
432 int rc = -1;
447 rc = 0;
449 return rc;
543 int rc = -1;
575 rc = -1;
584 rc = -1;
602 return rc;
618 int rc = -1;
635 rc = -1;
641 rc = -1;
648 rc = -1;
656 rc = 0;
659 return rc;
671 int rc = 0;
737 return rc;
758 int rc = -1;
768 rc = -1;
782 rc = -1;
790 rc = -1;
806 return rc;
812 int rc = -1;
817 rc = -1;
821 rc = list_prepend(attr_list, attr_list_node);
822 if (rc != 0) {
829 rc = -1;
840 return rc;
847 return rc;
853 int rc = -1;
855 rc = set_to_cil_attr(pdb, 1, names, num_names);
856 if (rc != 0) {
862 rc = ebitmap_to_names(pdb->p_type_val_to_name, ts->types, names, num_names);
863 if (rc != 0) {
870 return rc;
876 int rc = -1;
878 rc = set_to_cil_attr(pdb, 0, names, num_names);
879 if (rc != 0) {
885 rc = ebitmap_to_names(pdb->p_role_val_to_name, rs->roles, names, num_names);
886 if (rc != 0) {
893 return rc;
898 int rc = -1;
902 rc = roleset_to_names(pdb, rs, type_names, num_type_names, &generated_attribute);
903 if (rc != 0) {
912 rc = cil_print_attr_strs(indent, pdb, 0, &rs->roles, NULL, rs->flags, generated_attribute);
913 if (rc != 0) {
917 rc = cil_add_attr_to_list(attr_list, generated_attribute, 0, rs);
918 if (rc != 0) {
924 return rc;
929 int rc = -1;
933 rc = typeset_to_names(pdb, ts, type_names, num_type_names, &generated_attribute);
934 if (rc != 0) {
939 rc = 0;
944 rc = cil_print_attr_strs(indent, pdb, 1, &ts->types, &ts->negset, ts->flags, generated_attribute);
945 if (rc != 0) {
949 rc = cil_add_attr_to_list(attr_list, generated_attribute, 1, ts);
950 if (rc != 0) {
956 return rc;
981 int rc;
992 rc = process_typeset(indent, pdb, ts, NULL, &tnames, &num_tnames);
993 if (rc != 0) {
1004 rc = 0;
1007 return rc;
1014 int rc = -1;
1032 rc = -1;
1043 rc = -1;
1057 return rc;
1062 int rc = -1;
1074 rc = process_typeset(indent, pdb, ts, attr_list, &snames, &num_snames);
1075 if (rc != 0) {
1080 rc = process_typeset(indent, pdb, ts, attr_list, &tnames, &num_tnames);
1081 if (rc != 0) {
1087 rc = avrule_to_cil(indent, pdb, avrule->specified, snames[s], tnames[t], avrule->perms);
1088 if (rc != 0) {
1094 rc = avrule_to_cil(indent, pdb, avrule->specified, snames[s], "self", avrule->perms);
1095 if (rc != 0) {
1111 return rc;
1116 int rc = -1;
1129 rc = stack_init(&stack);
1130 if (rc != 0) {
1143 rc = -1;
1149 rc = -1;
1162 rc = -1;
1173 rc = -1;
1185 rc = -1;
1198 rc = -1;
1208 rc = -1;
1218 rc = stack_push(stack, new_val);
1219 if (rc != 0) {
1235 rc = -1;
1243 rc = 0;
1254 return rc;
1261 int rc = 0;
1275 rc = cil_print_attr_strs(indent, pdb, 1, &ts->types, &ts->negset, ts->flags, generated_attribute);
1276 if (rc != 0) {
1277 return rc;
1281 rc = cil_print_attr_strs(indent, pdb, 0, &rs->roles, NULL, rs->flags, generated_attribute);
1282 if (rc != 0) {
1283 return rc;
1288 return rc;
1293 int rc = -1;
1297 rc = list_init(&attr_list);
1298 if (rc != 0) {
1304 rc = cond_expr_to_cil(indent, pdb, cond->expr, cond->flags);
1305 if (rc != 0) {
1311 rc = avrule_list_to_cil(indent + 2, pdb, cond->avtrue_list, attr_list);
1312 if (rc != 0) {
1320 rc = avrule_list_to_cil(indent + 2, pdb, cond->avfalse_list, attr_list);
1321 if (rc != 0) {
1330 rc = cil_print_attr_list(indent, pdb, attr_list);
1334 return rc;
1339 int rc = -1;
1355 rc = process_roleset(indent, pdb, rs, NULL, &role_names, &num_role_names);
1356 if (rc != 0) {
1361 rc = process_typeset(indent, pdb, ts, NULL, &type_names, &num_type_names);
1362 if (rc != 0) {
1384 rc = 0;
1390 return rc;
1395 int rc = -1;
1407 rc = process_roleset(indent, pdb, rs, NULL, &roles, &num_roles);
1408 if (rc != 0) {
1413 rc = process_roleset(indent, pdb, rs, NULL, &new_roles, &num_new_roles);
1414 if (rc != 0) {
1428 rc = 0;
1434 return rc;
1439 int rc = -1;
1457 rc = process_typeset(indent, pdb, ts, NULL, &stypes, &num_stypes);
1458 if (rc != 0) {
1463 rc = process_typeset(indent, pdb, ts, NULL, &ttypes, &num_ttypes);
1464 if (rc != 0) {
1480 rc = semantic_level_to_cil(pdb, 1, &rule->trange.level[0]);
1481 if (rc != 0) {
1487 rc = semantic_level_to_cil(pdb, 1, &rule->trange.level[1]);
1488 if (rc != 0) {
1502 rc = 0;
1508 return rc;
1513 int rc = -1;
1526 rc = process_typeset(indent, pdb, ts, NULL, &stypes, &num_stypes);
1527 if (rc != 0) {
1532 rc = process_typeset(indent, pdb, ts, NULL, &ttypes, &num_ttypes);
1533 if (rc != 0) {
1551 rc = 0;
1556 return rc;
1590 int rc = -1;
1597 rc = hashtab_map(common->permissions.table, class_perm_to_array, &arr);
1598 if (rc != 0) {
1610 rc = 0;
1614 return rc;
1620 int rc = -1;
1638 rc = stack_init(&stack);
1639 if (rc != 0) {
1653 rc = -1;
1675 rc = -1;
1685 rc = -1;
1691 rc = -1;
1697 rc = process_typeset(indent, pdb, ts, NULL, &name_list, &num_names);
1698 if (rc != 0) {
1702 rc = ebitmap_to_names(pdb->p_user_val_to_name, expr->names, &name_list, &num_names);
1703 if (rc != 0) {
1707 rc = ebitmap_to_names(pdb->p_role_val_to_name, expr->names, &name_list, &num_names);
1708 if (rc != 0) {
1712 rc = name_list_to_string(name_list, num_names, &names);
1713 if (rc != 0) {
1722 rc = -1;
1728 rc = -1;
1744 rc = -1;
1755 rc = -1;
1767 rc = -1;
1780 rc = -1;
1790 rc = -1;
1800 rc = stack_push(stack, new_val);
1801 if (rc != 0) {
1812 rc = -1;
1819 rc = 0;
1832 return rc;
1838 int rc = -1;
1848 rc = constraint_expr_to_string(indent, pdb, node->expr, &expr);
1849 if (rc != 0) {
1864 rc = 0;
1868 return rc;
1873 int rc = -1;
1885 rc = hashtab_map(class->permissions.table, class_perm_to_array, &arr);
1886 if (rc != 0) {
1909 rc = -1;
1921 rc = -1;
1933 rc = -1;
1949 rc = -1;
1957 rc = constraints_to_cil(indent, pdb, key, class, class->constraints, 1);
1958 if (rc != 0) {
1964 rc = constraints_to_cil(indent, pdb, key, class, class->validatetrans, 0);
1965 if (rc != 0) {
1970 rc = 0;
1974 return rc;
2003 int rc = -1;
2053 rc = process_typeset(indent, pdb, ts, NULL, &types, &num_types);
2054 if (rc != 0) {
2087 rc = process_typeset(indent, pdb, ts, NULL, &types, &num_types);
2088 if (rc != 0) {
2101 rc = -1;
2105 rc = 0;
2109 return rc;
2114 int rc = -1;
2126 rc = roletype_role_in_ancestor_to_cil(pdb, decl_stack, key, indent);
2127 if (rc != 0) {
2162 rc = -1;
2166 rc = 0;
2169 return rc;
2311 int rc = -1;
2316 rc = 0;
2334 return rc;
2339 int rc = -1;
2354 rc = -1;
2363 return rc;
2407 int rc = -1;
2430 rc = -1;
2446 rc = 0;
2454 return rc;
2459 int rc = -1;
2495 rc = ocontext_isid_to_cil(pdb, selinux_sid_to_string, isids);
2496 if (rc != 0) {
2503 return rc;
2517 int rc = -1;
2530 rc = -1;
2550 return rc;
2571 int rc = -1;
2579 rc = -1;
2585 rc = -1;
2598 return rc;
2603 int rc = -1;
2611 rc = -1;
2617 rc = -1;
2630 return rc;
2636 int rc = -1;
2648 rc = -1;
2662 return rc;
2668 int rc = -1;
2687 rc = ocontext_isid_to_cil(pdb, xen_sid_to_string, isids);
2688 if (rc != 0) {
2695 return rc;
2774 int rc = -1;
2806 rc = -1;
2812 rc = ocon_funcs[ocon](pdb, pdb->ocontexts[ocon]);
2813 if (rc != 0) {
2821 return rc;
2842 int rc = -1;
2853 rc = -1;
2877 rc = 0;
2881 return rc;
2908 int rc = -1;
2918 rc = -1;
2934 rc = 0;
2942 return rc;
2947 int rc = -1;
2962 while ((rc = get_line(&cur, end, &line)) > 0) {
2971 rc = -1;
2999 if (rc == -1) {
3004 rc = 0;
3011 return rc;
3027 int rc = -1;
3041 while ((rc = get_line(&cur, end, &line)) > 0) {
3048 rc = -1;
3060 if (rc == -1) {
3065 rc = 0;
3071 return rc;
3076 int rc = -1;
3092 while ((rc = get_line(&cur, end, &line)) > 0) {
3099 rc = -1;
3126 rc = -1;
3148 if (rc == -1) {
3153 rc = 0;
3160 return rc;
3182 int rc = -1;
3192 rc = -1;
3203 return rc;
3208 int rc = -1;
3231 rc = -1;
3236 rc = -1;
3239 rc = func_to_cil[sym](indent, pdb, block, decl_stack, key, datum, scope->scope);
3240 if (rc != 0) {
3246 rc = cat_order_to_cil(indent, pdb, map);
3247 if (rc != 0) {
3253 rc = sens_order_to_cil(indent, pdb, map);
3254 if (rc != 0) {
3260 rc = class_order_to_cil(indent, pdb, map);
3261 if (rc != 0) {
3269 return rc;
3274 int rc = -1;
3316 rc = -1;
3319 rc = func_to_cil[sym](indent, pdb, block, decl_stack, key, datum, SCOPE_REQ);
3320 if (rc != 0) {
3328 return rc;
3334 int rc = -1;
3337 rc = func_to_cil[args->sym_index](args->indent, args->pdb, args->block, args->decl_stack, key, data, SCOPE_REQ);
3338 if (rc != 0) {
3345 return rc;
3350 int rc = -1;
3359 rc = hashtab_map(decl->symtab[args.sym_index].table, additive_scopes_to_cil_map, &args);
3360 if (rc != 0) {
3368 return rc;
3375 int rc = 0;
3410 rc = 1;
3415 return rc;
3420 int rc = -1;
3426 rc = list_init(&attr_list);
3427 if (rc != 0) {
3431 rc = typealiases_to_cil(indent, pdb, block, stack);
3432 if (rc != 0) {
3436 rc = declared_scopes_to_cil(indent, pdb, block, stack);
3437 if (rc != 0) {
3441 rc = required_scopes_to_cil(indent, pdb, block, stack);
3442 if (rc != 0) {
3446 rc = additive_scopes_to_cil(indent, pdb, block, stack);
3447 if (rc != 0) {
3451 rc = avrule_list_to_cil(indent, pdb, decl->avrules, attr_list);
3452 if (rc != 0) {
3456 rc = role_trans_to_cil(indent, pdb, decl->role_tr_rules);
3457 if (rc != 0) {
3461 rc = role_allows_to_cil(indent, pdb, decl->role_allow_rules);
3462 if (rc != 0) {
3466 rc = range_trans_to_cil(indent, pdb, decl->range_tr_rules);
3467 if (rc != 0) {
3471 rc = filename_trans_to_cil(indent, pdb, decl->filename_trans_rules);
3472 if (rc != 0) {
3476 rc = cond_list_to_cil(indent, pdb, decl->cond_list);
3477 if (rc != 0) {
3481 rc = cil_print_attr_list(indent, pdb, attr_list);
3482 if (rc != 0) {
3488 return rc;
3493 int rc = 0;
3524 rc = block_to_cil(pdb, block, stack, *indent);
3525 if (rc != 0) {
3530 return rc;
3535 int rc = 0;
3552 rc = hashtab_map(pdb->p_commons.table, common_to_cil, NULL);
3553 if (rc != 0) {
3557 rc = block_to_cil(pdb, block, stack, 0);
3558 if (rc != 0) {
3563 return rc;
3568 int rc = -1;
3573 rc = stack_init(&stack);
3574 if (rc != 0) {
3579 rc = global_block_to_cil(pdb, block, stack);
3580 if (rc != 0) {
3585 rc = module_block_to_cil(pdb, block, stack, &indent);
3586 if (rc != 0) {
3599 return rc;
3604 int rc = 0;
3622 rc = block_to_cil(pdb, block, stack, 0);
3623 if (rc != 0) {
3630 return rc;
3637 int rc = -1;
3641 rc = stack_init(&stack);
3642 if (rc != 0) {
3647 rc = global_block_to_cil(pdb, block, stack);
3648 if (rc != 0) {
3653 rc = linked_block_to_cil(pdb, block, stack);
3654 if (rc != 0) {
3662 return rc;
3667 int rc = -1;
3682 rc = -1;
3691 return rc;
3729 int rc = -1;
3740 rc = -1;
3757 return rc;
3762 int rc = -1;
3767 rc = 0;
3774 rc = -1;
3778 rc
3779 if (rc != 0) {
3788 rc = generate_default_level();
3789 if (rc != 0) {
3797 rc = generate_default_object();
3798 if (rc != 0) {
3803 rc = generate_gen_require_attribute();
3804 if (rc != 0) {
3809 rc = handle_unknown_to_cil(pdb);
3810 if (rc != 0) {
3815 rc = generate_mls(pdb);
3816 if (rc != 0) {
3821 rc = role_list_create(pdb->p_roles.table);
3822 if (rc != 0) {
3826 rc = typealias_list_create(pdb);
3827 if (rc != 0) {
3831 rc = polcaps_to_cil(pdb);
3832 if (rc != 0) {
3836 rc = ocontexts_to_cil(pdb);
3837 if (rc != 0) {
3841 rc = genfscon_to_cil(pdb);
3842 if (rc != 0) {
3848 rc = linked_blocks_to_cil(pdb);
3850 rc = blocks_to_cil(pdb);
3852 if (rc != 0) {
3856 rc = 0;
3862 return rc;
3867 int rc = -1;
3875 rc = -1;
3879 rc = sepol_module_policydb_to_cil(fp, &pdb->p, 0);
3880 if (rc != 0) {
3884 rc = seusers_to_cil(mod_pkg);
3885 if (rc != 0) {
3889 rc = netfilter_contexts_to_cil(mod_pkg);
3890 if (rc != 0) {
3894 rc = user_extra_to_cil(mod_pkg);
3895 if (rc != 0) {
3899 rc = file_contexts_to_cil(mod_pkg);
3900 if (rc != 0) {
3904 rc = 0;
3907 return rc;
3912 int rc = -1;
3921 rc = -1;
3932 rc = -1;
3940 rc = -1;
3951 return rc;
3956 int rc = -1;
3965 rc = sepol_policy_file_create(&pf);
3966 if (rc != 0) {
3973 rc = -1;
3981 rc = fp_to_buffer(fp, &data, &data_len);
3982 if (rc != 0) {
3991 rc = sepol_module_package_create(&pkg);
3992 if (rc != 0) {
3997 rc = sepol_module_package_read(pkg, pf, 0);
3998 if (rc != 0) {
4013 if (rc != 0) {
4017 return rc;