Home
last modified time | relevance | path

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

12

/external/selinux/libsepol/src/
Dusers.c235 (policydb->p_users.nprim + in sepol_user_modify()
240 policydb->user_val_to_struct[policydb->p_users.nprim] = NULL; in sepol_user_modify()
243 (policydb->p_users.nprim + in sepol_user_modify()
248 policydb->p_user_val_to_name[policydb->p_users.nprim] = NULL; in sepol_user_modify()
256 usrdatum->s.value = ++policydb->p_users.nprim; in sepol_user_modify()
312 *response = policydb->p_users.nprim; in sepol_user_count()
353 unsigned int nusers = policydb->p_users.nprim; in sepol_user_iterate()
Dkernel_to_cil.c351 for (i=0; i < pdb->p_classes.nprim; i++) { in constraint_rules_to_strs()
376 for (i=0; i < pdb->p_classes.nprim; i++) { in validatetrans_rules_to_strs()
424 rc = strs_init(&strs, permtab->nprim); in class_or_common_perms_to_str()
454 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_decl_rules_to_cil()
469 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_decl_rules_to_cil()
481 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_decl_rules_to_cil()
490 used = calloc(pdb->p_commons.nprim, sizeof(*used)); in write_class_decl_rules_to_cil()
496 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_decl_rules_to_cil()
717 for (i=0; i < pdb->p_classes.nprim; i++) { in write_default_rules_to_cil()
728 for (i=0; i < pdb->p_classes.nprim; i++) { in write_default_rules_to_cil()
[all …]
Dkernel_to_conf.c351 for (i=0; i < pdb->p_classes.nprim; i++) { in constraint_rules_to_strs()
376 for (i=0; i < pdb->p_classes.nprim; i++) { in validatetrans_rules_to_strs()
423 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_decl_rules_to_conf()
504 rc = strs_init(&strs, permtab->nprim); in class_or_common_perms_to_str()
534 used = calloc(pdb->p_commons.nprim, sizeof(*used)); in write_class_and_common_rules_to_conf()
540 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_and_common_rules_to_conf()
566 for (i=0; i < pdb->p_classes.nprim; i++) { in write_class_and_common_rules_to_conf()
688 for (i=0; i < pdb->p_classes.nprim; i++) { in write_default_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()
[all …]
Dpolicydb.c972 if (!comdatum->s.value || comdatum->s.value > p->p_commons.nprim) in common_index()
988 if (!cladatum->s.value || cladatum->s.value > p->p_classes.nprim) in class_index()
1005 if (!role->s.value || role->s.value > p->p_roles.nprim) in role_index()
1024 if (!typdatum->s.value || typdatum->s.value > p->p_types.nprim) in type_index()
1043 if (!usrdatum->s.value || usrdatum->s.value > p->p_users.nprim) in user_index()
1063 levdatum->level->sens > p->p_levels.nprim) in sens_index()
1082 if (!catdatum->s.value || catdatum->s.value > p->p_cats.nprim) in cat_index()
1106 calloc(p->p_commons.nprim, sizeof(char *)); in policydb_index_classes()
1115 calloc(p->p_classes.nprim, sizeof(class_datum_t *)); in policydb_index_classes()
1121 calloc(p->p_classes.nprim, sizeof(char *)); in policydb_index_classes()
[all …]
Dexpand.c117 new_type->s.value = ++state->out->p_types.nprim; in type_copy_callback()
214 s->nprim++; in perm_copy_callback()
263 state->out->p_commons.nprim++; in common_copy_callback()
445 state->out->p_classes.nprim++; in class_copy_callback()
492 new_class->permissions.nprim += in class_copy_callback()
493 new_class->comdatum->permissions.nprim; in class_copy_callback()
841 state->out->p_roles.nprim++; in role_copy_callback()
843 new_role->s.value = state->out->p_roles.nprim; in role_copy_callback()
987 state->out->p_users.nprim++; in user_copy_callback()
988 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 …]
Dcontext.c45 if (!c->role || c->role > p->p_roles.nprim) in context_is_valid()
48 if (!c->user || c->user > p->p_users.nprim) in context_is_valid()
51 if (!c->type || c->type > p->p_types.nprim) in context_is_valid()
Dbooleans.c111 *response = policydb->p_bools.nprim; in sepol_bool_count()
185 unsigned int nbools = policydb->p_bools.nprim; in sepol_bool_iterate()
Dmls.c281 || c->range.level[l].sens > p->p_levels.nprim) in mls_context_isvalid()
294 if (i > p->p_cats.nprim) in mls_context_isvalid()
312 if (!c->user || c->user > p->p_users.nprim) in mls_context_isvalid()
631 if (tclass && tclass <= policydb->p_classes.nprim) { in mls_compute_sid()
Dsymtab.c41 s->nprim = 0; in symtab_init()
Droles.c27 unsigned int tmp_nroles = policydb->p_roles.nprim; in sepol_role_list()
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()
Dgenusers.c114 usrdatum->s.value = ++policydb->p_users.nprim;
Dwrite.c895 buf[items++] = cpu_to_le32(comdatum->permissions.nprim); in common_write()
989 buf[items++] = cpu_to_le32(cladatum->permissions.nprim); in class_write()
1958 buf[0] = cpu_to_le32(decl->symtab[i].nprim); in avrule_decl_write()
2204 buf[0] = cpu_to_le32(p->symtab[i].nprim); in policydb_write()
2243 if (p->p_bools.nprim) in policydb_write()
2292 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()
1031 if (!tclass || tclass > policydb->p_classes.nprim) { in sepol_validate_transition()
1084 if (!tclass || tclass > policydb->p_classes.nprim) { in sepol_validate_transition_reason_buffer()
1246 if (!tclass || tclass > policydb->p_classes.nprim) { in sepol_string_to_av_perm()
Dmodule_to_cil.c1696 arr.perms = calloc(common->permissions.nprim, sizeof(*arr.perms)); in common_to_cil()
1989 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()
734 || tclass > policydb.p_classes.nprim) { in main()
754 if (!cladatum->comdatum && !cladatum->permissions.nprim) { in main()
850 || tclass > policydb.p_classes.nprim) { in main()
1047 || tclass > policydb.p_classes.nprim) { in main()
1143 || 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.c282 sepol_perm->s.value = sepol_common->permissions.nprim + 1; in cil_common_to_policydb()
283 sepol_common->permissions.nprim++; in cil_common_to_policydb()
341 sepol_class->permissions.nprim += sepol_common->permissions.nprim; in cil_classorder_to_policydb()
361 sepol_perm->s.value = sepol_class->permissions.nprim + 1; in cil_classorder_to_policydb()
362 sepol_class->permissions.nprim++; in cil_classorder_to_policydb()
605 pdb->type_attr_map = cil_malloc(pdb->p_types.nprim * sizeof(ebitmap_t)); in __cil_typeattr_bitmap_init()
606 pdb->attr_type_map = cil_malloc(pdb->p_types.nprim * sizeof(ebitmap_t)); in __cil_typeattr_bitmap_init()
609 for (i = 0; i < pdb->p_types.nprim; i++) { in __cil_typeattr_bitmap_init()
3972 if (common->s.value < 1 || common->s.value > pdb->p_commons.nprim) { in __cil_common_val_array_insert()
3985 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()

12