Lines Matching refs:rc
66 int rc;
75 rc = strcmp(DATUM(i->data)->fqn, DATUM(j->data)->fqn);
76 if (!rc) return rc;
84 int rc;
91 rc = strcmp(DATUM(a->sens)->fqn, DATUM(b->sens)->fqn);
92 if (rc != 0) return rc;
102 int rc;
109 rc = level_compare(a->low, b->low);
110 if (rc != 0) return rc;
120 int rc;
123 rc = strcmp(DATUM(a->user)->fqn, DATUM(b->user)->fqn);
124 if (rc != 0) return rc;
127 rc = strcmp(DATUM(a->role)->fqn, DATUM(b->role)->fqn);
128 if (rc != 0) return rc;
131 rc = strcmp(DATUM(a->type)->fqn, DATUM(b->type)->fqn);
132 if (rc != 0) return rc;
210 int rc = 0;
224 rc = -1;
226 rc = 1;
228 rc = -1;
230 rc = 1;
232 rc = -1;
234 rc = 1;
236 rc = -1;
238 rc = 1;
240 rc = strcmp(a_filecon->path_str, b_filecon->path_str);
248 return rc;
253 int rc = SEPOL_ERR;
257 rc = strcmp(aibpkeycon->subnet_prefix_str, bibpkeycon->subnet_prefix_str);
258 if (rc)
259 return rc;
261 rc = (aibpkeycon->pkey_high - aibpkeycon->pkey_low)
263 if (rc == 0) {
265 rc = -1;
267 rc = 1;
270 return rc;
275 int rc = SEPOL_ERR;
279 rc = (aportcon->port_high - aportcon->port_low)
281 if (rc == 0) {
283 rc = -1;
285 rc = 1;
287 rc = -1;
289 rc = 1;
293 return rc;
298 int rc = SEPOL_ERR;
302 rc = strcmp(agenfscon->fs_str, bgenfscon->fs_str);
303 if (rc == 0) {
304 rc = strcmp(agenfscon->path_str, bgenfscon->path_str);
307 return rc;
320 int rc = SEPOL_ERR;
325 rc = strcmp(aibendportcon->dev_name_str, bibendportcon->dev_name_str);
326 if (rc)
327 return rc;
334 return rc;
355 int rc = memcmp(&anodecon->mask->ip.v4, &bnodecon->mask->ip.v4, sizeof(anodecon->mask->ip.v4));
356 if (rc != 0) {
357 return -1 * rc;
361 int rc = memcmp(&anodecon->mask->ip.v6, &bnodecon->mask->ip.v6, sizeof(anodecon->mask->ip.v6));
362 if (rc != 0) {
363 return -1 * rc;
371 int rc = SEPOL_ERR;
376 rc = -1;
378 rc = 1;
380 rc = 0;
383 return rc;
388 int rc = SEPOL_ERR;
392 rc = (aiomemcon->iomem_high - aiomemcon->iomem_low)
394 if (rc == 0) {
396 rc = -1;
398 rc = 1;
402 return rc;
407 int rc = SEPOL_ERR;
411 rc = (aioportcon->ioport_high - aioportcon->ioport_low)
413 if (rc == 0) {
415 rc = -1;
417 rc = 1;
421 return rc;
426 int rc = SEPOL_ERR;
431 rc = -1;
433 rc = 1;
435 rc = 0;
438 return rc;
443 int rc = SEPOL_ERR;
447 rc = strcmp(adevicetreecon->path, bdevicetreecon->path);
449 return rc;
454 int rc;
460 rc = -1;
462 rc = 1;
464 rc = strcmp(afsuse->fs_str, bfsuse->fs_str);
466 return rc;
499 int rc;
502 rc = context_compare(a_netifcon->if_context, b_netifcon->if_context);
503 if (rc != 0) {
504 return rc;
876 int rc;
879 rc = __cil_expr_list_to_bitmap(attr->expr_list, attr->types, db->num_types, db);
880 if (rc != SEPOL_OK) {
886 return rc;
891 int rc = SEPOL_ERR;
899 rc = __evaluate_type_expression(attr, db);
900 if (rc != SEPOL_OK) goto exit;
923 return rc;
928 int rc;
931 rc = __cil_expr_list_to_bitmap(attr->expr_list, attr->users, db->num_users, db);
932 if (rc != SEPOL_OK) {
938 return rc;
943 int rc = SEPOL_ERR;
953 rc = __evaluate_user_expression(attr, db);
954 if (rc != SEPOL_OK) {
971 return rc;
976 int rc;
979 rc = __cil_expr_list_to_bitmap(attr->expr_list, attr->roles, db->num_roles, db);
980 if (rc != SEPOL_OK) {
986 return rc;
991 int rc = SEPOL_ERR;
999 rc = __evaluate_role_expression(attr, db);
1000 if (rc != SEPOL_OK) goto exit;
1015 return rc;
1020 int rc;
1025 rc = __cil_expr_to_bitmap(permx->expr_str, permx->perms, 0x10000, db); // max is one more than 0xFFFF
1026 if (rc != SEPOL_OK) {
1033 return rc;
1060 int rc = SEPOL_ERR;
1063 rc = __cil_permx_str_to_int((char*)datum, &val);
1064 if (rc != SEPOL_OK) {
1078 return rc;
1098 int rc = SEPOL_ERR;
1112 rc = __cil_expr_to_bitmap(cats->datum_expr, &bitmap, db->num_cats, db);
1113 if (rc != SEPOL_OK) {
1137 return rc;
1142 int rc = SEPOL_ERR;
1151 rc = __evaluate_cat_expression(catset->cats, db);
1152 if (rc != SEPOL_OK) goto exit;
1182 return rc;
1187 int rc = SEPOL_ERR;
1224 return rc;
1229 int rc = SEPOL_ERR;
1235 rc = __cil_permx_str_to_int(p1, &v1);
1236 if (rc != SEPOL_OK) {
1240 rc = __cil_permx_str_to_int(p2, &v2);
1241 if (rc != SEPOL_OK) {
1254 return rc;
1259 int rc = SEPOL_ERR;
1264 rc = __cil_type_to_bitmap(curr->data, bitmap, db);
1267 rc = __cil_role_to_bitmap(curr->data, bitmap, db);
1270 rc = __cil_user_to_bitmap(curr->data, bitmap, db);
1273 rc = __cil_perm_to_bitmap(curr->data, bitmap, db);
1276 rc = __cil_cat_to_bitmap(curr->data, bitmap, db);
1279 rc = SEPOL_ERR;
1284 rc = __cil_expr_to_bitmap(l, bitmap, max, db);
1285 if (rc != SEPOL_OK) {
1291 rc = __cil_permx_to_bitmap(curr->data, bitmap, db);
1294 return rc;
1299 int rc = SEPOL_ERR;
1315 rc = ebitmap_init_range(&tmp, 0, max - 1);
1316 if (rc != SEPOL_OK) {
1323 rc = __cil_cat_expr_range_to_bitmap_helper(curr->next, curr->next->next, &tmp);
1324 if (rc != SEPOL_OK) {
1329 rc = __cil_permissionx_expr_range_to_bitmap_helper(curr->next, curr->next->next, &tmp);
1330 if (rc != SEPOL_OK) {
1336 rc = SEPOL_ERR;
1340 rc = __cil_expr_to_bitmap_helper(curr->next, flavor, &b1, max, db);
1341 if (rc != SEPOL_OK) {
1347 rc = ebitmap_not(&tmp, &b1, max);
1349 if (rc != SEPOL_OK) {
1355 rc = __cil_expr_to_bitmap_helper(curr->next->next, flavor, &b2, max, db);
1356 if (rc != SEPOL_OK) {
1363 rc = ebitmap_or(&tmp, &b1, &b2);
1365 rc = ebitmap_and(&tmp, &b1, &b2);
1367 rc = ebitmap_xor(&tmp, &b1, &b2);
1369 rc = SEPOL_ERR;
1373 if (rc != SEPOL_OK) {
1383 rc = __cil_expr_to_bitmap_helper(curr, flavor, &b2, max, db);
1384 if (rc != SEPOL_OK) {
1390 rc = ebitmap_or(&tmp, &b1, &b2);
1393 if (rc != SEPOL_OK) {
1408 return rc;
1413 int rc = SEPOL_ERR;
1426 rc = __cil_expr_to_bitmap(l, &bitmap, max, db);
1427 if (rc != SEPOL_OK) {
1536 int rc = SEPOL_ERR;
1554 rc = __evaluate_type_expression(attr, db);
1555 if (rc != SEPOL_OK) goto exit;
1563 rc = __evaluate_role_expression(attr, db);
1564 if (rc != SEPOL_OK) goto exit;
1571 rc = __evaluate_permissionx_expression(rule->perms.x.permx, db);
1572 if (rc != SEPOL_OK) goto exit;
1578 rc = __evaluate_permissionx_expression(permx, db);
1579 if (rc != SEPOL_OK) goto exit;
1585 rc = __evaluate_user_expression(attr, db);
1586 if (rc != SEPOL_OK) {
1599 return rc;
1637 int rc = SEPOL_ERR;
1668 rc = __cil_role_assign_types(role, type_datum);
1669 if (rc != SEPOL_OK) {
1676 rc = __cil_role_assign_types(role, type_datum);
1677 if (rc != SEPOL_OK) {
1690 return rc;
1723 int rc = SEPOL_ERR;
1759 rc = __cil_user_assign_roles(user, role_datum);
1760 if (rc != SEPOL_OK) {
1767 rc = __cil_user_assign_roles(user, role_datum);
1768 if (rc != SEPOL_OK) {
1782 return rc;
1796 int rc = SEPOL_OK;
1799 rc = __evaluate_cat_expression(levelrange->low->cats, db);
1800 if (rc != SEPOL_OK) {
1805 rc = __evaluate_cat_expression(levelrange->high->cats, db);
1806 if (rc != SEPOL_OK) {
1812 return rc;
1817 int rc = SEPOL_ERR;
1834 rc = __evaluate_cat_expression(catset->cats, db);
1835 if (rc != SEPOL_OK) {
1842 rc = __evaluate_cat_expression(senscat->cats, db);
1843 if (rc != SEPOL_OK) {
1849 rc = __evaluate_level_expression(node->data, db);
1850 if (rc != SEPOL_OK) {
1856 rc = __evaluate_levelrange_expression(node->data, db);
1857 if (rc != SEPOL_OK) {
1864 rc = __evaluate_level_expression(user->dftlevel, db);
1865 if (rc != SEPOL_OK) {
1868 rc = __evaluate_levelrange_expression(user->range, db);
1869 if (rc != SEPOL_OK) {
1877 rc = __evaluate_levelrange_expression(selinuxuser->range, db);
1878 if (rc != SEPOL_OK) {
1885 rc = __evaluate_levelrange_expression(rangetrans->range, db);
1886 if (rc != SEPOL_OK) {
1893 rc = __evaluate_levelrange_expression(context->range, db);
1894 if (rc != SEPOL_OK) {
1901 rc = __evaluate_levelrange_expression(sidcontext->context->range, db);
1902 if (rc != SEPOL_OK) {
1910 rc = __evaluate_levelrange_expression(filecon->context->range, db);
1911 if (rc != SEPOL_OK) {
1920 rc = __evaluate_levelrange_expression(ibpkeycon->context->range, db);
1921 if (rc != SEPOL_OK)
1928 rc = __evaluate_levelrange_expression(ibendportcon->context->range, db);
1929 if (rc != SEPOL_OK)
1935 rc = __evaluate_levelrange_expression(portcon->context->range, db);
1936 if (rc != SEPOL_OK) {
1943 rc = __evaluate_levelrange_expression(nodecon->context->range, db);
1944 if (rc != SEPOL_OK) {
1951 rc = __evaluate_levelrange_expression(genfscon->context->range, db);
1952 if (rc != SEPOL_OK) {
1959 rc = __evaluate_levelrange_expression(netifcon->if_context->range, db);
1960 if (rc != SEPOL_OK) {
1963 rc = __evaluate_levelrange_expression(netifcon->packet_context->range, db);
1964 if (rc != SEPOL_OK) {
1971 rc = __evaluate_levelrange_expression(pirqcon->context->range, db);
1972 if (rc != SEPOL_OK) {
1979 rc = __evaluate_levelrange_expression(iomemcon->context->range, db);
1980 if (rc != SEPOL_OK) {
1987 rc = __evaluate_levelrange_expression(ioportcon->context->range, db);
1988 if (rc != SEPOL_OK) {
1995 rc = __evaluate_levelrange_expression(pcidevicecon->context->range, db);
1996 if (rc != SEPOL_OK) {
2003 rc = __evaluate_levelrange_expression(devicetreecon->context->range, db);
2004 if (rc != SEPOL_OK) {
2011 rc = __evaluate_levelrange_expression(fsuse->context->range, db);
2012 if (rc != SEPOL_OK) {
2024 return rc;
2052 int rc = SEPOL_ERR;
2061 rc = __cil_expr_to_bitmap(perms, &bitmap, num_perms, db);
2062 if (rc != SEPOL_OK) {
2083 return rc;
2088 int rc = SEPOL_ERR;
2098 rc = __evaluate_perm_expression(cp->perms, CIL_PERM, &class->perms, common_symtab, class->num_perms, &new_list, db);
2099 if (rc != SEPOL_OK) {
2114 return rc;
2119 int rc = SEPOL_ERR;
2126 rc = __evaluate_classperms(cp, db);
2127 if (rc != SEPOL_OK) {
2132 rc = __evaluate_classperms(cp, db);
2133 if (rc != SEPOL_OK) {
2138 rc = __evaluate_classperms_list(cmp->classperms, db);
2139 if (rc != SEPOL_OK) {
2147 rc = __evaluate_classperms_list(cp->classperms, db);
2148 if (rc != SEPOL_OK) {
2157 return rc;
2162 int rc;
2170 int rc = __evaluate_classperms_list(cmp->classperms, map_args->db);
2172 if (rc != SEPOL_OK) {
2173 map_args->rc = rc;
2184 map_args.rc = SEPOL_OK;
2187 return map_args.rc;
2192 int rc = SEPOL_ERR;
2207 rc = __evaluate_map_class(node->data, db);
2208 if (rc != SEPOL_OK) {
2215 rc = __evaluate_classperms_list(cp->classperms, db);
2216 if (rc != SEPOL_OK) {
2223 rc = __evaluate_classperms_list(avrule->perms.classperms, db);
2224 if (rc != SEPOL_OK) {
2232 rc = __evaluate_classperms_list(constrain->classperms, db);
2233 if (rc != SEPOL_OK) {
2245 return rc;
2273 int rc = SEPOL_OK;
2293 rc = SEPOL_ERR;
2322 return rc;
2327 int rc = SEPOL_ERR;
2329 rc = cil_tree_walk(db->ast->root, __cil_post_db_count_helper, NULL, NULL, db);
2330 if (rc != SEPOL_OK) {
2335 rc = cil_tree_walk(db->ast->root, __cil_post_db_array_helper, NULL, NULL, db);
2336 if (rc != SEPOL_OK) {
2341 rc = cil_tree_walk(db->ast->root, __cil_post_db_neverallow_attr_helper, NULL, NULL, db);
2342 if (rc != SEPOL_OK) {
2347 rc = cil_tree_walk(db->ast->root, __cil_post_db_attr_helper, NULL, NULL, db);
2348 if (rc != SEPOL_OK) {
2353 rc = cil_tree_walk(db->ast->root, __cil_post_db_roletype_helper, NULL, NULL, db);
2354 if (rc != SEPOL_OK) {
2359 rc = cil_tree_walk(db->ast->root, __cil_post_db_userrole_helper, NULL, NULL, db);
2360 if (rc != SEPOL_OK) {
2365 rc = cil_tree_walk(db->ast->root, __cil_post_db_classperms_helper, NULL, NULL, db);
2366 if (rc != SEPOL_OK) {
2371 rc = cil_tree_walk(db->ast->root, __cil_post_db_cat_helper, NULL, NULL, db);
2372 if (rc != SEPOL_OK) {
2377 rc = __cil_post_process_context_rules(db->netifcon, cil_post_netifcon_compare, cil_post_netifcon_context_compare, db, CIL_NETIFCON, CIL_KEY_NETIFCON);
2378 if (rc != SEPOL_OK) {
2383 rc = __cil_post_process_context_rules(db->genfscon, cil_post_genfscon_compare, cil_post_genfscon_context_compare, db, CIL_GENFSCON, CIL_KEY_GENFSCON);
2384 if (rc != SEPOL_OK) {
2389 rc = __cil_post_process_context_rules(db->ibpkeycon, cil_post_ibpkeycon_compare, cil_post_ibpkeycon_context_compare, db, CIL_IBPKEYCON, CIL_KEY_IBPKEYCON);
2390 if (rc != SEPOL_OK) {
2395 rc = __cil_post_process_context_rules(db->ibendportcon, cil_post_ibendportcon_compare, cil_post_ibendportcon_context_compare, db, CIL_IBENDPORTCON, CIL_KEY_IBENDPORTCON);
2396 if (rc != SEPOL_OK) {
2401 rc = __cil_post_process_context_rules(db->portcon, cil_post_portcon_compare, cil_post_portcon_context_compare, db, CIL_PORTCON, CIL_KEY_PORTCON);
2402 if (rc != SEPOL_OK) {
2407 rc = __cil_post_process_context_rules(db->nodecon, cil_post_nodecon_compare, cil_post_nodecon_context_compare, db, CIL_NODECON, CIL_KEY_NODECON);
2408 if (rc != SEPOL_OK) {
2413 rc = __cil_post_process_context_rules(db->fsuse, cil_post_fsuse_compare, cil_post_fsuse_context_compare, db, CIL_FSUSE, CIL_KEY_FSUSE);
2414 if (rc != SEPOL_OK) {
2419 rc = __cil_post_process_context_rules(db->filecon, cil_post_filecon_compare, cil_post_filecon_context_compare, db, CIL_FILECON, CIL_KEY_FILECON);
2420 if (rc != SEPOL_OK) {
2425 rc = __cil_post_process_context_rules(db->pirqcon, cil_post_pirqcon_compare, cil_post_pirqcon_context_compare, db, CIL_PIRQCON, CIL_KEY_IOMEMCON);
2426 if (rc != SEPOL_OK) {
2431 rc = __cil_post_process_context_rules(db->iomemcon, cil_post_iomemcon_compare, cil_post_iomemcon_context_compare, db, CIL_IOMEMCON, CIL_KEY_IOMEMCON);
2432 if (rc != SEPOL_OK) {
2437 rc = __cil_post_process_context_rules(db->ioportcon, cil_post_ioportcon_compare, cil_post_ioportcon_context_compare, db, CIL_IOPORTCON, CIL_KEY_IOPORTCON);
2438 if (rc != SEPOL_OK) {
2443 rc = __cil_post_process_context_rules(db->pcidevicecon, cil_post_pcidevicecon_compare, cil_post_pcidevicecon_context_compare, db, CIL_PCIDEVICECON, CIL_KEY_PCIDEVICECON);
2444 if (rc != SEPOL_OK) {
2449 rc = __cil_post_process_context_rules(db->devicetreecon, cil_post_devicetreecon_compare, cil_post_devicetreecon_context_compare, db, CIL_DEVICETREECON, CIL_KEY_DEVICETREECON);
2450 if (rc != SEPOL_OK) {
2456 return rc;
2461 int rc = SEPOL_ERR;
2481 rc = cil_tree_walk(db->ast->root, __cil_verify_helper, NULL, NULL, &extra_args);
2482 if (rc != SEPOL_OK) {
2506 rc = SEPOL_ERR;
2512 rc = SEPOL_ERR;
2518 return rc;
2523 int rc = SEPOL_ERR;
2528 rc = cil_tree_walk(db->ast->root, __cil_pre_verify_helper, NULL, NULL, &extra_args);
2529 if (rc != SEPOL_OK) {
2535 return rc;
2540 int rc = SEPOL_ERR;
2542 rc = cil_pre_verify(db);
2543 if (rc != SEPOL_OK) {
2548 rc = cil_post_db(db);
2549 if (rc != SEPOL_OK) {
2554 rc = cil_post_verify(db);
2555 if (rc != SEPOL_OK) {
2561 return rc;