Lines Matching refs:policydbp

64 policydb_t *policydbp;  variable
233 t = hashtab_search(policydbp->p_types.table, type); in define_permissive()
278 if (ebitmap_set_bit(&policydbp->policycaps, capnum, TRUE)) { in define_polcap()
315 head = policydbp->ocontexts[OCON_ISID]; in define_initial_sid()
330 policydbp->ocontexts[OCON_ISID] = newc; in define_initial_sid()
352 cladatum = hashtab_search(policydbp->p_classes.table, id); in read_classes()
383 cladatum = hashtab_search(policydbp->p_classes.table, id); in define_default_user()
415 cladatum = hashtab_search(policydbp->p_classes.table, id); in define_default_role()
447 cladatum = hashtab_search(policydbp->p_classes.table, id); in define_default_type()
479 cladatum = hashtab_search(policydbp->p_classes.table, id); in define_default_range()
513 comdatum = hashtab_search(policydbp->p_commons.table, id); in define_common_perms()
524 ret = hashtab_insert(policydbp->p_commons.table, in define_common_perms()
535 comdatum->s.value = policydbp->p_commons.nprim + 1; in define_common_perms()
540 policydbp->p_commons.nprim++; in define_common_perms()
607 cladatum = (class_datum_t *) hashtab_search(policydbp->p_classes.table, in define_av_perms()
631 (common_datum_t *) hashtab_search(policydbp->p_commons. in define_av_perms()
858 (level_datum_t *) hashtab_search(policydbp->p_levels.table, in define_dominance()
878 if (order != policydbp->p_levels.nprim) { in define_dominance()
1050 levdatum = (level_datum_t *) hashtab_search(policydbp->p_levels.table, in define_level()
1078 (cat_datum_t *) hashtab_search(policydbp->p_cats. in define_level()
1089 (cat_datum_t *) hashtab_search(policydbp->p_cats. in define_level()
1107 (cat_datum_t *) hashtab_search(policydbp->p_cats. in define_level()
1130 (policydbp->p_levels.table, clone_level, levdatum->level)) { in define_level()
1182 attr = hashtab_search(policydbp->p_types.table, id); in expand_attrib()
1217 attr = hashtab_search(policydbp->p_types.table, in expand_attrib()
1218 policydbp->sym_val_to_name[SYM_TYPES][i]); in expand_attrib()
1279 aliasdatum = hashtab_search(policydbp->symtab[SYM_TYPES].table, id); in add_aliases_to_type()
1322 t = hashtab_search(policydbp->p_types.table, id); in define_typealias()
1355 t = hashtab_search(policydbp->p_types.table, id); in define_typeattribute()
1369 attr = hashtab_search(policydbp->p_types.table, id); in define_typeattribute()
1406 bounds = hashtab_search(policydbp->p_types.table, bounds_id); in define_typebounds_helper()
1417 type = hashtab_search(policydbp->p_types.table, type_id); in define_typebounds_helper()
1424 type = policydbp->type_val_to_struct[type->s.value - 1]; in define_typebounds_helper()
1426 type = policydbp->type_val_to_struct[type->primary - 1]; in define_typebounds_helper()
1434 policydbp->p_type_val_to_name[type->bounds - 1], in define_typebounds_helper()
1435 policydbp->p_type_val_to_name[bounds->s.value - 1]); in define_typebounds_helper()
1519 attr = hashtab_search(policydbp->p_types.table, id); in define_type()
1594 t = hashtab_search(policydbp->p_types.table, id); in set_types()
1667 datum = (type_datum_t *) hashtab_search(policydbp->p_types.table, in define_compute_type_helper()
2122 cladatum = policydbp->class_val_to_struct[i]; in define_te_avtab_xperms_helper()
2134 policydbp->p_class_val_to_name[i]); in define_te_avtab_xperms_helper()
2136 } else if (!is_perm_in_scope (id, policydbp->p_class_val_to_name[i])) { in define_te_avtab_xperms_helper()
2139 policydbp->p_class_val_to_name[i]); in define_te_avtab_xperms_helper()
2592 cladatum = policydbp->class_val_to_struct[i]; in define_te_avtab_helper()
2622 policydbp->p_class_val_to_name[i]); in define_te_avtab_helper()
2626 (id, policydbp->p_class_val_to_name[i])) { in define_te_avtab_helper()
2630 policydbp->p_class_val_to_name[i]); in define_te_avtab_helper()
2726 role = hashtab_search(policydbp->p_roles.table, id); in define_role_types()
2777 attr = hashtab_search(policydbp->p_roles.table, id); in define_role_attr()
2827 r = hashtab_search(policydbp->p_roles.table, id); in define_roleattribute()
2842 attr = hashtab_search(policydbp->p_roles.table, id); in define_roleattribute()
2928 if (type_set_expand(&rdp->types, &types, policydbp, 1)) { in dominate_role_recheck()
2977 role = (role_datum_t *) hashtab_search(policydbp->p_roles.table, in define_role_dom()
3026 if (type_set_expand(&r->types, &types, policydbp, 1)) { in define_role_dom()
3047 hashtab_map(policydbp->p_roles.table, in define_role_dom()
3083 rc = hashtab_map(policydbp->p_roles.table, role_val_to_name_helper, &v); in role_val_to_name()
3109 r = hashtab_search(policydbp->p_roles.table, id); in set_roles()
3172 cladatum = hashtab_search(policydbp->p_classes.table, in define_role_trans()
3196 role = hashtab_search(policydbp->p_roles.table, id); in define_role_trans()
3211 if (role_set_expand(&roles, &e_roles, policydbp, NULL, NULL)) in define_role_trans()
3214 if (type_set_expand(&types, &e_types, policydbp, 1)) in define_role_trans()
3226 for (tr = policydbp->role_tr; tr; in define_role_trans()
3235 policydbp->p_type_val_to_name[j], in define_role_trans()
3236 policydbp->p_class_val_to_name[k]); in define_role_trans()
3251 tr->next = policydbp->role_tr; in define_role_trans()
3252 policydbp->role_tr = tr; in define_role_trans()
3389 typdatum = hashtab_search(policydbp->p_types.table, id); in define_filename_trans()
3407 if (type_set_expand(&stypes, &e_stypes, policydbp, 1)) in define_filename_trans()
3410 if (type_set_expand(&ttypes, &e_ttypes, policydbp, 1)) in define_filename_trans()
3437 ftdatum = hashtab_search(policydbp->filename_trans, in define_filename_trans()
3442 policydbp->p_type_val_to_name[s], in define_filename_trans()
3443 policydbp->p_type_val_to_name[t], in define_filename_trans()
3444 policydbp->p_class_val_to_name[c]); in define_filename_trans()
3453 rc = hashtab_insert(policydbp->filename_trans, in define_filename_trans()
3614 (class_datum_t *) hashtab_search(policydbp->p_classes.table, in define_constraint()
3657 cladatum = policydbp->class_val_to_struct[i]; in define_constraint()
3756 (class_datum_t *) hashtab_search(policydbp->p_classes.table, in define_validatetrans()
3883 (user_datum_t *) hashtab_search(policydbp-> in define_cexpr()
3902 (role_datum_t *) hashtab_search(policydbp-> in define_cexpr()
4018 if (cond_normalize_expr(policydbp, &cn) < 0) { in define_conditional()
4131 (cond_bool_datum_t *) hashtab_search(policydbp->p_bools. in define_cond_expr()
4174 r = hashtab_search(policydbp->p_roles.table, id); in set_user_roles()
4205 cdatum = (cat_datum_t *) hashtab_search(policydbp->p_cats.table, in parse_categories()
4213 cdatum = (cat_datum_t *) hashtab_search(policydbp->p_cats.table, in parse_categories()
4226 cdatum = (cat_datum_t *) hashtab_search(policydbp->p_cats.table, in parse_categories()
4238 policydb_index_others(NULL, policydbp, 0); in parse_categories()
4241 policydbp->p_cat_val_to_name[i], in parse_categories()
4242 policydbp->p_sens_val_to_name[level_value]); in parse_categories()
4267 cdatum = (cat_datum_t *) hashtab_search(policydbp->p_cats.table, in parse_semantic_categories()
4276 cdatum = (cat_datum_t *) hashtab_search(policydbp->p_cats.table, in parse_semantic_categories()
4284 cdatum = (cat_datum_t *) hashtab_search(policydbp->p_cats.table, in parse_semantic_categories()
4354 hashtab_search(policydbp->p_levels.table, in define_user()
4379 hashtab_search(policydbp->p_levels.table, in define_user()
4467 usrdatum = (user_datum_t *) hashtab_search(policydbp->p_users.table, in parse_security_context()
4490 role = (role_datum_t *) hashtab_search(policydbp->p_roles.table, in parse_security_context()
4513 typdatum = (type_datum_t *) hashtab_search(policydbp->p_types.table, in parse_security_context()
4537 hashtab_search(policydbp->p_levels.table, in parse_security_context()
4574 if (!policydb_context_isvalid(policydbp, c)) { in parse_security_context()
4603 head = policydbp->ocontexts[OCON_ISID]; in define_initial_sid_context()
4632 if (policydbp->target_platform != SEPOL_TARGET_SELINUX) { in define_fs_context()
4669 head = policydbp->ocontexts[OCON_FS]; in define_fs_context()
4684 policydbp->ocontexts[OCON_FS] = newc; in define_fs_context()
4694 if (policydbp->target_platform != SEPOL_TARGET_XEN) { in define_pirq_context()
4720 head = policydbp->ocontexts[OCON_XEN_PIRQ]; in define_pirq_context()
4734 policydbp->ocontexts[OCON_XEN_PIRQ] = newc; in define_pirq_context()
4748 if (policydbp->target_platform != SEPOL_TARGET_XEN) { in define_iomem_context()
4781 head = policydbp->ocontexts[OCON_XEN_IOMEM]; in define_iomem_context()
4798 policydbp->ocontexts[OCON_XEN_IOMEM] = newc; in define_iomem_context()
4812 if (policydbp->target_platform != SEPOL_TARGET_XEN) { in define_ioport_context()
4845 head = policydbp->ocontexts[OCON_XEN_IOPORT]; in define_ioport_context()
4862 policydbp->ocontexts[OCON_XEN_IOPORT] = newc; in define_ioport_context()
4876 if (policydbp->target_platform != SEPOL_TARGET_XEN) { in define_pcidevice_context()
4902 head = policydbp->ocontexts[OCON_XEN_PCIDEVICE]; in define_pcidevice_context()
4917 policydbp->ocontexts[OCON_XEN_PCIDEVICE] = newc; in define_pcidevice_context()
4930 if (policydbp->target_platform != SEPOL_TARGET_XEN) { in define_devicetree_context()
4960 head = policydbp->ocontexts[OCON_XEN_DEVICETREE]; in define_devicetree_context()
4971 policydbp->ocontexts[OCON_XEN_DEVICETREE] = newc; in define_devicetree_context()
4987 if (policydbp->target_platform != SEPOL_TARGET_SELINUX) { in define_port_context()
5038 head = policydbp->ocontexts[OCON_PORT]; in define_port_context()
5062 policydbp->ocontexts[OCON_PORT] = newc; in define_port_context()
5080 if (policydbp->target_platform != SEPOL_TARGET_SELINUX) { in define_ibpkey_context()
5144 head = policydbp->ocontexts[OCON_IBPKEY]; in define_ibpkey_context()
5170 policydbp->ocontexts[OCON_IBPKEY] = newc; in define_ibpkey_context()
5185 if (policydbp->target_platform != SEPOL_TARGET_SELINUX) { in define_ibendport_context()
5230 head = policydbp->ocontexts[OCON_IBENDPORT]; in define_ibendport_context()
5249 policydbp->ocontexts[OCON_IBENDPORT] = newc; in define_ibendport_context()
5263 if (policydbp->target_platform != SEPOL_TARGET_SELINUX) { in define_netif_context()
5298 head = policydbp->ocontexts[OCON_NETIF]; in define_netif_context()
5313 policydbp->ocontexts[OCON_NETIF] = newc; in define_netif_context()
5324 if (policydbp->target_platform != SEPOL_TARGET_SELINUX) { in define_ipv4_node_context()
5386 head = policydbp->ocontexts[OCON_NODE]; in define_ipv4_node_context()
5397 policydbp->ocontexts[OCON_NODE] = newc; in define_ipv4_node_context()
5410 if (policydbp->target_platform != SEPOL_TARGET_SELINUX) { in define_ipv6_node_context()
5473 head = policydbp->ocontexts[OCON_NODE6]; in define_ipv6_node_context()
5484 policydbp->ocontexts[OCON_NODE6] = newc; in define_ipv6_node_context()
5495 if (policydbp->target_platform != SEPOL_TARGET_SELINUX) { in define_fs_use()
5525 head = policydbp->ocontexts[OCON_FSUSE]; in define_fs_use()
5539 policydbp->ocontexts[OCON_FSUSE] = newc; in define_fs_use()
5550 if (policydbp->target_platform != SEPOL_TARGET_SELINUX) { in define_genfs_context_helper()
5564 for (genfs_p = NULL, genfs = policydbp->genfs; in define_genfs_context_helper()
5582 policydbp->genfs = newgenfs; in define_genfs_context_helper()
5733 cladatum = hashtab_search(policydbp->p_classes.table, in define_range_trans()
5753 levdatum = hashtab_search(policydbp->p_levels.table, id); in define_range_trans()