* Given a vnode, check whether an ACL is appropriate for it * * XXXRW: No vnode lock held so can't audit vnode state...? */
| 326 | * XXXRW: No vnode lock held so can't audit vnode state...? |
| 327 | */ |
| 328 | static int |
| 329 | vacl_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); |
| 341 | out: |
| 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 |
no test coverage detected