Home
last modified time | relevance | path

Searched refs:p_types (Results 1 – 21 of 21) sorted by relevance

/third_party/selinux/libsepol/tests/
Dtest-expander-attr-map.c94 …CU_ASSERT(!hashtab_search((&base_expanded2)->p_types.table, "attr_check_base_optional_disabled_5")… in test_expander_attr_mapping()
95 …CU_ASSERT(!hashtab_search((&base_expanded2)->p_types.table, "attr_check_base_optional_disabled_5_1… in test_expander_attr_mapping()
96 …CU_ASSERT(!hashtab_search((&base_expanded2)->p_types.table, "attr_check_base_optional_disabled_5_2… in test_expander_attr_mapping()
97 …CU_ASSERT(!hashtab_search((&base_expanded2)->p_types.table, "attr_check_base_optional_disabled_8")… in test_expander_attr_mapping()
98 …CU_ASSERT(!hashtab_search((&base_expanded2)->p_types.table, "attr_check_base_optional_disabled_8_1… in test_expander_attr_mapping()
99 …CU_ASSERT(!hashtab_search((&base_expanded2)->p_types.table, "attr_check_base_optional_disabled_8_2… in test_expander_attr_mapping()
100 CU_ASSERT(!hashtab_search((&base_expanded2)->p_types.table, "attr_check_mod_optional_disabled_4")); in test_expander_attr_mapping()
101 …CU_ASSERT(!hashtab_search((&base_expanded2)->p_types.table, "attr_check_mod_optional_disabled_4_1_… in test_expander_attr_mapping()
102 …CU_ASSERT(!hashtab_search((&base_expanded2)->p_types.table, "attr_check_mod_optional_disabled_4_2_… in test_expander_attr_mapping()
103 CU_ASSERT(!hashtab_search((&base_expanded2)->p_types.table, "attr_check_mod_optional_disabled_7")); in test_expander_attr_mapping()
[all …]
Dtest-common.c158 type = hashtab_search(p->p_types.table, id); in test_alias_datum()
159 primary = hashtab_search(p->p_types.table, primary_id); in test_alias_datum()
235 attr = hashtab_search(decl->p_types.table, id); in test_attr_types()
239 attr = hashtab_search(p->p_types.table, id); in test_attr_types()
Dtest-linker-types.c108 type = hashtab_search(p->p_types.table, id); in test_type_datum()
117 type = hashtab_search(p->decl_val_to_struct[decls[i] - 1]->p_types.table, id); in test_type_datum()
/third_party/selinux/libsepol/src/
Doptimize.c100 struct type_vec *map = calloc(p->p_types.nprim, sizeof(*map)); in build_type_map()
104 for (i = 0; i < p->p_types.nprim; i++) { in build_type_map()
120 for (k = 0; k < p->p_types.nprim; k++) { in build_type_map()
146 for (i = 0; i < p->p_types.nprim; i++) in destroy_type_map()
Dlink.c453 base_type = hashtab_search(state->base->p_types.table, id); in type_copy_callback()
492 new_type->s.value = state->base->p_types.nprim + 1; in type_copy_callback()
494 ret = hashtab_insert(state->base->p_types.table, in type_copy_callback()
500 state->base->p_types.nprim++; in type_copy_callback()
517 (state->dest_decl->p_types.table, new_id, new_type)) { in type_copy_callback()
520 state->dest_decl->p_types.nprim++; in type_copy_callback()
775 dest = hashtab_search(state->base->p_types.table, key); in type_bounds_copy_callback()
882 target_type = hashtab_search(state->base->p_types.table, target_id); in alias_copy_callback()
897 base_type = hashtab_search(state->base->p_types.table, id); in alias_copy_callback()
910 new_type->s.value = state->base->p_types.nprim + 1; in alias_copy_callback()
[all …]
Dexpand.c147 new_type->s.value = ++state->out->p_types.nprim; in type_copy_callback()
157 ret = hashtab_insert(state->out->p_types.table, in type_copy_callback()
199 new_type = hashtab_search(state->out->p_types.table, id); in attr_convert_callback()
579 dest = hashtab_search(state->out->p_types.table, (char *)key); in type_bounds_copy_callback()
716 ret = hashtab_insert(state->out->p_types.table, in alias_copy_callback()
2549 if (i >= p->p_types.nprim) in type_set_expand()
2589 for (i = 0; i < p->p_types.nprim; i++) { in type_set_expand()
2608 for (i = 0; i < p->p_types.nprim; i++) { in type_set_expand()
3012 (uint32_t *) calloc(state.base->p_types.nprim, in expand_module()
3039 if (hashtab_map(state.base->p_types.table, type_copy_callback, &state)) { in expand_module()
[all …]
Dkernel_to_cil.c1235 rc = strs_init(&strs, pdb->p_types.nprim); in write_type_attributes_to_cil()
1240 for (i=0; i < pdb->p_types.nprim; i++) { in write_type_attributes_to_cil()
1365 rc = strs_init(&strs, pdb->p_types.nprim); in write_type_decl_rules_to_cil()
1370 for (i=0; i < pdb->p_types.nprim; i++) { in write_type_decl_rules_to_cil()
1434 rc = hashtab_map(pdb->p_types.table, map_count_type_aliases, &num); in write_type_alias_rules_to_cil()
1444 rc = hashtab_map(pdb->p_types.table, map_type_aliases_to_strs, strs); in write_type_alias_rules_to_cil()
1466 alias = hashtab_search(pdb->p_types.table, name); in write_type_alias_rules_to_cil()
1494 rc = strs_init(&strs, pdb->p_types.nprim); in write_type_bounds_rules_to_cil()
1499 for (i=0; i < pdb->p_types.nprim; i++) { in write_type_bounds_rules_to_cil()
1520 type = hashtab_search(pdb->p_types.table, child); in write_type_bounds_rules_to_cil()
[all …]
Dkernel_to_conf.c1218 rc = strs_init(&strs, pdb->p_types.nprim); in write_type_attributes_to_conf()
1223 for (i=0; i < pdb->p_types.nprim; i++) { in write_type_attributes_to_conf()
1348 rc = strs_init(&strs, pdb->p_types.nprim); in write_type_decl_rules_to_conf()
1353 for (i=0; i < pdb->p_types.nprim; i++) { in write_type_decl_rules_to_conf()
1417 rc = hashtab_map(pdb->p_types.table, map_count_type_aliases, &num); in write_type_alias_rules_to_conf()
1427 rc = hashtab_map(pdb->p_types.table, map_type_aliases_to_strs, strs); in write_type_alias_rules_to_conf()
1440 alias = hashtab_search(pdb->p_types.table, name); in write_type_alias_rules_to_conf()
1468 rc = strs_init(&strs, pdb->p_types.nprim); in write_type_bounds_rules_to_conf()
1473 for (i=0; i < pdb->p_types.nprim; i++) { in write_type_bounds_rules_to_conf()
1494 type = hashtab_search(pdb->p_types.table, child); in write_type_bounds_rules_to_conf()
[all …]
Dcontext.c50 if (!c->type || c->type > p->p_types.nprim) in context_is_valid()
186 typdatum = (type_datum_t *) hashtab_search(policydb->p_types.table, in context_from_record()
Dpolicydb_validate.c58 if (validate_init(&flavors[SYM_TYPES], p->p_type_val_to_name, p->p_types.nprim)) in validate_array_init()
66 flavors[SYM_TYPES].nprim = p->p_types.nprim; in validate_array_init()
703 for (i = 0; i < p->p_types.nprim; i++) { in validate_datum_array_gaps()
747 if (hashtab_map(p->p_types.table, validate_type_datum_wrapper, &margs)) in validate_datum_array_entries()
1418 for (i = 0; i < p->p_types.nprim; i++) { in validate_typeattr_map()
Dpolicydb.c1062 if (!value_isvalid(typdatum->s.value, p->p_types.nprim)) in type_index()
1233 p->p_users.nprim, p->p_roles.nprim, p->p_types.nprim, in policydb_index_others()
1263 calloc(p->p_types.nprim, sizeof(type_datum_t *)); in policydb_index_others()
1574 for (i = 0; i < p->p_types.nprim; i++) { in policydb_destroy()
1581 for (i = 0; i < p->p_types.nprim; i++) { in policydb_destroy()
3643 if (!value_isvalid(rt->source_type, p->p_types.nprim)) in range_read()
3646 if (!value_isvalid(rt->target_type, p->p_types.nprim)) in range_read()
4541 p->type_attr_map = calloc(p->p_types.nprim, sizeof(ebitmap_t)); in policydb_read()
4542 p->attr_type_map = calloc(p->p_types.nprim, sizeof(ebitmap_t)); in policydb_read()
4545 for (i = 0; i < p->p_types.nprim; i++) { in policydb_read()
[all …]
Dhierarchy.c496 rc = hashtab_map(p->p_types.table, bounds_check_type_callback, &args); in bounds_check_types()
656 rc = hashtab_map(p->p_types.table, hierarchy_add_type_callback, &args); in add_hierarchy_callback_template()
Dmodule_to_cil.c400 rc = hashtab_map(pdb->p_types.table, typealiases_gather_map, pdb); in typealias_list_create()
3408 alias_datum = hashtab_search(pdb->p_types.table, alias_name); in typealiases_to_cil()
Dservices.c1651 hashtab_search(args->newp->p_types.table, in convert_context()
Dwrite.c2410 for (i = 0; i < p->p_types.nprim; i++) { in policydb_write()
/third_party/selinux/checkpolicy/
Dcheckpolicy.c241 type_rules = malloc(sizeof(struct avtab_node) * policydb.p_types.nprim); in identify_equiv_types()
247 sizeof(struct avtab_node) * policydb.p_types.nprim); in identify_equiv_types()
254 for (i = 0; i < policydb.p_types.nprim - 1; i++) { in identify_equiv_types()
257 for (j = i + 1; j < policydb.p_types.nprim; j++) { in identify_equiv_types()
Dpolicy_define.c228 t = hashtab_search(policydbp->p_types.table, type); in define_permissive()
1172 attr = hashtab_search(policydbp->p_types.table, id); in expand_attrib()
1204 attr = hashtab_search(policydbp->p_types.table, in expand_attrib()
1309 t = hashtab_search(policydbp->p_types.table, id); in define_typealias()
1342 t = hashtab_search(policydbp->p_types.table, id); in define_typeattribute()
1356 attr = hashtab_search(policydbp->p_types.table, id); in define_typeattribute()
1393 bounds = hashtab_search(policydbp->p_types.table, bounds_id); in define_typebounds_helper()
1404 type = hashtab_search(policydbp->p_types.table, type_id); in define_typebounds_helper()
1506 attr = hashtab_search(policydbp->p_types.table, id); in define_type()
1581 t = hashtab_search(policydbp->p_types.table, id); in set_types()
[all …]
Dmodule_compiler.c628 types_tab = policydbp->p_types.table; in get_local_type()
630 types_tab = stack_top->decl->p_types.table; in get_local_type()
/third_party/selinux/libsepol/cil/src/
Dcil_binary.c103 *sepol_type = hashtab_search(pdb->p_types.table, datum->fqn); in __cil_get_sepol_type_datum()
595 pdb->type_attr_map = cil_malloc(pdb->p_types.nprim * sizeof(ebitmap_t)); in __cil_typeattr_bitmap_init()
596 pdb->attr_type_map = cil_malloc(pdb->p_types.nprim * sizeof(ebitmap_t)); in __cil_typeattr_bitmap_init()
598 for (i = 0; i < pdb->p_types.nprim; i++) { in __cil_typeattr_bitmap_init()
4147 if (type->s.value < 1 || type->s.value > pdb->p_types.nprim) { in __cil_type_val_array_insert()
4234 policydb->p_type_val_to_name = cil_malloc(sizeof(char *) * policydb->p_types.nprim); in __cil_policydb_val_arrays_create()
4235 policydb->type_val_to_struct = cil_malloc(sizeof(type_datum_t *) * policydb->p_types.nprim); in __cil_policydb_val_arrays_create()
4236 rc = hashtab_map(policydb->p_types.table, &__cil_type_val_array_insert, policydb); in __cil_policydb_val_arrays_create()
/third_party/selinux/libsepol/include/sepol/policydb/
Dpolicydb.h528 #define p_types symtab[SYM_TYPES] macro
/third_party/selinux/checkpolicy/test/
Ddismod.c360 if (hashtab_map(p->p_types.table, display_type_callback, fp)) in display_types()