Lines Matching refs:fdep

216 cap_rights_fde(const struct filedescent *fdep)  in cap_rights_fde()  argument
219 return (cap_rights_fde_inline(fdep)); in cap_rights_fde()
233 struct filedescent *fdep; in kern_cap_rights_limit() local
239 fdep = fdeget_noref(fdp, fd); in kern_cap_rights_limit()
240 if (fdep == NULL) { in kern_cap_rights_limit()
247 seqc_write_begin(&fdep->fde_seqc); in kern_cap_rights_limit()
248 fdep->fde_rights = *rights; in kern_cap_rights_limit()
250 ioctls = fdep->fde_ioctls; in kern_cap_rights_limit()
251 fdep->fde_ioctls = NULL; in kern_cap_rights_limit()
252 fdep->fde_nioctls = 0; in kern_cap_rights_limit()
255 fdep->fde_fcntls = 0; in kern_cap_rights_limit()
256 seqc_write_end(&fdep->fde_seqc); in kern_cap_rights_limit()
359 struct filedescent *fdep; in cap_ioctl_check() local
367 fdep = fdeget_noref(fdp, fd); in cap_ioctl_check()
368 KASSERT(fdep != NULL, in cap_ioctl_check()
371 ncmds = fdep->fde_nioctls; in cap_ioctl_check()
375 cmds = fdep->fde_ioctls; in cap_ioctl_check()
388 cap_ioctl_limit_check(struct filedescent *fdep, const u_long *cmds, in cap_ioctl_limit_check() argument
396 oncmds = fdep->fde_nioctls; in cap_ioctl_limit_check()
402 ocmds = fdep->fde_ioctls; in cap_ioctl_limit_check()
419 struct filedescent *fdep; in kern_cap_ioctls_limit() local
433 fdep = fdeget_noref(fdp, fd); in kern_cap_ioctls_limit()
434 if (fdep == NULL) { in kern_cap_ioctls_limit()
439 error = cap_ioctl_limit_check(fdep, cmds, ncmds); in kern_cap_ioctls_limit()
443 ocmds = fdep->fde_ioctls; in kern_cap_ioctls_limit()
444 seqc_write_begin(&fdep->fde_seqc); in kern_cap_ioctls_limit()
445 fdep->fde_ioctls = cmds; in kern_cap_ioctls_limit()
446 fdep->fde_nioctls = ncmds; in kern_cap_ioctls_limit()
447 seqc_write_end(&fdep->fde_seqc); in kern_cap_ioctls_limit()
488 struct filedescent *fdep; in sys_cap_ioctls_get() local
509 fdep = fdeget_noref(fdp, fd); in sys_cap_ioctls_get()
510 if (fdep == NULL) { in sys_cap_ioctls_get()
515 count = fdep->fde_nioctls; in sys_cap_ioctls_get()
518 memcpy(cmdsp, fdep->fde_ioctls, sizeof(cmdsp[0]) * ncmds); in sys_cap_ioctls_get()
549 cap_fcntl_check_fde(struct filedescent *fdep, int cmd) in cap_fcntl_check_fde() argument
557 if ((fdep->fde_fcntls & fcntlcap) != 0) in cap_fcntl_check_fde()
577 struct filedescent *fdep; in sys_cap_fcntls_limit() local
593 fdep = fdeget_noref(fdp, fd); in sys_cap_fcntls_limit()
594 if (fdep == NULL) { in sys_cap_fcntls_limit()
599 if ((fcntlrights & ~fdep->fde_fcntls) != 0) { in sys_cap_fcntls_limit()
604 seqc_write_begin(&fdep->fde_seqc); in sys_cap_fcntls_limit()
605 fdep->fde_fcntls = fcntlrights; in sys_cap_fcntls_limit()
606 seqc_write_end(&fdep->fde_seqc); in sys_cap_fcntls_limit()
616 struct filedescent *fdep; in sys_cap_fcntls_get() local
626 fdep = fdeget_noref(fdp, fd); in sys_cap_fcntls_get()
627 if (fdep == NULL) { in sys_cap_fcntls_get()
631 rights = fdep->fde_fcntls; in sys_cap_fcntls_get()