Lines Matching refs:xperms
1970 avrule->xperms = NULL; in define_te_avtab_xperms_helper()
2071 av_extended_perms_t *xperms) in avrule_xperm_setrangebits() argument
2079 xperms->perms[i] |= ~0U; in avrule_xperm_setrangebits()
2082 xperms->perms[i] |= XPERM_SETBITS(h); in avrule_xperm_setrangebits()
2085 xperms->perms[i] |= ~0U - XPERM_SETBITS(low); in avrule_xperm_setrangebits()
2088 xperms->perms[i] |= XPERM_SETBITS(h) - XPERM_SETBITS(low); in avrule_xperm_setrangebits()
2092 int avrule_xperms_used(av_extended_perms_t *xperms) in avrule_xperms_used() argument
2096 for (i = 0; i < sizeof(xperms->perms)/sizeof(xperms->perms[0]); i++) { in avrule_xperms_used()
2097 if (xperms->perms[i]) in avrule_xperms_used()
2117 av_extended_perms_t *xperms; in avrule_ioctl_partialdriver() local
2120 xperms = calloc(1, sizeof(av_extended_perms_t)); in avrule_ioctl_partialdriver()
2121 if (!xperms) { in avrule_ioctl_partialdriver()
2132 xperm_set(low, xperms->perms); in avrule_ioctl_partialdriver()
2134 xperm_set(high, xperms->perms); in avrule_ioctl_partialdriver()
2136 xperm_set(low, xperms->perms); in avrule_ioctl_partialdriver()
2137 xperm_set(high, xperms->perms); in avrule_ioctl_partialdriver()
2141 if (avrule_xperms_used(xperms)) { in avrule_ioctl_partialdriver()
2142 *extended_perms = xperms; in avrule_ioctl_partialdriver()
2144 free(xperms); in avrule_ioctl_partialdriver()
2155 av_extended_perms_t *xperms; in avrule_ioctl_completedriver() local
2157 xperms = calloc(1, sizeof(av_extended_perms_t)); in avrule_ioctl_completedriver()
2158 if (!xperms) { in avrule_ioctl_completedriver()
2179 avrule_xperm_setrangebits(low, high - 1, xperms); in avrule_ioctl_completedriver()
2182 if (avrule_xperms_used(xperms)) { in avrule_ioctl_completedriver()
2183 xperms->driver = 0x00; in avrule_ioctl_completedriver()
2184 xperms->specified = AVRULE_XPERMS_IOCTLDRIVER; in avrule_ioctl_completedriver()
2185 *extended_perms = xperms; in avrule_ioctl_completedriver()
2187 free(xperms); in avrule_ioctl_completedriver()
2197 av_extended_perms_t *xperms; in avrule_ioctl_func() local
2201 xperms = calloc(1, sizeof(av_extended_perms_t)); in avrule_ioctl_func()
2202 if (!xperms) { in avrule_ioctl_func()
2228 avrule_xperm_setrangebits(low, high, xperms); in avrule_ioctl_func()
2229 xperms->driver = driver; in avrule_ioctl_func()
2230 xperms->specified = AVRULE_XPERMS_IOCTLFUNCTION; in avrule_ioctl_func()
2234 if (avrule_xperms_used(xperms)) { in avrule_ioctl_func()
2235 *extended_perms = xperms; in avrule_ioctl_func()
2237 free(xperms); in avrule_ioctl_func()
2254 unsigned int xperms_for_each_bit(unsigned int *bit, av_extended_perms_t *xperms) in xperms_for_each_bit() argument
2257 for (i = *bit; i < sizeof(xperms->perms)*8; i++) { in xperms_for_each_bit()
2258 if (xperm_test(i,xperms->perms)) { in xperms_for_each_bit()
2259 xperm_clear(i, xperms->perms); in xperms_for_each_bit()
2319 av_extended_perms_t *complete_driver, *partial_driver, *xperms; in define_te_avtab_ioctl() local
2338 avrule->xperms = complete_driver; in define_te_avtab_ioctl()
2356 if (avrule_ioctl_func(rangelist, &xperms, i)) in define_te_avtab_ioctl()
2359 if (xperms) { in define_te_avtab_ioctl()
2367 avrule->xperms = xperms; in define_te_avtab_ioctl()
2434 avrule->xperms = NULL; in define_te_avtab_helper()