MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sys_extattr_delete_fd

Function sys_extattr_delete_fd

freebsd/kern/vfs_extattr.c:532–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530};
531#endif
532int
533sys_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_
559struct extattr_delete_file_args {

Callers

nothing calls this directly

Calls 3

getvnodeFunction · 0.85
extattr_delete_vpFunction · 0.85
copyinstrFunction · 0.50

Tested by

no test coverage detected