Lines Matching defs:rc
60 int rc = SEPOL_ERR;
68 rc = __cil_verify_syntax(current, syntax, syntax_len);
69 if (rc != SEPOL_OK) {
82 return rc;
87 int rc = SEPOL_ERR;
90 rc = __cil_verify_name((const char*)key);
91 if (rc != SEPOL_OK) {
95 rc = cil_get_symtab(ast_node->parent, &symtab, sflavor);
96 if (rc != SEPOL_OK) {
104 rc = cil_symtab_insert(symtab, (hashtab_key_t)key, datum, ast_node);
105 if (rc == SEPOL_EEXIST) {
128 rc = SEPOL_ERR;
140 return rc;
164 int rc = SEPOL_ERR;
170 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
171 if (rc != SEPOL_OK) {
181 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)block, (hashtab_key_t)key, CIL_SYM_BLOCKS, CIL_BLOCK);
182 if (rc != SEPOL_OK) {
193 return rc;
218 int rc = SEPOL_ERR;
224 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
225 if (rc != SEPOL_OK) {
242 return rc;
263 int rc = SEPOL_ERR;
269 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
270 if (rc != SEPOL_OK) {
287 return rc;
308 int rc = SEPOL_ERR;
315 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
316 if (rc != SEPOL_OK) {
332 return rc;
358 int rc = SEPOL_ERR;
360 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
361 if (rc != SEPOL_OK) {
369 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)class, (hashtab_key_t)key, CIL_SYM_CLASSES, CIL_CLASS);
370 if (rc != SEPOL_OK) {
376 rc = cil_gen_perm_nodes(db, perms, ast_node, CIL_PERM, &class->num_perms);
377 if (rc != SEPOL_OK) {
389 return rc;
413 int rc = SEPOL_ERR;
419 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
420 if (rc != SEPOL_OK) {
426 rc = cil_fill_list(parse_current->next->cl_head, CIL_CLASSORDER, &classorder->class_list_str);
427 if (rc != SEPOL_OK) {
439 return rc;
459 int rc = SEPOL_ERR;
465 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)perm, (hashtab_key_t)key, CIL_SYM_PERMS, flavor);
466 if (rc != SEPOL_OK) {
478 return rc;
495 int rc = SEPOL_ERR;
501 rc = SEPOL_ERR;
509 rc = cil_gen_perm(db, current_perm, new_ast, flavor, num_perms);
510 if (rc != SEPOL_OK) {
528 return rc;
533 int rc = SEPOL_ERR;
540 rc = __cil_verify_syntax(start_perm->cl_head, syntax, syntax_len);
541 if (rc != SEPOL_OK) {
545 rc = cil_gen_expr(start_perm, CIL_PERM, perms);
546 if (rc != SEPOL_OK) {
554 return rc;
559 int rc = SEPOL_ERR;
567 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
568 if (rc != SEPOL_OK) {
576 rc = cil_fill_perms(parse_current->next, &(*cp)->perm_strs);
577 if (rc != SEPOL_OK) {
587 return rc;
619 int rc = SEPOL_ERR;
630 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
631 if (rc != SEPOL_OK) {
647 rc = cil_fill_classperms(curr, &new_cp);
648 if (rc != SEPOL_OK) {
654 rc = SEPOL_ERR;
663 return rc;
687 int rc = SEPOL_ERR;
701 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
702 if (rc != SEPOL_OK) {
710 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)cp, (hashtab_key_t)key, CIL_SYM_CLASSPERMSETS, CIL_CLASSPERMISSION);
711 if (rc != SEPOL_OK) {
722 return rc;
746 int rc = SEPOL_ERR;
760 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
761 if (rc != SEPOL_OK) {
769 rc = cil_fill_classperms_list(parse_current->next->next, &cps->classperms);
770 if (rc != SEPOL_OK) {
783 return rc;
808 int rc = SEPOL_ERR;
810 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
811 if (rc != SEPOL_OK) {
819 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)map, (hashtab_key_t)key, CIL_SYM_CLASSES, CIL_MAP_CLASS);
820 if (rc != SEPOL_OK) {
824 rc = cil_gen_perm_nodes(db, parse_current->next->next->cl_head, ast_node, CIL_MAP_PERM, &map->num_perms);
825 if (rc != SEPOL_OK) {
836 return rc;
841 int rc = SEPOL_ERR;
856 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
857 if (rc != SEPOL_OK) {
866 rc = cil_fill_classperms_list(parse_current->next->next->next, &mapping->classperms);
867 if (rc != SEPOL_OK) {
880 return rc;
906 int rc = SEPOL_ERR;
912 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
913 if (rc != SEPOL_OK) {
921 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)common, (hashtab_key_t)key, CIL_SYM_COMMONS, CIL_COMMON);
922 if (rc != SEPOL_OK) {
926 rc = cil_gen_perm_nodes(db, parse_current->next->next->cl_head, ast_node, CIL_PERM, &common->num_perms);
927 if (rc != SEPOL_OK) {
938 return rc;
952 int rc = SEPOL_ERR;
958 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
959 if (rc != SEPOL_OK) {
977 return rc;
1000 int rc = SEPOL_ERR;
1006 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1007 if (rc != SEPOL_OK) {
1015 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)sid, (hashtab_key_t)key, CIL_SYM_SIDS, CIL_SID);
1016 if (rc != SEPOL_OK) {
1027 return rc;
1050 int rc = SEPOL_ERR;
1056 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1057 if (rc != SEPOL_OK) {
1070 rc = cil_fill_context(parse_current->next->next->cl_head, sidcon->context);
1071 if (rc != SEPOL_OK) {
1085 return rc;
1110 int rc = SEPOL_ERR;
1116 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1117 if (rc != SEPOL_OK) {
1123 rc = cil_fill_list(parse_current->next->cl_head, CIL_SIDORDER, &sidorder->sid_list_str);
1124 if (rc != SEPOL_OK) {
1136 return rc;
1162 int rc = SEPOL_ERR;
1168 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1169 if (rc != SEPOL_OK) {
1177 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)user, (hashtab_key_t)key, CIL_SYM_USERS, CIL_USER);
1178 if (rc != SEPOL_OK) {
1189 return rc;
1213 int rc = SEPOL_ERR;
1219 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1220 if (rc != SEPOL_OK) {
1233 rc = cil_fill_level(parse_current->next->next->cl_head, usrlvl->level);
1234 if (rc != SEPOL_OK) {
1248 return rc;
1274 int rc = SEPOL_ERR;
1280 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1281 if (rc != SEPOL_OK) {
1294 rc = cil_fill_levelrange(parse_current->next->next->cl_head, userrange->range);
1295 if (rc != SEPOL_OK) {
1309 return rc;
1335 int rc = SEPOL_ERR;
1341 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1342 if (rc != SEPOL_OK) {
1359 return rc;
1382 int rc = SEPOL_ERR;
1388 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1389 if (rc != SEPOL_OK) {
1403 rc = cil_fill_levelrange(parse_current->next->next->next->cl_head, selinuxuser->range);
1404 if (rc != SEPOL_OK) {
1417 return rc;
1430 int rc = SEPOL_ERR;
1436 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1437 if (rc != SEPOL_OK) {
1451 rc = cil_fill_levelrange(parse_current->next->next->cl_head, selinuxuser->range);
1452 if (rc != SEPOL_OK) {
1465 return rc;
1491 int rc = SEPOL_ERR;
1497 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1498 if (rc != SEPOL_OK) {
1506 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)role, (hashtab_key_t)key, CIL_SYM_ROLES, CIL_ROLE);
1507 if (rc != SEPOL_OK) {
1518 return rc;
1543 int rc = SEPOL_ERR;
1549 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1550 if (rc != SEPOL_OK) {
1568 return rc;
1590 int rc = SEPOL_ERR;
1596 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1597 if (rc != SEPOL_OK) {
1615 return rc;
1639 int rc = SEPOL_ERR;
1645 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1646 if (rc != SEPOL_OK) {
1666 return rc;
1688 int rc = SEPOL_ERR;
1694 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1695 if (rc != SEPOL_OK) {
1713 return rc;
1735 int rc = SEPOL_ERR;
1741 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1742 if (rc != SEPOL_OK) {
1748 rc = SEPOL_ERR;
1755 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)attr, (hashtab_key_t)key, CIL_SYM_ROLES, CIL_ROLEATTRIBUTE);
1756 if (rc != SEPOL_OK) {
1766 return rc;
1805 int rc = SEPOL_ERR;
1811 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1812 if (rc != SEPOL_OK) {
1820 rc = cil_gen_expr(parse_current->next->next, CIL_ROLE, &attrset->str_expr);
1821 if (rc != SEPOL_OK) {
1834 return rc;
1860 int rc = SEPOL_ERR;
1866 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1867 if (rc != SEPOL_OK) {
1878 rc = cil_fill_classperms_list(parse_current->next->next->next, &rule->classperms);
1879 if (rc != SEPOL_OK) {
1892 return rc;
1918 int rc = SEPOL_ERR;
1924 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1925 if (rc != SEPOL_OK) {
1946 return rc;
1968 int rc = SEPOL_ERR;
1974 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
1975 if (rc != SEPOL_OK) {
1981 rc = SEPOL_ERR;
1988 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)type, (hashtab_key_t)key, CIL_SYM_TYPES, CIL_TYPE);
1989 if (rc != SEPOL_OK) {
2000 return rc;
2023 int rc = SEPOL_ERR;
2029 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2030 if (rc != SEPOL_OK) {
2036 rc = SEPOL_ERR;
2043 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)attr, (hashtab_key_t)key, CIL_SYM_TYPES, CIL_TYPEATTRIBUTE);
2044 if (rc != SEPOL_OK) {
2055 return rc;
2095 int rc = SEPOL_ERR;
2101 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2102 if (rc != SEPOL_OK) {
2116 rc = SEPOL_ERR;
2120 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)boolean, (hashtab_key_t)key, CIL_SYM_BOOLS, CIL_BOOL);
2121 if (rc != SEPOL_OK) {
2137 return rc;
2161 int rc = SEPOL_ERR;
2167 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2168 if (rc != SEPOL_OK) {
2182 rc = SEPOL_ERR;
2186 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)tunable, (hashtab_key_t)key, CIL_SYM_TUNABLES, CIL_TUNABLE);
2187 if (rc != SEPOL_OK) {
2198 return rc;
2229 int rc = SEPOL_ERR;
2239 rc = cil_verify_expr_syntax(current, op, flavor);
2240 if (rc != SEPOL_OK) {
2254 rc = __cil_fill_expr(current, flavor, expr, depth);
2255 if (rc != SEPOL_OK) {
2265 return rc;
2270 int rc = SEPOL_ERR;
2282 rc = __cil_fill_expr_helper(current->cl_head, flavor, sub_expr, depth);
2283 if (rc != SEPOL_OK) {
2292 return rc;
2298 int rc = SEPOL_ERR;
2304 rc = __cil_fill_expr(current, flavor, *expr, &depth);
2306 rc = __cil_fill_expr_helper(current->cl_head, flavor, *expr, &depth);
2309 if (rc != SEPOL_OK) {
2314 return rc;
2351 int rc = SEPOL_ERR;
2386 rc = cil_verify_constraint_leaf_expr_syntax(l_flavor, r_flavor, op, expr_flavor);
2387 if (rc != SEPOL_OK) {
2416 int rc = SEPOL_ERR;
2428 rc = SEPOL_ERR;
2434 rc = cil_verify_constraint_expr_syntax(current, op);
2435 if (rc != SEPOL_OK) {
2446 rc = __cil_fill_constraint_leaf_expr(current, flavor, op, expr);
2447 if (rc != SEPOL_OK) {
2452 rc = __cil_fill_constraint_expr(current->next->cl_head, flavor, &lexpr, depth);
2453 if (rc != SEPOL_OK) {
2461 rc = __cil_fill_constraint_expr(current->next->cl_head, flavor, &lexpr, depth);
2462 if (rc != SEPOL_OK) {
2465 rc = __cil_fill_constraint_expr(current->next->next->cl_head, flavor, &rexpr, depth);
2466 if (rc != SEPOL_OK) {
2481 return rc;
2486 int rc = SEPOL_ERR;
2493 rc = __cil_fill_constraint_expr(current->cl_head, flavor, expr, &depth);
2494 if (rc != SEPOL_OK) {
2503 return rc;
2519 int rc = SEPOL_ERR;
2525 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2526 if (rc != SEPOL_OK) {
2533 rc = cil_gen_expr(parse_current->next, CIL_BOOL, &bif->str_expr);
2534 if (rc != SEPOL_OK) {
2543 rc = SEPOL_ERR;
2552 rc = SEPOL_ERR;
2577 return rc;
2605 int rc = SEPOL_ERR;
2611 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2612 if (rc != SEPOL_OK) {
2618 rc = cil_gen_expr(parse_current->next, CIL_TUNABLE, &tif->str_expr);
2619 if (rc != SEPOL_OK) {
2627 rc = SEPOL_ERR;
2637 rc = SEPOL_ERR;
2657 return rc;
2680 int rc = SEPOL_ERR;
2687 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2688 if (rc != SEPOL_OK) {
2693 rc = SEPOL_ERR;
2711 return rc;
2735 int rc = SEPOL_ERR;
2741 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2742 if (rc != SEPOL_OK) {
2748 rc = SEPOL_ERR;
2756 rc = cil_flavor_to_symtab_index(flavor, &sym_index);
2757 if (rc != SEPOL_OK) {
2761 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)alias, (hashtab_key_t)key, sym_index, flavor);
2762 if (rc != SEPOL_OK) {
2773 return rc;
2790 int rc = SEPOL_ERR;
2804 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2805 if (rc != SEPOL_OK) {
2811 rc = SEPOL_ERR;
2830 return rc;
2852 int rc = SEPOL_ERR;
2858 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2859 if (rc != SEPOL_OK) {
2867 rc = cil_gen_expr(parse_current->next->next, CIL_TYPE, &attrset->str_expr);
2868 if (rc != SEPOL_OK) {
2880 return rc;
2904 int rc = SEPOL_ERR;
2910 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2911 if (rc != SEPOL_OK) {
2928 return rc;
2942 int rc = SEPOL_ERR;
2959 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
2960 if (rc != SEPOL_OK) {
3011 return rc;
3045 int rc = SEPOL_ERR;
3051 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3052 if (rc != SEPOL_OK) {
3069 rc = cil_fill_levelrange(parse_current->next->next->next->next->cl_head, rangetrans->range);
3070 if (rc != SEPOL_OK) {
3084 return rc;
3110 int rc = SEPOL_ERR;
3116 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3117 if (rc != SEPOL_OK) {
3125 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)sens, (hashtab_key_t)key, CIL_SYM_SENS, CIL_SENS);
3126 if (rc != SEPOL_OK) {
3137 return rc;
3163 int rc = SEPOL_ERR;
3169 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3170 if (rc != SEPOL_OK) {
3178 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)cat, (hashtab_key_t)key, CIL_SYM_CATS, CIL_CAT);
3179 if (rc != SEPOL_OK) {
3190 return rc;
3214 int rc = SEPOL_ERR;
3220 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3221 if (rc != SEPOL_OK) {
3229 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)catset, (hashtab_key_t)key, CIL_SYM_CATS, CIL_CATSET);
3230 if (rc != SEPOL_OK) {
3234 rc = cil_fill_cats(parse_current->next->next, &catset->cats);
3235 if (rc != SEPOL_OK) {
3246 return rc;
3271 int rc = SEPOL_ERR;
3277 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3278 if (rc != SEPOL_OK) {
3284 rc = cil_fill_list(parse_current->next->cl_head, CIL_CATORDER, &catorder->cat_list_str);
3285 if (rc != SEPOL_OK) {
3297 return rc;
3322 int rc = SEPOL_ERR;
3328 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3329 if (rc != SEPOL_OK) {
3335 rc = cil_fill_list(parse_current->next->cl_head, CIL_SENSITIVITYORDER, &sensorder->sens_list_str);
3336 if (rc != SEPOL_OK) {
3349 return rc;
3375 int rc = SEPOL_ERR;
3381 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3382 if (rc != SEPOL_OK) {
3390 rc = cil_fill_cats(parse_current->next->next, &senscat->cats);
3391 if (rc != SEPOL_OK) {
3404 return rc;
3429 int rc = SEPOL_ERR;
3435 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3436 if (rc != SEPOL_OK) {
3444 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)level, (hashtab_key_t)key, CIL_SYM_LEVELS, CIL_LEVEL);
3445 if (rc != SEPOL_OK) {
3449 rc = cil_fill_level(parse_current->next->next->cl_head, level);
3450 if (rc != SEPOL_OK) {
3461 return rc;
3486 int rc = SEPOL_ERR;
3492 rc = __cil_verify_syntax(low, syntax, syntax_len);
3493 if (rc != SEPOL_OK) {
3502 rc = cil_fill_level(low->cl_head, lvlrange->low);
3503 if (rc != SEPOL_OK) {
3512 rc = cil_fill_level(low->next->cl_head, lvlrange->high);
3513 if (rc != SEPOL_OK) {
3522 return rc;
3536 int rc = SEPOL_ERR;
3542 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3543 if (rc != SEPOL_OK) {
3551 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)lvlrange, (hashtab_key_t)key, CIL_SYM_LEVELRANGES, CIL_LEVELRANGE);
3552 if (rc != SEPOL_OK) {
3556 rc = cil_fill_levelrange(parse_current->next->next->cl_head, lvlrange);
3557 if (rc != SEPOL_OK) {
3568 return rc;
3600 int rc = SEPOL_ERR;
3606 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3607 if (rc != SEPOL_OK) {
3613 rc = cil_fill_classperms_list(parse_current->next, &cons->classperms);
3614 if (rc != SEPOL_OK) {
3618 rc = cil_gen_constraint_expr(parse_current->next->next, flavor, &cons->str_expr);
3619 if (rc != SEPOL_OK) {
3632 return rc;
3658 int rc = SEPOL_ERR;
3664 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3665 if (rc != SEPOL_OK) {
3673 rc = cil_gen_constraint_expr(parse_current->next->next, flavor, &validtrans->str_expr);
3674 if (rc != SEPOL_OK) {
3687 return rc;
3715 int rc = SEPOL_ERR;
3721 rc = __cil_verify_syntax(user_node, syntax, syntax_len);
3722 if (rc != SEPOL_OK) {
3737 rc = cil_fill_levelrange(user_node->next->next->next->cl_head, context->range);
3738 if (rc != SEPOL_OK) {
3747 return rc;
3761 int rc = SEPOL_ERR;
3767 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3768 if (rc != SEPOL_OK) {
3776 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)context, (hashtab_key_t)key, CIL_SYM_CONTEXTS, CIL_CONTEXT);
3777 if (rc != SEPOL_OK) {
3781 rc = cil_fill_context(parse_current->next->next->cl_head, context);
3782 if (rc != SEPOL_OK) {
3821 int rc = SEPOL_ERR;
3829 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3830 if (rc != SEPOL_OK) {
3857 rc = SEPOL_ERR;
3869 rc = cil_fill_context(parse_current->next->next->next->cl_head, filecon->context);
3870 if (rc != SEPOL_OK) {
3885 return rc;
3912 int rc = SEPOL_ERR;
3920 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
3921 if (rc != SEPOL_OK) {
3934 rc = SEPOL_ERR;
3941 rc = cil_fill_integer(parse_current->next->next->cl_head, &portcon->port_low);
3942 if (rc != SEPOL_OK) {
3946 rc = cil_fill_integer(parse_current->next->next->cl_head->next, &portcon->port_high);
3947 if (rc != SEPOL_OK) {
3953 rc = SEPOL_ERR;
3957 rc = cil_fill_integer(parse_current->next->next, &portcon->port_low);
3958 if (rc != SEPOL_OK) {
3970 rc = cil_fill_context(parse_current->next->next->next->cl_head, portcon->context);
3971 if (rc != SEPOL_OK) {
3985 return rc;
4011 int rc = SEPOL_ERR;
4018 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4019 if (rc != SEPOL_OK) {
4030 rc = cil_fill_ipaddr(parse_current->next->cl_head, nodecon->addr);
4031 if (rc != SEPOL_OK) {
4041 rc = cil_fill_ipaddr(parse_current->next->next->cl_head, nodecon->mask);
4042 if (rc != SEPOL_OK) {
4052 rc = cil_fill_context(parse_current->next->next->next->cl_head, nodecon->context);
4053 if (rc != SEPOL_OK) {
4067 return rc;
4101 int rc = SEPOL_ERR;
4108 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4109 if (rc != SEPOL_OK) {
4123 rc = cil_fill_context(parse_current->next->next->next->cl_head, genfscon->context);
4124 if (rc != SEPOL_OK) {
4165 int rc = SEPOL_ERR;
4172 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4173 if (rc != SEPOL_OK) {
4186 rc
4187 if (rc != SEPOL_OK) {
4197 rc = cil_fill_context(parse_current->next->next->next->cl_head, netifcon->packet_context);
4198 if (rc != SEPOL_OK) {
4241 int rc = SEPOL_ERR;
4248 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4249 if (rc != SEPOL_OK) {
4255 rc = cil_fill_integer(parse_current->next, &pirqcon->pirq);
4256 if (rc != SEPOL_OK) {
4265 rc = cil_fill_context(parse_current->next->next->cl_head, pirqcon->context);
4266 if (rc != SEPOL_OK) {
4280 return rc;
4305 int rc = SEPOL_ERR;
4312 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4313 if (rc != SEPOL_OK) {
4322 rc = cil_fill_integer64(parse_current->next->cl_head, &iomemcon->iomem_low);
4323 if (rc != SEPOL_OK) {
4327 rc = cil_fill_integer64(parse_current->next->cl_head->next, &iomemcon->iomem_high);
4328 if (rc != SEPOL_OK) {
4334 rc = SEPOL_ERR;
4338 rc = cil_fill_integer64(parse_current->next, &iomemcon->iomem_low);;
4339 if (rc != SEPOL_OK) {
4351 rc = cil_fill_context(parse_current->next->next->cl_head, iomemcon->context);
4352 if (rc != SEPOL_OK) {
4366 return rc;
4391 int rc = SEPOL_ERR;
4398 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4399 if (rc != SEPOL_OK) {
4408 rc = cil_fill_integer(parse_current->next->cl_head, &ioportcon->ioport_low);
4409 if (rc != SEPOL_OK) {
4413 rc = cil_fill_integer(parse_current->next->cl_head->next, &ioportcon->ioport_high);
4414 if (rc != SEPOL_OK) {
4420 rc = SEPOL_ERR;
4424 rc = cil_fill_integer(parse_current->next, &ioportcon->ioport_low);
4425 if (rc != SEPOL_OK) {
4437 rc = cil_fill_context(parse_current->next->next->cl_head, ioportcon->context);
4438 if (rc != SEPOL_OK) {
4452 return rc;
4477 int rc = SEPOL_ERR;
4484 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4485 if (rc != SEPOL_OK) {
4491 rc = cil_fill_integer(parse_current->next, &pcidevicecon->dev);
4492 if (rc != SEPOL_OK) {
4501 rc = cil_fill_context(parse_current->next->next->cl_head, pcidevicecon->context);
4502 if (rc != SEPOL_OK) {
4516 return rc;
4541 int rc = SEPOL_ERR;
4548 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4549 if (rc != SEPOL_OK) {
4562 rc = cil_fill_context(parse_current->next->next->cl_head, devicetreecon->context);
4563 if (rc != SEPOL_OK) {
4577 return rc;
4605 int rc = SEPOL_ERR;
4611 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4612 if (rc != SEPOL_OK) {
4638 rc = cil_fill_context(parse_current->next->next->next->cl_head, fsuse->context);
4639 if (rc != SEPOL_OK) {
4680 int rc = SEPOL_ERR;
4697 rc =__cil_verify_syntax(parse_current, syntax, syntax_len);
4698 if (rc != SEPOL_OK) {
4717 rc =__cil_verify_syntax(current_item->cl_head, param_syntax, param_syntax_len);
4718 if (rc != SEPOL_OK) {
4767 rc = __cil_verify_name(param->str);
4768 if (rc != SEPOL_OK) {
4800 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)macro, (hashtab_key_t)key, CIL_SYM_BLOCKS, CIL_MACRO);
4801 if (rc != SEPOL_OK) {
4841 int rc
4847 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4848 if (rc != SEPOL_OK) {
4870 return rc;
4948 int rc = SEPOL_ERR;
4954 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
4955 if (rc != SEPOL_OK) {
4963 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)optional, (hashtab_key_t)key, CIL_SYM_BLOCKS, CIL_OPTIONAL);
4964 if (rc != SEPOL_OK)
4974 return rc;
4997 int rc = SEPOL_ERR;
5003 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
5004 if (rc != SEPOL_OK) {
5012 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)polcap, (hashtab_key_t)key, CIL_SYM_POLICYCAPS, CIL_POLICYCAP);
5013 if (rc != SEPOL_OK)
5023 return rc;
5047 int rc = SEPOL_ERR;
5053 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
5054 if (rc != SEPOL_OK) {
5062 rc = cil_fill_ipaddr(parse_current->next->next, ipaddr);
5063 if (rc != SEPOL_OK) {
5067 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)ipaddr, (hashtab_key_t)key, CIL_SYM_IPADDRS, CIL_IPADDR);
5068 if (rc != SEPOL_OK) {
5079 return rc;
5094 int rc = SEPOL_ERR;
5105 rc = SEPOL_ERR;
5115 return rc;
5120 int rc = SEPOL_ERR;
5131 rc = SEPOL_ERR;
5141 return rc;
5146 int rc = SEPOL_ERR;
5162 rc = inet_pton(addr->family, addr_node->data, &addr->ip);
5163 if (rc != 1) {
5164 rc = SEPOL_ERR;
5172 return rc;
5177 int rc = SEPOL_ERR;
5189 rc = __cil_verify_syntax(curr, syntax, syntax_len);
5190 if (rc != SEPOL_OK) {
5196 rc = cil_fill_cats(curr->next, &level->cats);
5197 if (rc != SEPOL_OK) {
5206 return rc;
5211 int rc = SEPOL_ERR;
5215 rc = cil_gen_expr(curr, CIL_CAT, &(*cats)->str_expr);
5216 if (rc != SEPOL_OK) {
5220 return rc;
5245 int rc = SEPOL_ERR;
5251 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
5252 if (rc != SEPOL_OK) {
5283 return rc;
5297 int rc = SEPOL_ERR;
5308 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
5309 if (rc != SEPOL_OK) {
5320 rc = SEPOL_OK;
5322 rc = cil_fill_list(parse_current->next->cl_head, CIL_CLASS, &def->class_strs);
5332 rc = SEPOL_ERR;
5345 return rc;
5363 int rc = SEPOL_ERR;
5376 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
5377 if (rc != SEPOL_OK) {
5386 rc = SEPOL_OK;
5388 rc = cil_fill_list(parse_current->next->cl_head, CIL_CLASS, &def->class_strs);
5402 rc = SEPOL_ERR;
5414 rc = SEPOL_ERR;
5419 rc = SEPOL_ERR;
5432 return rc;
5450 int rc = SEPOL_ERR;
5464 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
5465 if (rc != SEPOL_OK) {
5480 rc = SEPOL_ERR;
5493 return rc;
5503 int rc = SEPOL_ERR;
5516 rc = __cil_verify_syntax(parse_current, syntax, syntax_len);
5517 if (rc != SEPOL_OK) {
5529 rc = SEPOL_ERR;
5542 return rc;
5560 int rc = SEPOL_ERR;
5576 rc = SEPOL_OK;
5582 rc
5591 rc = SEPOL_ERR;
5599 rc = SEPOL_ERR;
5607 rc = SEPOL_ERR;
5625 rc = SEPOL_ERR;
5641 rc = SEPOL_ERR;
5651 rc = SEPOL_ERR;
5666 rc = cil_gen_block(db, parse_current, ast_node, 0);
5668 rc = cil_gen_blockinherit(db, parse_current, ast_node);
5670 rc = cil_gen_blockabstract(db, parse_current, ast_node);
5672 rc = cil_gen_in(db, parse_current, ast_node);
5674 rc = cil_gen_class(db, parse_current, ast_node);
5678 rc = cil_gen_classorder(db, parse_current, ast_node);
5681 rc = cil_gen_map_class(db, parse_current, ast_node);
5684 rc = cil_gen_classmapping(db, parse_current, ast_node);
5687 rc = cil_gen_classpermission(db, parse_current, ast_node);
5690 rc = cil_gen_classpermissionset(db, parse_current, ast_node);
5693 rc = cil_gen_common(db, parse_current, ast_node);
5696 rc = cil_gen_classcommon(db, parse_current, ast_node);
5698 rc = cil_gen_sid(db, parse_current, ast_node);
5701 rc = cil_gen_sidcontext(db, parse_current, ast_node);
5704 rc = cil_gen_sidorder(db, parse_current, ast_node);
5707 rc = cil_gen_user(db, parse_current, ast_node);
5709 rc = cil_gen_userlevel(db, parse_current, ast_node);
5712 rc = cil_gen_userrange(db, parse_current, ast_node);
5715 rc = cil_gen_bounds(db, parse_current, ast_node, CIL_USER);
5717 rc = cil_gen_userprefix(db, parse_current, ast_node);
5719 rc = cil_gen_selinuxuser(db, parse_current, ast_node);
5722 rc = cil_gen_selinuxuserdefault(db, parse_current, ast_node);
5725 rc = cil_gen_type(db, parse_current, ast_node);
5727 rc = cil_gen_typeattribute(db, parse_current, ast_node);
5729 rc = cil_gen_typeattributeset(db, parse_current, ast_node);
5732 rc = cil_gen_alias(db, parse_current, ast_node, CIL_TYPEALIAS);
5734 rc = cil_gen_aliasactual(db, parse_current, ast_node, CIL_TYPEALIASACTUAL);
5736 rc = cil_gen_bounds(db, parse_current, ast_node, CIL_TYPE);
5738 rc = cil_gen_typepermissive(db, parse_current, ast_node);
5740 rc = cil_gen_rangetransition(db, parse_current, ast_node);
5743 rc = cil_gen_role(db, parse_current, ast_node);
5745 rc = cil_gen_userrole(db, parse_current, ast_node);
5747 rc = cil_gen_roletype(db, parse_current, ast_node);
5749 rc = cil_gen_roletransition(parse_current, ast_node);
5751 rc = cil_gen_roleallow(db, parse_current, ast_node);
5753 rc = cil_gen_roleattribute(db, parse_current, ast_node);
5755 rc = cil_gen_roleattributeset(db, parse_current, ast_node);
5758 rc = cil_gen_bounds(db, parse_current, ast_node, CIL_ROLE);
5760 rc = cil_gen_bool(db, parse_current, ast_node, CIL_FALSE);
5762 rc = cil_gen_boolif(db, parse_current, ast_node, CIL_FALSE);
5765 rc = cil_gen_bool(db, parse_current, ast_node, CIL_TRUE);
5767 rc = cil_gen_tunable(db, parse_current, ast_node);
5771 rc = cil_gen_boolif(db, parse_current, ast_node, CIL_TRUE);
5773 rc = cil_gen_tunif(db, parse_current, ast_node);
5776 rc = cil_gen_condblock(db, parse_current, ast_node, CIL_CONDTRUE);
5778 rc = cil_gen_condblock(db, parse_current, ast_node, CIL_CONDFALSE);
5780 rc = cil_gen_avrule(parse_current, ast_node, CIL_AVRULE_ALLOWED);
5784 rc = cil_gen_avrule(parse_current, ast_node, CIL_AVRULE_AUDITALLOW);
5787 rc = cil_gen_avrule(parse_current, ast_node, CIL_AVRULE_DONTAUDIT);
5790 rc = cil_gen_avrule(parse_current, ast_node, CIL_AVRULE_NEVERALLOW);
5793 rc = cil_gen_typetransition(db, parse_current, ast_node);
5795 rc = cil_gen_type_rule(parse_current, ast_node, CIL_TYPE_CHANGE);
5797 rc = cil_gen_type_rule(parse_current, ast_node, CIL_TYPE_MEMBER);
5799 rc = cil_gen_sensitivity(db, parse_current, ast_node);
5801 rc = cil_gen_alias(db, parse_current, ast_node, CIL_SENSALIAS);
5803 rc = cil_gen_aliasactual(db, parse_current, ast_node, CIL_SENSALIASACTUAL);
5805 rc = cil_gen_category(db, parse_current, ast_node);
5807 rc = cil_gen_alias(db, parse_current, ast_node, CIL_CATALIAS);
5809 rc = cil_gen_aliasactual(db, parse_current, ast_node, CIL_CATALIASACTUAL);
5811 rc = cil_gen_catset(db, parse_current, ast_node);
5814 rc = cil_gen_catorder(db, parse_current, ast_node);
5817 rc = cil_gen_sensitivityorder(db, parse_current, ast_node);
5820 rc = cil_gen_senscat(db, parse_current, ast_node);
5823 rc = cil_gen_level(db, parse_current, ast_node);
5826 rc = cil_gen_levelrange(db, parse_current, ast_node);
5829 rc = cil_gen_constrain(db, parse_current, ast_node, CIL_CONSTRAIN);
5832 rc = cil_gen_constrain(db, parse_current, ast_node, CIL_MLSCONSTRAIN);
5835 rc = cil_gen_validatetrans(db, parse_current, ast_node, CIL_VALIDATETRANS);
5838 rc = cil_gen_validatetrans(db, parse_current, ast_node, CIL_MLSVALIDATETRANS);
5841 rc = cil_gen_context(db, parse_current, ast_node);
5844 rc = cil_gen_filecon(db, parse_current, ast_node);
5847 rc = cil_gen_portcon(db, parse_current, ast_node);
5850 rc = cil_gen_nodecon(db, parse_current, ast_node);
5853 rc = cil_gen_genfscon(db, parse_current, ast_node);
5856 rc = cil_gen_netifcon(db, parse_current, ast_node);
5859 rc = cil_gen_pirqcon(db, parse_current, ast_node);
5862 rc = cil_gen_iomemcon(db, parse_current, ast_node);
5865 rc = cil_gen_ioportcon(db, parse_current, ast_node);
5868 rc = cil_gen_pcidevicecon(db, parse_current, ast_node);
5871 rc = cil_gen_devicetreecon(db, parse_current, ast_node);
5874 rc = cil_gen_fsuse(db, parse_current, ast_node);
5877 rc = cil_gen_macro(db, parse_current, ast_node);
5879 rc = cil_gen_call(db, parse_current, ast_node);
5882 rc = cil_gen_policycap(db, parse_current, ast_node);
5885 rc = cil_gen_optional(db, parse_current, ast_node);
5887 rc = cil_gen_ipaddr(db, parse_current, ast_node);
5889 rc = cil_gen_default(parse_current, ast_node, CIL_DEFAULTUSER);
5892 rc = cil_gen_default(parse_current, ast_node, CIL_DEFAULTROLE);
5895 rc = cil_gen_default(parse_current, ast_node, CIL_DEFAULTTYPE);
5898 rc = cil_gen_defaultrange(parse_current, ast_node);
5901 rc = cil_gen_handleunknown(parse_current, ast_node);
5904 rc = cil_gen_mls(parse_current, ast_node);
5908 rc = SEPOL_ERR;
5911 if (rc == SEPOL_OK) {
5941 return rc;
5946 int rc = SEPOL_ERR;
5958 rc = SEPOL_OK;
5990 return rc;
5995 int rc = SEPOL_ERR;
6009 rc = cil_tree_walk(parse_tree, __cil_build_ast_node_helper, NULL, __cil_build_ast_last_child_helper, &extra_args);
6010 if (rc != SEPOL_OK) {
6017 return rc;