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 };
164 ktrcapfail(type, rights);
171 * Test whether a capability grants the requested rights.
183 const cap_rights_t rights[] = { *needp, *havep };
186 ktrcapfail(CAPFAIL_NOTCAPABLE, rights);
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)
245 error = _cap_check(cap_rights(fdp, fd), rights, CAPFAIL_INCREASE);
248 fdep->fde_rights = *rights;
249 if (!cap_rights_is_set(rights, CAP_IOCTL)) {
254 if (!cap_rights_is_set(rights, CAP_FCNTL))
264 * System call to limit rights of the given capability.
269 cap_rights_t rights;
272 cap_rights_init_zero(&rights);
274 error = copyin(uap->rightsp, &rights, sizeof(rights.cr_rights[0]));
277 version = CAPVER(&rights);
281 error = copyin(uap->rightsp, &rights,
282 sizeof(rights.cr_rights[0]) * CAPARSIZE(&rights));
286 if (CAPVER(&rights) != version)
289 if (!cap_rights_is_valid(&rights))
293 rights.cr_rights[0] &= ~(0x3ULL << 62);
294 rights.cr_rights[0] |= ((uint64_t)CAP_RIGHTS_VERSION << 62);
298 ktrcaprights(&rights);
302 AUDIT_ARG_RIGHTS(&rights);
303 return (kern_cap_rights_limit(td, uap->fd, &rights));
307 * System call to query the rights mask associated with a capability.
313 cap_rights_t rights;
329 rights = *cap_rights(fdp, fd);
332 if (uap->version != CAPVER(&rights)) {
335 * doesn't contain rights not understood by the caller.
338 for (i = n; i < CAPARSIZE(&rights); i++) {
339 if ((rights.cr_rights[i] & ~(0x7FULL << 57)) != 0)
343 error = copyout(&rights, uap->rightsp, sizeof(rights.cr_rights[0]) * n);
346 ktrcaprights(&rights);
617 uint32_t rights;
631 rights = fdep->fde_fcntls;
634 return (copyout(&rights, uap->fcntlrightsp, sizeof(rights)));