Home
last modified time | relevance | path

Searched refs:xperms (Results 1 – 12 of 12) sorted by relevance

/external/selinux/libsepol/src/
Dutil.c124 char *sepol_extended_perms_to_string(avtab_extended_perms_t *xperms) in sepol_extended_perms_to_string() argument
137 if ((xperms->specified != AVTAB_XPERMS_IOCTLFUNCTION) in sepol_extended_perms_to_string()
138 && (xperms->specified != AVTAB_XPERMS_IOCTLDRIVER)) in sepol_extended_perms_to_string()
145 for (bit = 0; bit < sizeof(xperms->perms)*8; bit++) { in sepol_extended_perms_to_string()
146 if (!xperm_test(bit, xperms->perms)) in sepol_extended_perms_to_string()
149 if (in_range && next_bit_in_range(bit, xperms->perms)) { in sepol_extended_perms_to_string()
152 } else if (next_bit_in_range(bit, xperms->perms)) { in sepol_extended_perms_to_string()
159 if (xperms->specified & AVTAB_XPERMS_IOCTLFUNCTION) { in sepol_extended_perms_to_string()
160 value = xperms->driver<<8 | bit; in sepol_extended_perms_to_string()
161 low_value = xperms->driver<<8 | low_bit; in sepol_extended_perms_to_string()
[all …]
Davtab.c96 avtab_extended_perms_t *xperms; in avtab_insert_node() local
105 xperms = calloc(1, sizeof(avtab_extended_perms_t)); in avtab_insert_node()
106 if (xperms == NULL) { in avtab_insert_node()
110 if (datum->xperms) /* else caller populates xperms */ in avtab_insert_node()
111 *xperms = *(datum->xperms); in avtab_insert_node()
113 newnode->datum.xperms = xperms; in avtab_insert_node()
318 free(cur->datum.xperms); in avtab_destroy()
442 avtab_extended_perms_t xperms; in avtab_read_item() local
449 memset(&xperms, 0, sizeof(avtab_extended_perms_t)); in avtab_read_item()
553 xperms.specified = buf8; in avtab_read_item()
[all …]
Dassertion.c148 avtab_extended_perms_t *xperms; in report_assertion_extended_permissions() local
171 xperms = node->datum.xperms; in report_assertion_extended_permissions()
172 if ((xperms->specified != AVTAB_XPERMS_IOCTLFUNCTION) in report_assertion_extended_permissions()
173 && (xperms->specified != AVTAB_XPERMS_IOCTLDRIVER)) in report_assertion_extended_permissions()
176 rc = check_extended_permissions(avrule->xperms, xperms); in report_assertion_extended_permissions()
179 extended_permissions_violated(&error, avrule->xperms, xperms); in report_assertion_extended_permissions()
329 avtab_extended_perms_t *xperms; in check_assertion_extended_permissions_avtab() local
330 av_extended_perms_t *neverallow_xperms = avrule->xperms; in check_assertion_extended_permissions_avtab()
351 xperms = node->datum.xperms; in check_assertion_extended_permissions_avtab()
353 if ((xperms->specified != AVTAB_XPERMS_IOCTLFUNCTION) in check_assertion_extended_permissions_avtab()
[all …]
Dexpand.c1607 av_extended_perms_t *xperms) in find_avtab_node() argument
1618 if ((node->datum.xperms->specified == xperms->specified) && in find_avtab_node()
1619 (node->datum.xperms->driver == xperms->driver)) { in find_avtab_node()
1788 avtab_extended_perms_t *xperms; in expand_avrule_helper() local
1858 if (!avdatump->xperms) { in expand_avrule_helper()
1859 xperms = (avtab_extended_perms_t *) in expand_avrule_helper()
1861 if (!xperms) { in expand_avrule_helper()
1865 node->datum.xperms = xperms; in expand_avrule_helper()
1867 node->datum.xperms->specified = extended_perms->specified; in expand_avrule_helper()
1868 node->datum.xperms->driver = extended_perms->driver; in expand_avrule_helper()
[all …]
Dwrite.c240 buf8 = cur->datum.xperms->specified; in avtab_write_item()
244 buf8 = cur->datum.xperms->driver; in avtab_write_item()
248 for (i = 0; i < ARRAY_SIZE(cur->datum.xperms->perms); i++) in avtab_write_item()
249 buf32[i] = cpu_to_le32(cur->datum.xperms->perms[i]); in avtab_write_item()
/external/selinux/checkpolicy/
Dpolicy_define.c1960 avrule->xperms = NULL; in define_te_avtab_xperms_helper()
2056 av_extended_perms_t *xperms) in avrule_xperm_setrangebits() argument
2064 xperms->perms[i] |= ~0U; in avrule_xperm_setrangebits()
2067 xperms->perms[i] |= XPERM_SETBITS(h); in avrule_xperm_setrangebits()
2070 xperms->perms[i] |= ~0U - XPERM_SETBITS(low); in avrule_xperm_setrangebits()
2073 xperms->perms[i] |= XPERM_SETBITS(h) - XPERM_SETBITS(low); in avrule_xperm_setrangebits()
2077 int avrule_xperms_used(av_extended_perms_t *xperms) in avrule_xperms_used() argument
2081 for (i = 0; i < sizeof(xperms->perms)/sizeof(xperms->perms[0]); i++) { in avrule_xperms_used()
2082 if (xperms->perms[i]) in avrule_xperms_used()
2102 av_extended_perms_t *xperms; in avrule_ioctl_partialdriver() local
[all …]
Dpolicy_parse.y484 xperm_allow_def : ALLOWXPERM names names ':' names identifier xperms ';'
487 xperm_auditallow_def : AUDITALLOWXPERM names names ':' names identifier xperms ';'
490 xperm_dontaudit_def : DONTAUDITXPERM names names ':' names identifier xperms ';'
493 xperm_neverallow_def : NEVERALLOWXPERM names names ':' names identifier xperms ';'
760 xperms : xperm
/external/selinux/libsepol/include/sepol/policydb/
Dutil.h35 char *sepol_extended_perms_to_string(avtab_extended_perms_t *xperms);
Davtab.h84 avtab_extended_perms_t *xperms; member
Dpolicydb.h283 av_extended_perms_t *xperms; member
/external/selinux/libsepol/cil/src/
Dcil_binary.c1460 void __avrule_xperm_setrangebits(uint16_t low, uint16_t high, struct avtab_extended_perms *xperms) in __avrule_xperm_setrangebits() argument
1468 xperms->perms[i] |= ~0U; in __avrule_xperm_setrangebits()
1471 xperms->perms[i] |= XPERM_SETBITS(h); in __avrule_xperm_setrangebits()
1474 xperms->perms[i] |= ~0U - XPERM_SETBITS(low); in __avrule_xperm_setrangebits()
1477 xperms->perms[i] |= XPERM_SETBITS(h) - XPERM_SETBITS(low); in __avrule_xperm_setrangebits()
1485 int __cil_permx_bitmap_to_sepol_xperms_list(ebitmap_t *xperms, struct cil_list **xperms_list) in __cil_permx_bitmap_to_sepol_xperms_list() argument
1498 ebitmap_for_each_bit(xperms, node, i) { in __cil_permx_bitmap_to_sepol_xperms_list()
1499 if (!ebitmap_get_bit(xperms, i)) continue; in __cil_permx_bitmap_to_sepol_xperms_list()
1507 if (IOC_FUNC(i) != 0xff && ebitmap_get_bit(xperms, i + 1)) { in __cil_permx_bitmap_to_sepol_xperms_list()
1583 avtab_datum.xperms = item->data; in __cil_avrulex_ioctl_to_policydb()
[all …]
/external/selinux/checkpolicy/test/
Ddispol.c158 fprintf(fp, "%s;\n", sepol_extended_perms_to_string(datum->xperms)); in render_av_rule()