| 530 | }; |
| 531 | #endif |
| 532 | int |
| 533 | sys_extattr_delete_fd(struct thread *td, struct extattr_delete_fd_args *uap) |
| 534 | { |
| 535 | struct file *fp; |
| 536 | char attrname[EXTATTR_MAXNAMELEN + 1]; |
| 537 | cap_rights_t rights; |
| 538 | int error; |
| 539 | |
| 540 | AUDIT_ARG_FD(uap->fd); |
| 541 | AUDIT_ARG_VALUE(uap->attrnamespace); |
| 542 | error = copyinstr(uap->attrname, attrname, sizeof(attrname), NULL); |
| 543 | if (error) |
| 544 | return (error); |
| 545 | AUDIT_ARG_TEXT(attrname); |
| 546 | |
| 547 | error = getvnode(td, uap->fd, |
| 548 | cap_rights_init_one(&rights, CAP_EXTATTR_DELETE), &fp); |
| 549 | if (error) |
| 550 | return (error); |
| 551 | |
| 552 | error = extattr_delete_vp(fp->f_vnode, uap->attrnamespace, |
| 553 | attrname, td); |
| 554 | fdrop(fp, td); |
| 555 | return (error); |
| 556 | } |
| 557 | |
| 558 | #ifndef _SYS_SYSPROTO_H_ |
| 559 | struct extattr_delete_file_args { |
nothing calls this directly
no test coverage detected