| 613 | } |
| 614 | |
| 615 | int |
| 616 | sys_cap_fcntls_get(struct thread *td, struct cap_fcntls_get_args *uap) |
| 617 | { |
| 618 | struct filedesc *fdp; |
| 619 | struct filedescent *fdep; |
| 620 | uint32_t rights; |
| 621 | int fd; |
| 622 | |
| 623 | fd = uap->fd; |
| 624 | |
| 625 | AUDIT_ARG_FD(fd); |
| 626 | |
| 627 | fdp = td->td_proc->p_fd; |
| 628 | FILEDESC_SLOCK(fdp); |
| 629 | fdep = fdeget_locked(fdp, fd); |
| 630 | if (fdep == NULL) { |
| 631 | FILEDESC_SUNLOCK(fdp); |
| 632 | return (EBADF); |
| 633 | } |
| 634 | rights = fdep->fde_fcntls; |
| 635 | FILEDESC_SUNLOCK(fdp); |
| 636 | |
| 637 | return (copyout(&rights, uap->fcntlrightsp, sizeof(rights))); |
| 638 | } |
| 639 | |
| 640 | #else /* !CAPABILITIES */ |
| 641 |
nothing calls this directly
no test coverage detected