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

Function vacl_delete

freebsd/kern/vfs_acl.c:297–321  ·  view source on GitHub ↗

* Given a vnode, delete its ACL. */

Source from the content-addressed store, hash-verified

295 * Given a vnode, delete its ACL.
296 */
297static int
298vacl_delete(struct thread *td, struct vnode *vp, acl_type_t type)
299{
300 struct mount *mp;
301 int error;
302
303 AUDIT_ARG_VALUE(type);
304 error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
305 if (error != 0)
306 return (error);
307 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
308 AUDIT_ARG_VNODE1(vp);
309#ifdef MAC
310 error = mac_vnode_check_deleteacl(td->td_ucred, vp, type);
311 if (error != 0)
312 goto out;
313#endif
314 error = VOP_SETACL(vp, acl_type_unold(type), 0, td->td_ucred, td);
315#ifdef MAC
316out:
317#endif
318 VOP_UNLOCK(vp);
319 vn_finished_write(mp);
320 return (error);
321}
322
323/*
324 * Given a vnode, check whether an ACL is appropriate for it

Callers 2

kern___acl_delete_pathFunction · 0.85
sys___acl_delete_fdFunction · 0.85

Calls 5

vn_start_writeFunction · 0.85
vn_lockFunction · 0.85
acl_type_unoldFunction · 0.85
vn_finished_writeFunction · 0.85

Tested by

no test coverage detected