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

Function vacl_aclcheck

freebsd/kern/vfs_acl.c:328–344  ·  view source on GitHub ↗

* Given a vnode, check whether an ACL is appropriate for it * * XXXRW: No vnode lock held so can't audit vnode state...? */

Source from the content-addressed store, hash-verified

326 * XXXRW: No vnode lock held so can't audit vnode state...?
327 */
328static int
329vacl_aclcheck(struct thread *td, struct vnode *vp, acl_type_t type,
330 const struct acl *aclp)
331{
332 struct acl *inkernelacl;
333 int error;
334
335 inkernelacl = acl_alloc(M_WAITOK);
336 error = acl_copyin(aclp, inkernelacl, type);
337 if (error != 0)
338 goto out;
339 error = VOP_ACLCHECK(vp, acl_type_unold(type), inkernelacl,
340 td->td_ucred, td);
341out:
342 acl_free(inkernelacl);
343 return (error);
344}
345
346/*
347 * syscalls -- convert the path/fd to a vnode, and call vacl_whatever. Don't

Callers 2

kern___acl_aclcheck_pathFunction · 0.85
sys___acl_aclcheck_fdFunction · 0.85

Calls 4

acl_copyinFunction · 0.85
acl_type_unoldFunction · 0.85
acl_allocFunction · 0.70
acl_freeFunction · 0.70

Tested by

no test coverage detected