Lines Matching refs:xperms
2055 avrule->xperms = NULL; in define_te_avtab_xperms_helper()
2156 av_extended_perms_t *xperms) in avrule_xperm_setrangebits() argument
2164 xperms->perms[i] |= ~0U; in avrule_xperm_setrangebits()
2167 xperms->perms[i] |= XPERM_SETBITS(h); in avrule_xperm_setrangebits()
2170 xperms->perms[i] |= ~0U - XPERM_SETBITS(low); in avrule_xperm_setrangebits()
2173 xperms->perms[i] |= XPERM_SETBITS(h) - XPERM_SETBITS(low); in avrule_xperm_setrangebits()
2177 int avrule_xperms_used(av_extended_perms_t *xperms) in avrule_xperms_used() argument
2181 for (i = 0; i < sizeof(xperms->perms)/sizeof(xperms->perms[0]); i++) { in avrule_xperms_used()
2182 if (xperms->perms[i]) in avrule_xperms_used()
2202 av_extended_perms_t *xperms; in avrule_ioctl_partialdriver() local
2205 xperms = calloc(1, sizeof(av_extended_perms_t)); in avrule_ioctl_partialdriver()
2206 if (!xperms) { in avrule_ioctl_partialdriver()
2217 xperm_set(low, xperms->perms); in avrule_ioctl_partialdriver()
2219 xperm_set(high, xperms->perms); in avrule_ioctl_partialdriver()
2221 xperm_set(low, xperms->perms); in avrule_ioctl_partialdriver()
2222 xperm_set(high, xperms->perms); in avrule_ioctl_partialdriver()
2226 if (avrule_xperms_used(xperms)) { in avrule_ioctl_partialdriver()
2227 *extended_perms = xperms; in avrule_ioctl_partialdriver()
2229 free(xperms); in avrule_ioctl_partialdriver()
2240 av_extended_perms_t *xperms; in avrule_ioctl_completedriver() local
2242 xperms = calloc(1, sizeof(av_extended_perms_t)); in avrule_ioctl_completedriver()
2243 if (!xperms) { in avrule_ioctl_completedriver()
2264 avrule_xperm_setrangebits(low, high - 1, xperms); in avrule_ioctl_completedriver()
2267 if (avrule_xperms_used(xperms)) { in avrule_ioctl_completedriver()
2268 xperms->driver = 0x00; in avrule_ioctl_completedriver()
2269 xperms->specified = AVRULE_XPERMS_IOCTLDRIVER; in avrule_ioctl_completedriver()
2270 *extended_perms = xperms; in avrule_ioctl_completedriver()
2272 free(xperms); in avrule_ioctl_completedriver()
2282 av_extended_perms_t *xperms; in avrule_ioctl_func() local
2286 xperms = calloc(1, sizeof(av_extended_perms_t)); in avrule_ioctl_func()
2287 if (!xperms) { in avrule_ioctl_func()
2313 avrule_xperm_setrangebits(low, high, xperms); in avrule_ioctl_func()
2314 xperms->driver = driver; in avrule_ioctl_func()
2315 xperms->specified = AVRULE_XPERMS_IOCTLFUNCTION; in avrule_ioctl_func()
2319 if (avrule_xperms_used(xperms)) { in avrule_ioctl_func()
2320 *extended_perms = xperms; in avrule_ioctl_func()
2322 free(xperms); in avrule_ioctl_func()
2339 unsigned int xperms_for_each_bit(unsigned int *bit, av_extended_perms_t *xperms) in xperms_for_each_bit() argument
2342 for (i = *bit; i < sizeof(xperms->perms)*8; i++) { in xperms_for_each_bit()
2343 if (xperm_test(i,xperms->perms)) { in xperms_for_each_bit()
2344 xperm_clear(i, xperms->perms); in xperms_for_each_bit()
2404 av_extended_perms_t *complete_driver, *partial_driver, *xperms; in define_te_avtab_ioctl() local
2423 avrule->xperms = complete_driver; in define_te_avtab_ioctl()
2441 if (avrule_ioctl_func(rangelist, &xperms, i)) in define_te_avtab_ioctl()
2444 if (xperms) { in define_te_avtab_ioctl()
2452 avrule->xperms = xperms; in define_te_avtab_ioctl()
2519 avrule->xperms = NULL; in define_te_avtab_helper()