Lines Matching refs:nprim
389 role->value = ++p->p_roles.nprim; in roles_init()
556 if (!comdatum->value || comdatum->value > p->p_commons.nprim) in common_index()
571 if (!cladatum->value || cladatum->value > p->p_classes.nprim) in class_index()
587 || role->value > p->p_roles.nprim in role_index()
588 || role->bounds > p->p_roles.nprim) in role_index()
606 || typdatum->value > p->p_types.nprim in type_index()
607 || typdatum->bounds > p->p_types.nprim) in type_index()
624 || usrdatum->value > p->p_users.nprim in user_index()
625 || usrdatum->bounds > p->p_users.nprim) in user_index()
643 levdatum->level->sens > p->p_levels.nprim) in sens_index()
661 if (!catdatum->value || catdatum->value > p->p_cats.nprim) in cat_index()
718 p->p_users.nprim, p->p_roles.nprim, p->p_types.nprim, in policydb_index()
719 p->p_bools.nprim, p->p_levels.nprim, p->p_cats.nprim); in policydb_index()
722 p->p_users.nprim, p->p_roles.nprim, p->p_types.nprim, in policydb_index()
723 p->p_bools.nprim); in policydb_index()
726 p->p_classes.nprim, p->te_avtab.nel); in policydb_index()
733 p->class_val_to_struct = kcalloc(p->p_classes.nprim, in policydb_index()
739 p->role_val_to_struct = kcalloc(p->p_roles.nprim, in policydb_index()
745 p->user_val_to_struct = kcalloc(p->p_users.nprim, in policydb_index()
751 p->type_val_to_struct = kvcalloc(p->p_types.nprim, in policydb_index()
762 p->sym_val_to_name[i] = kvcalloc(p->symtab[i].nprim, in policydb_index()
849 for (i = 0; i < p->p_types.nprim; i++) in policydb_destroy()
902 if (!class || class > p->p_classes.nprim) in policydb_class_isvalid()
909 if (!role || role > p->p_roles.nprim) in policydb_role_isvalid()
916 if (!type || type > p->p_types.nprim) in policydb_type_isvalid()
930 if (!c->role || c->role > p->p_roles.nprim) in policydb_context_isvalid()
933 if (!c->user || c->user > p->p_users.nprim) in policydb_context_isvalid()
936 if (!c->type || c->type > p->p_types.nprim) in policydb_context_isvalid()
1148 comdatum->permissions.nprim = le32_to_cpu(buf[2]); in common_read()
1313 cladatum->permissions.nprim = le32_to_cpu(buf[3]); in class_read()
1791 if (!tclass || tclass > p->p_classes.nprim) in string_to_av_perm()
2403 u32 len, nprim, nel, perm; in policydb_read() local
2522 nprim = le32_to_cpu(buf[0]); in policydb_read()
2541 p->symtab[i].nprim = nprim; in policydb_read()
2672 p->type_attr_map_array = kvcalloc(p->p_types.nprim, in policydb_read()
2679 for (i = 0; i < p->p_types.nprim; i++) in policydb_read()
2682 for (i = 0; i < p->p_types.nprim; i++) { in policydb_read()
2952 buf[2] = cpu_to_le32(comdatum->permissions.nprim); in common_write()
3060 buf[3] = cpu_to_le32(cladatum->permissions.nprim); in class_write()
3679 buf[0] = cpu_to_le32(p->symtab[i].nprim); in policydb_write()
3722 for (i = 0; i < p->p_types.nprim; i++) { in policydb_write()