Home
last modified time | relevance | path

Searched refs:cladatum (Results 1 – 10 of 10) sorted by relevance

/external/selinux/checkpolicy/
Dcheckpolicy.c385 class_datum_t *cladatum; in main() local
709 cladatum = in main()
713 cladatum = in main()
718 if (!cladatum) { in main()
722 tclass = cladatum->s.value; in main()
725 if (!cladatum->comdatum && !cladatum->permissions.nprim) { in main()
738 hashtab_map(cladatum-> in main()
742 if (!ret && cladatum->comdatum) { in main()
745 (cladatum-> in main()
827 cladatum = in main()
[all …]
Dpolicy_define.c338 class_datum_t *cladatum; in read_classes() local
345 cladatum = hashtab_search(policydbp->p_classes.table, id); in read_classes()
346 if (!cladatum) { in read_classes()
350 if (ebitmap_set_bit(e_classes, cladatum->s.value - 1, TRUE)) { in read_classes()
362 class_datum_t *cladatum; in define_default_user() local
375 cladatum = hashtab_search(policydbp->p_classes.table, id); in define_default_user()
376 if (!cladatum) { in define_default_user()
380 if (cladatum->default_user && cladatum->default_user != which) { in define_default_user()
384 cladatum->default_user = which; in define_default_user()
394 class_datum_t *cladatum; in define_default_role() local
[all …]
Dmodule_compiler.c732 static void class_datum_destroy(class_datum_t * cladatum) in class_datum_destroy() argument
734 if (cladatum != NULL) { in class_datum_destroy()
735 hashtab_map(cladatum->permissions.table, perm_destroy, NULL); in class_datum_destroy()
736 hashtab_destroy(cladatum->permissions.table); in class_datum_destroy()
737 free(cladatum); in class_datum_destroy()
1297 class_datum_t *cladatum = in is_perm_in_scope() local
1301 if (cladatum == NULL) { in is_perm_in_scope()
1304 perdatum = (perm_datum_t *) hashtab_search(cladatum->permissions.table, in is_perm_in_scope()
1309 return is_perm_in_stack(perdatum->s.value, cladatum->s.value, in is_perm_in_scope()
/external/selinux/libsepol/src/
Davrule_block.c179 class_datum_t *cladatum; in is_perm_enabled() local
184 cladatum = in is_perm_enabled()
186 if (cladatum == NULL) { in is_perm_enabled()
189 perm = hashtab_search(cladatum->permissions.table, perm_id); in is_perm_enabled()
190 if (perm == NULL && cladatum->comdatum != 0) { in is_perm_enabled()
194 hashtab_search(cladatum->comdatum->permissions.table, in is_perm_enabled()
Dutil.c86 class_datum_t *cladatum; in sepol_av_to_string() local
92 cladatum = policydbp->class_val_to_struct[tclass - 1]; in sepol_av_to_string()
94 for (i = 0; i < cladatum->permissions.nprim; i++) { in sepol_av_to_string()
97 rc = hashtab_map(cladatum->permissions.table, in sepol_av_to_string()
99 if (!rc && cladatum->comdatum) { in sepol_av_to_string()
100 rc = hashtab_map(cladatum->comdatum-> in sepol_av_to_string()
Dpolicydb.c860 class_datum_t *cladatum; in class_index() local
862 cladatum = (class_datum_t *) datum; in class_index()
864 if (!cladatum->s.value || cladatum->s.value > p->p_classes.nprim) in class_index()
866 p->p_class_val_to_name[cladatum->s.value - 1] = (char *)key; in class_index()
867 p->class_val_to_struct[cladatum->s.value - 1] = cladatum; in class_index()
1144 class_datum_t *cladatum; in class_destroy() local
1150 cladatum = (class_datum_t *) datum; in class_destroy()
1151 if (cladatum == NULL) { in class_destroy()
1154 (void)hashtab_map(cladatum->permissions.table, perm_destroy, 0); in class_destroy()
1155 hashtab_destroy(cladatum->permissions.table); in class_destroy()
[all …]
Dwrite.c948 class_datum_t *cladatum; in class_write() local
956 cladatum = (class_datum_t *) datum; in class_write()
959 if (cladatum->comkey) in class_write()
960 len2 = strlen(cladatum->comkey); in class_write()
965 for (c = cladatum->constraints; c; c = c->next) { in class_write()
972 buf[items++] = cpu_to_le32(cladatum->s.value); in class_write()
973 buf[items++] = cpu_to_le32(cladatum->permissions.nprim); in class_write()
974 if (cladatum->permissions.table) in class_write()
975 buf[items++] = cpu_to_le32(cladatum->permissions.table->nel); in class_write()
987 if (cladatum->comkey) { in class_write()
[all …]
Dlink.c247 class_datum_t *cladatum, *new_class = NULL; in class_copy_callback() local
252 cladatum = (class_datum_t *) datum; in class_copy_callback()
319 state->cur->map[SYM_CLASSES][cladatum->s.value - 1] = in class_copy_callback()
323 state->src_class = cladatum; in class_copy_callback()
328 ret = class_copy_default_new_object(state, cladatum, new_class); in class_copy_callback()
333 hashtab_map(cladatum->permissions.table, permission_copy_callback, in class_copy_callback()
2029 class_datum_t *cladatum; in is_decl_requires_met() local
2038 cladatum = pol->class_val_to_struct[i]; in is_decl_requires_met()
2053 (void)hashtab_map(cladatum->permissions.table, find_perm, in is_decl_requires_met()
2055 if (fparg.key == NULL && cladatum->comdatum != NULL) { in is_decl_requires_met()
[all …]
Dservices.c1489 class_datum_t *cladatum, *cladatum2; in validate_class() local
1492 cladatum = (class_datum_t *) datum; in validate_class()
1500 if (cladatum->s.value != cladatum2->s.value) { in validate_class()
1504 if ((cladatum->comdatum && !cladatum2->comdatum) || in validate_class()
1505 (!cladatum->comdatum && cladatum2->comdatum)) { in validate_class()
1510 if (cladatum->comdatum) { in validate_class()
1512 (cladatum->comdatum->permissions.table, validate_perm, in validate_class()
1520 if (hashtab_map(cladatum->permissions.table, validate_perm, in validate_class()
/external/selinux/policycoreutils/sepolgen-ifgen/
Dsepolgen-ifgen-attr-helper.c60 class_datum_t *cladatum; in render_access_mask() local
66 cladatum = policydbp->class_val_to_struct[tclass - 1]; in render_access_mask()
67 for (i = 0; i < cladatum->permissions.nprim; i++) { in render_access_mask()
70 rc = hashtab_map(cladatum->permissions.table, in render_access_mask()
72 if (!rc && cladatum->comdatum) { in render_access_mask()
73 rc = hashtab_map(cladatum->comdatum-> in render_access_mask()