Lines Matching defs:policydb
35 #include <sepol/policydb/policydb.h>
36 #include <sepol/policydb/polcaps.h>
37 #include <sepol/policydb/conditional.h>
38 #include <sepol/policydb/constraint.h>
39 #include <sepol/policydb/flask.h>
40 #include <sepol/policydb/expand.h>
41 #include <sepol/policydb/hierarchy.h>
1555 struct policydb *pdb;
2672 cil_log(CIL_ERR, "Failed to insert constraint into policydb\n");
3788 int __cil_policydb_val_arrays_create(policydb_t *policydb)
3792 policydb->p_common_val_to_name = cil_malloc(sizeof(char *) * policydb->p_commons.nprim);
3793 rc = hashtab_map(policydb->p_commons.table, &__cil_common_val_array_insert, policydb);
3798 policydb->p_class_val_to_name = cil_malloc(sizeof(char *) * policydb->p_classes.nprim);
3799 policydb->class_val_to_struct = cil_malloc(sizeof(class_datum_t *) * policydb->p_classes.nprim);
3800 rc = hashtab_map(policydb->p_classes.table, &__cil_class_val_array_insert, policydb);
3805 policydb->p_role_val_to_name = cil_malloc(sizeof(char *) * policydb->p_roles.nprim);
3806 policydb->role_val_to_struct = cil_malloc(sizeof(role_datum_t *) * policydb->p_roles.nprim);
3807 rc = hashtab_map(policydb->p_roles.table, &__cil_role_val_array_insert, policydb);
3812 policydb->p_type_val_to_name = cil_malloc(sizeof(char *) * policydb->p_types.nprim);
3813 policydb->type_val_to_struct = cil_malloc(sizeof(type_datum_t *) * policydb->p_types.nprim);
3814 rc = hashtab_map(policydb->p_types.table, &__cil_type_val_array_insert, policydb);
3819 policydb->p_user_val_to_name = cil_malloc(sizeof(char *) * policydb->p_users.nprim);
3820 policydb->user_val_to_struct = cil_malloc(sizeof(user_datum_t *) * policydb->p_users.nprim);
3821 rc = hashtab_map(policydb->p_users.table, &__cil_user_val_array_insert, policydb);
3826 policydb->p_bool_val_to_name = cil_malloc(sizeof(char *) * policydb->p_bools.nprim);
3827 policydb->bool_val_to_struct = cil_malloc(sizeof(cond_bool_datum_t *) * policydb->p_bools.nprim);
3828 rc = hashtab_map(policydb->p_bools.table, &__cil_bool_val_array_insert, policydb);
3833 policydb->p_sens_val_to_name = cil_malloc(sizeof(char *) * policydb->p_levels.nprim);
3834 rc = hashtab_map(policydb->p_levels.table, &__cil_level_val_array_insert, policydb);
3839 policydb->p_cat_val_to_name = cil_malloc(sizeof(char *) * policydb->p_cats.nprim);
3840 rc = hashtab_map(policydb->p_cats.table, &__cil_cat_val_array_insert, policydb);
3886 struct policydb *pdb = NULL;
4059 int cil_binary_create(const struct cil_db *db, sepol_policydb_t **policydb)
4074 *policydb = pdb;
4624 // assumes policydb is already allocated and initialized properly with things
4626 int cil_binary_create_allocated_pdb(const struct cil_db *db, sepol_policydb_t *policydb)
4631 policydb_t *pdb = &policydb->p;
4641 if (db == NULL || policydb == NULL) {
4644 } else if (policydb == NULL) {
4645 cil_log(CIL_ERR,"policydb == NULL\n");
4740 cil_log(CIL_INFO, "Failure while inserting cil contexts into sepol policydb\n");