Lines Matching refs:fdep

215 cap_rights_fde(const struct filedescent *fdep)  in cap_rights_fde()  argument
218 return (cap_rights_fde_inline(fdep)); in cap_rights_fde()
232 struct filedescent *fdep; in kern_cap_rights_limit() local
238 fdep = fdeget_noref(fdp, fd); in kern_cap_rights_limit()
239 if (fdep == NULL) { in kern_cap_rights_limit()
246 seqc_write_begin(&fdep->fde_seqc); in kern_cap_rights_limit()
247 fdep->fde_rights = *rights; in kern_cap_rights_limit()
249 ioctls = fdep->fde_ioctls; in kern_cap_rights_limit()
250 fdep->fde_ioctls = NULL; in kern_cap_rights_limit()
251 fdep->fde_nioctls = 0; in kern_cap_rights_limit()
254 fdep->fde_fcntls = 0; in kern_cap_rights_limit()
255 seqc_write_end(&fdep->fde_seqc); in kern_cap_rights_limit()
358 struct filedescent *fdep; in cap_ioctl_check() local
366 fdep = fdeget_noref(fdp, fd); in cap_ioctl_check()
367 KASSERT(fdep != NULL, in cap_ioctl_check()
370 ncmds = fdep->fde_nioctls; in cap_ioctl_check()
374 cmds = fdep->fde_ioctls; in cap_ioctl_check()
387 cap_ioctl_limit_check(struct filedescent *fdep, const u_long *cmds, in cap_ioctl_limit_check() argument
395 oncmds = fdep->fde_nioctls; in cap_ioctl_limit_check()
401 ocmds = fdep->fde_ioctls; in cap_ioctl_limit_check()
418 struct filedescent *fdep; in kern_cap_ioctls_limit() local
432 fdep = fdeget_noref(fdp, fd); in kern_cap_ioctls_limit()
433 if (fdep == NULL) { in kern_cap_ioctls_limit()
438 error = cap_ioctl_limit_check(fdep, cmds, ncmds); in kern_cap_ioctls_limit()
442 ocmds = fdep->fde_ioctls; in kern_cap_ioctls_limit()
443 seqc_write_begin(&fdep->fde_seqc); in kern_cap_ioctls_limit()
444 fdep->fde_ioctls = cmds; in kern_cap_ioctls_limit()
445 fdep->fde_nioctls = ncmds; in kern_cap_ioctls_limit()
446 seqc_write_end(&fdep->fde_seqc); in kern_cap_ioctls_limit()
487 struct filedescent *fdep; in sys_cap_ioctls_get() local
508 fdep = fdeget_noref(fdp, fd); in sys_cap_ioctls_get()
509 if (fdep == NULL) { in sys_cap_ioctls_get()
514 count = fdep->fde_nioctls; in sys_cap_ioctls_get()
517 memcpy(cmdsp, fdep->fde_ioctls, sizeof(cmdsp[0]) * ncmds); in sys_cap_ioctls_get()
548 cap_fcntl_check_fde(struct filedescent *fdep, int cmd) in cap_fcntl_check_fde() argument
556 if ((fdep->fde_fcntls & fcntlcap) != 0) in cap_fcntl_check_fde()
576 struct filedescent *fdep; in sys_cap_fcntls_limit() local
592 fdep = fdeget_noref(fdp, fd); in sys_cap_fcntls_limit()
593 if (fdep == NULL) { in sys_cap_fcntls_limit()
598 if ((fcntlrights & ~fdep->fde_fcntls) != 0) { in sys_cap_fcntls_limit()
603 seqc_write_begin(&fdep->fde_seqc); in sys_cap_fcntls_limit()
604 fdep->fde_fcntls = fcntlrights; in sys_cap_fcntls_limit()
605 seqc_write_end(&fdep->fde_seqc); in sys_cap_fcntls_limit()
615 struct filedescent *fdep; in sys_cap_fcntls_get() local
625 fdep = fdeget_noref(fdp, fd); in sys_cap_fcntls_get()
626 if (fdep == NULL) { in sys_cap_fcntls_get()
630 rights = fdep->fde_fcntls; in sys_cap_fcntls_get()