Lines Matching full:rights

7  * All rights reserved.
49 * rights mask set when the capability is created. New capabilities may be
51 * strict subset of the rights on the original capability.
160 const cap_rights_t rights[] = { *needp, *havep }; in _cap_check() local
164 ktrcapfail(type, rights); in _cap_check()
171 * Test whether a capability grants the requested rights.
183 const cap_rights_t rights[] = { *needp, *havep }; in cap_check_failed_notcapable() local
186 ktrcapfail(CAPFAIL_NOTCAPABLE, rights); in cap_check_failed_notcapable()
191 * Convert capability rights into VM access flags.
210 * Extract rights from a capability for monitoring purposes -- not for use in
230 kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights) in kern_cap_rights_limit() argument
245 error = _cap_check(cap_rights(fdp, fd), rights, CAPFAIL_INCREASE); in kern_cap_rights_limit()
248 fdep->fde_rights = *rights; in kern_cap_rights_limit()
249 if (!cap_rights_is_set(rights, CAP_IOCTL)) { in kern_cap_rights_limit()
254 if (!cap_rights_is_set(rights, CAP_FCNTL)) in kern_cap_rights_limit()
264 * System call to limit rights of the given capability.
269 cap_rights_t rights; in sys_cap_rights_limit() local
272 cap_rights_init_zero(&rights); in sys_cap_rights_limit()
274 error = copyin(uap->rightsp, &rights, sizeof(rights.cr_rights[0])); in sys_cap_rights_limit()
277 version = CAPVER(&rights); in sys_cap_rights_limit()
281 error = copyin(uap->rightsp, &rights, in sys_cap_rights_limit()
282 sizeof(rights.cr_rights[0]) * CAPARSIZE(&rights)); in sys_cap_rights_limit()
286 if (CAPVER(&rights) != version) in sys_cap_rights_limit()
289 if (!cap_rights_is_valid(&rights)) in sys_cap_rights_limit()
293 rights.cr_rights[0] &= ~(0x3ULL << 62); in sys_cap_rights_limit()
294 rights.cr_rights[0] |= ((uint64_t)CAP_RIGHTS_VERSION << 62); in sys_cap_rights_limit()
298 ktrcaprights(&rights); in sys_cap_rights_limit()
302 AUDIT_ARG_RIGHTS(&rights); in sys_cap_rights_limit()
303 return (kern_cap_rights_limit(td, uap->fd, &rights)); in sys_cap_rights_limit()
307 * System call to query the rights mask associated with a capability.
313 cap_rights_t rights; in sys___cap_rights_get() local
329 rights = *cap_rights(fdp, fd); in sys___cap_rights_get()
332 if (uap->version != CAPVER(&rights)) { in sys___cap_rights_get()
335 * doesn't contain rights not understood by the caller. in sys___cap_rights_get()
338 for (i = n; i < CAPARSIZE(&rights); i++) { in sys___cap_rights_get()
339 if ((rights.cr_rights[i] & ~(0x7FULL << 57)) != 0) in sys___cap_rights_get()
343 error = copyout(&rights, uap->rightsp, sizeof(rights.cr_rights[0]) * n); in sys___cap_rights_get()
346 ktrcaprights(&rights); in sys___cap_rights_get()
617 uint32_t rights; in sys_cap_fcntls_get() local
631 rights = fdep->fde_fcntls; in sys_cap_fcntls_get()
634 return (copyout(&rights, uap->fcntlrightsp, sizeof(rights))); in sys_cap_fcntls_get()