Home
last modified time | relevance | path

Searched refs:nprim (Results 1 – 25 of 25) sorted by relevance

/external/selinux/libsepol/src/
Dusers.c230 (policydb->p_users.nprim + in sepol_user_modify()
235 policydb->user_val_to_struct[policydb->p_users.nprim] = NULL; in sepol_user_modify()
238 (policydb->p_users.nprim + in sepol_user_modify()
243 policydb->p_user_val_to_name[policydb->p_users.nprim] = NULL; in sepol_user_modify()
251 usrdatum->s.value = ++policydb->p_users.nprim; in sepol_user_modify()
307 *response = policydb->p_users.nprim; in sepol_user_count()
348 unsigned int nusers = policydb->p_users.nprim; in sepol_user_iterate()
Dkernel_to_cil.c355 for (i=0; i < pdb->p_classes.nprim; i++) { in constraint_rules_to_strs()
380 for (i=0; i < pdb->p_classes.nprim; i++) { in validatetrans_rules_to_strs()
428 rc = strs_init(&strs, permtab->nprim); in class_or_common_perms_to_str()
458 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_decl_rules_to_cil()
473 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_decl_rules_to_cil()
485 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_decl_rules_to_cil()
494 used = calloc(pdb->p_commons.nprim, sizeof(*used)); in write_class_decl_rules_to_cil()
500 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_decl_rules_to_cil()
724 for (i=0; i < pdb->p_classes.nprim; i++) { in write_default_rules_to_cil()
735 for (i=0; i < pdb->p_classes.nprim; i++) { in write_default_rules_to_cil()
[all …]
Dkernel_to_conf.c355 for (i=0; i < pdb->p_classes.nprim; i++) { in constraint_rules_to_strs()
380 for (i=0; i < pdb->p_classes.nprim; i++) { in validatetrans_rules_to_strs()
427 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_decl_rules_to_conf()
512 rc = strs_init(&strs, permtab->nprim); in class_or_common_perms_to_str()
542 used = calloc(pdb->p_commons.nprim, sizeof(*used)); in write_class_and_common_rules_to_conf()
548 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_and_common_rules_to_conf()
574 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_and_common_rules_to_conf()
699 for (i=0; i < pdb->p_classes.nprim; i++) { in write_default_rules_to_conf()
710 for (i=0; i < pdb->p_classes.nprim; i++) { in write_default_rules_to_conf()
721 for (i=0; i < pdb->p_classes.nprim; i++) { in write_default_rules_to_conf()
[all …]
Dpolicydb.c994 if (!comdatum->s.value || comdatum->s.value > p->p_commons.nprim) in common_index()
1010 if (!cladatum->s.value || cladatum->s.value > p->p_classes.nprim) in class_index()
1027 if (!role->s.value || role->s.value > p->p_roles.nprim) in role_index()
1046 if (!typdatum->s.value || typdatum->s.value > p->p_types.nprim) in type_index()
1065 if (!usrdatum->s.value || usrdatum->s.value > p->p_users.nprim) in user_index()
1085 levdatum->level->sens > p->p_levels.nprim) in sens_index()
1104 if (!catdatum->s.value || catdatum->s.value > p->p_cats.nprim) in cat_index()
1128 calloc(p->p_commons.nprim, sizeof(char *)); in policydb_index_classes()
1137 calloc(p->p_classes.nprim, sizeof(class_datum_t *)); in policydb_index_classes()
1143 calloc(p->p_classes.nprim, sizeof(char *)); in policydb_index_classes()
[all …]
Doptimize.c38 ebitmap_t *map = malloc(p->p_types.nprim * sizeof(ebitmap_t)); in build_type_map()
42 for (i = 0; i < p->p_types.nprim; i++) { in build_type_map()
51 for (k = 0; k < p->p_types.nprim; k++) { in build_type_map()
72 for (i = 0; i < p->p_types.nprim; i++) in destroy_type_map()
Dcontext.c44 if (!c->role || c->role > p->p_roles.nprim) in context_is_valid()
47 if (!c->user || c->user > p->p_users.nprim) in context_is_valid()
50 if (!c->type || c->type > p->p_types.nprim) in context_is_valid()
Dexpand.c115 new_type->s.value = ++state->out->p_types.nprim; in type_copy_callback()
212 s->nprim++; in perm_copy_callback()
261 state->out->p_commons.nprim++; in common_copy_callback()
443 state->out->p_classes.nprim++; in class_copy_callback()
490 new_class->permissions.nprim += in class_copy_callback()
491 new_class->comdatum->permissions.nprim; in class_copy_callback()
837 state->out->p_roles.nprim++; in role_copy_callback()
839 new_role->s.value = state->out->p_roles.nprim; in role_copy_callback()
983 state->out->p_users.nprim++; in user_copy_callback()
984 new_user->s.value = state->out->p_users.nprim; in user_copy_callback()
[all …]
Dlink.c97 for (i = 0; mod->perm_map != NULL && i < mod->policy->p_classes.nprim; in policy_module_destroy()
170 new_perm->s.value = dest_class->permissions.nprim + 1; in permission_copy_callback()
315 new_class->s.value = ++(state->base->p_classes.nprim); in class_copy_callback()
392 new_role->s.value = state->base->p_roles.nprim + 1; in role_copy_callback()
400 state->base->p_roles.nprim++; in role_copy_callback()
419 state->dest_decl->p_roles.nprim++; in role_copy_callback()
490 new_type->s.value = state->base->p_types.nprim + 1; in type_copy_callback()
498 state->base->p_types.nprim++; in type_copy_callback()
518 state->dest_decl->p_types.nprim++; in type_copy_callback()
558 new_user->s.value = state->base->p_users.nprim + 1; in user_copy_callback()
[all …]
Dbooleans.c111 *response = policydb->p_bools.nprim; in sepol_bool_count()
185 unsigned int nbools = policydb->p_bools.nprim; in sepol_bool_iterate()
Dsymtab.c41 s->nprim = 0; in symtab_init()
Droles.c27 unsigned int tmp_nroles = policydb->p_roles.nprim; in sepol_role_list()
Dmls.c281 || c->range.level[l].sens > p->p_levels.nprim) in mls_context_isvalid()
293 if (i > p->p_cats.nprim) in mls_context_isvalid()
310 if (!c->user || c->user > p->p_users.nprim) in mls_context_isvalid()
627 if (tclass && tclass <= policydb->p_classes.nprim) { in mls_compute_sid()
Dconditional.c528 malloc(p->p_bools.nprim * sizeof(cond_bool_datum_t *)); in cond_init_bool_indexes()
551 if (!booldatum->s.value || booldatum->s.value > p->p_bools.nprim) in cond_index_bool()
752 if (expr->bool > p->p_bools.nprim) { in expr_isvalid()
Dutil.c95 for (i = 0; i < cladatum->permissions.nprim; i++) { in sepol_av_to_string()
Dwrite.c900 buf[items++] = cpu_to_le32(comdatum->permissions.nprim); in common_write()
994 buf[items++] = cpu_to_le32(cladatum->permissions.nprim); in class_write()
1987 buf[0] = cpu_to_le32(decl->symtab[i].nprim); in avrule_decl_write()
2233 buf[0] = cpu_to_le32(p->symtab[i].nprim); in policydb_write()
2272 if (p->p_bools.nprim) in policydb_write()
2321 for (i = 0; i < p->p_types.nprim; i++) { in policydb_write()
Dservices.c911 if (!tclass || tclass > policydb->p_classes.nprim) { in context_struct_compute_av()
1027 if (!tclass || tclass > policydb->p_classes.nprim) { in sepol_validate_transition()
1080 if (!tclass || tclass > policydb->p_classes.nprim) { in sepol_validate_transition_reason_buffer()
1242 if (!tclass || tclass > policydb->p_classes.nprim) { in sepol_string_to_av_perm()
Dmodule_to_cil.c1677 arr.perms = calloc(common->permissions.nprim, sizeof(*arr.perms)); in common_to_cil()
1970 arr.perms = calloc(class->permissions.nprim, sizeof(*arr.perms)); in class_to_cil()
/external/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()
303 for (i = 0; i < policydbp->p_bools.nprim; i++) { in display_bools()
752 || tclass > policydb.p_classes.nprim) { in main()
772 if (!cladatum->comdatum && !cladatum->permissions.nprim) { in main()
868 || tclass > policydb.p_classes.nprim) { in main()
1065 || tclass > policydb.p_classes.nprim) { in main()
1161 || tclass > policydb.p_classes.nprim) { in main()
[all …]
Dpolicy_define.c535 comdatum->s.value = policydbp->p_commons.nprim + 1; in define_common_perms()
540 policydbp->p_commons.nprim++; in define_common_perms()
548 perdatum->s.value = comdatum->permissions.nprim + 1; in define_common_perms()
568 comdatum->permissions.nprim++; in define_common_perms()
615 if (cladatum->comdatum || cladatum->permissions.nprim) { in define_av_perms()
646 cladatum->permissions.nprim += comdatum->permissions.nprim; in define_av_perms()
655 perdatum->s.value = ++cladatum->permissions.nprim; in define_av_perms()
878 if (order != policydbp->p_levels.nprim) { in define_dominance()
Dmodule_compiler.c869 perm->s.value = datum->permissions.nprim + 1; in require_class()
879 datum->permissions.nprim++; in require_class()
/external/selinux/libsepol/include/sepol/policydb/
Dsymtab.h35 uint32_t nprim; /* number of primary names in table */ member
/external/selinux/libsepol/cil/src/
Dcil_binary.c277 sepol_perm->s.value = sepol_common->permissions.nprim + 1; in cil_common_to_policydb()
278 sepol_common->permissions.nprim++; in cil_common_to_policydb()
336 sepol_class->permissions.nprim += sepol_common->permissions.nprim; in cil_classorder_to_policydb()
356 sepol_perm->s.value = sepol_class->permissions.nprim + 1; in cil_classorder_to_policydb()
357 sepol_class->permissions.nprim++; in cil_classorder_to_policydb()
598 pdb->type_attr_map = cil_malloc(pdb->p_types.nprim * sizeof(ebitmap_t)); in __cil_typeattr_bitmap_init()
599 pdb->attr_type_map = cil_malloc(pdb->p_types.nprim * sizeof(ebitmap_t)); in __cil_typeattr_bitmap_init()
602 for (i = 0; i < pdb->p_types.nprim; i++) { in __cil_typeattr_bitmap_init()
3887 if (common->s.value < 1 || common->s.value > pdb->p_commons.nprim) { in __cil_common_val_array_insert()
3900 if (class->s.value < 1 || class->s.value > pdb->p_classes.nprim) { in __cil_class_val_array_insert()
[all …]
/external/selinux/python/audit2allow/
Dsepolgen-ifgen-attr-helper.c67 for (i = 0; i < cladatum->permissions.nprim; i++) { in render_access_mask()
/external/selinux/checkpolicy/test/
Ddismod.c370 for (i = 0; i < p->p_users.nprim; i++) { in display_users()
389 for (i = 0; i < p->p_bools.nprim; i++) { in display_bools()
Ddispol.c185 for (i = 0; i < p->p_bools.nprim; i++) { in display_bools()