Lines Matching full:rights

174 cap_rights_vset(cap_rights_t *rights, va_list ap)  in cap_rights_vset()  argument
179 assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); in cap_rights_vset()
181 n = CAPARSIZE(rights); in cap_rights_vset()
192 assert(CAPIDXBIT(rights->cr_rights[i]) == CAPIDXBIT(right)); in cap_rights_vset()
193 rights->cr_rights[i] |= right; in cap_rights_vset()
194 assert(CAPIDXBIT(rights->cr_rights[i]) == CAPIDXBIT(right)); in cap_rights_vset()
199 cap_rights_vclear(cap_rights_t *rights, va_list ap) in cap_rights_vclear() argument
204 assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); in cap_rights_vclear()
206 n = CAPARSIZE(rights); in cap_rights_vclear()
217 assert(CAPIDXBIT(rights->cr_rights[i]) == CAPIDXBIT(right)); in cap_rights_vclear()
218 rights->cr_rights[i] &= ~(right & 0x01FFFFFFFFFFFFFFULL); in cap_rights_vclear()
219 assert(CAPIDXBIT(rights->cr_rights[i]) == CAPIDXBIT(right)); in cap_rights_vclear()
224 cap_rights_is_vset(const cap_rights_t *rights, va_list ap) in cap_rights_is_vset() argument
229 assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); in cap_rights_is_vset()
231 n = CAPARSIZE(rights); in cap_rights_is_vset()
242 assert(CAPIDXBIT(rights->cr_rights[i]) == CAPIDXBIT(right)); in cap_rights_is_vset()
243 if ((rights->cr_rights[i] & right) != right) in cap_rights_is_vset()
251 __cap_rights_init(int version, cap_rights_t *rights, ...) in __cap_rights_init() argument
260 CAP_NONE(rights); in __cap_rights_init()
261 va_start(ap, rights); in __cap_rights_init()
262 cap_rights_vset(rights, ap); in __cap_rights_init()
265 return (rights); in __cap_rights_init()
269 __cap_rights_set(cap_rights_t *rights, ...) in __cap_rights_set() argument
273 assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); in __cap_rights_set()
275 va_start(ap, rights); in __cap_rights_set()
276 cap_rights_vset(rights, ap); in __cap_rights_set()
279 return (rights); in __cap_rights_set()
283 __cap_rights_clear(cap_rights_t *rights, ...) in __cap_rights_clear() argument
287 assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); in __cap_rights_clear()
289 va_start(ap, rights); in __cap_rights_clear()
290 cap_rights_vclear(rights, ap); in __cap_rights_clear()
293 return (rights); in __cap_rights_clear()
297 __cap_rights_is_set(const cap_rights_t *rights, ...) in __cap_rights_is_set() argument
302 assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); in __cap_rights_is_set()
304 va_start(ap, rights); in __cap_rights_is_set()
305 ret = cap_rights_is_vset(rights, ap); in __cap_rights_is_set()
312 cap_rights_is_empty(const cap_rights_t *rights) in cap_rights_is_empty() argument
319 assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); in cap_rights_is_empty()
322 for (int i = 0; i < CAPARSIZE(rights); i++) { in cap_rights_is_empty()
323 if (rights->cr_rights[i] != cap_no_rights.cr_rights[i]) in cap_rights_is_empty()
331 cap_rights_is_valid(const cap_rights_t *rights) in cap_rights_is_valid() argument
336 if (CAPVER(rights) != CAP_RIGHTS_VERSION_00) in cap_rights_is_valid()
338 if (CAPARSIZE(rights) < CAPARSIZE_MIN || in cap_rights_is_valid()
339 CAPARSIZE(rights) > CAPARSIZE_MAX) { in cap_rights_is_valid()
343 if (!cap_rights_contains(&allrights, rights)) in cap_rights_is_valid()
345 for (i = 0; i < CAPARSIZE(rights); i++) { in cap_rights_is_valid()
346 j = right_to_index(rights->cr_rights[i]); in cap_rights_is_valid()
350 if (CAPRVER(rights->cr_rights[i]) != 0) in cap_rights_is_valid()