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

Function sys___acl_set_fd

freebsd/kern/vfs_acl.c:450–465  ·  view source on GitHub ↗

* Given a file descriptor, set an ACL for it. */

Source from the content-addressed store, hash-verified

448 * Given a file descriptor, set an ACL for it.
449 */
450int
451sys___acl_set_fd(struct thread *td, struct __acl_set_fd_args *uap)
452{
453 struct file *fp;
454 cap_rights_t rights;
455 int error;
456
457 AUDIT_ARG_FD(uap->filedes);
458 error = getvnode(td, uap->filedes,
459 cap_rights_init_one(&rights, CAP_ACL_SET), &fp);
460 if (error == 0) {
461 error = vacl_set_acl(td, fp->f_vnode, uap->type, uap->aclp);
462 fdrop(fp, td);
463 }
464 return (error);
465}
466
467/*
468 * Given a file path, delete an ACL from it.

Callers

nothing calls this directly

Calls 2

getvnodeFunction · 0.85
vacl_set_aclFunction · 0.85

Tested by

no test coverage detected