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

Function audit_sysclose

freebsd/security/audit/audit_arg.c:997–1017  ·  view source on GitHub ↗

* The close() system call uses it's own audit call to capture the path/vnode * information because those pieces are not easily obtained within the system * call itself. */

Source from the content-addressed store, hash-verified

995 * call itself.
996 */
997void
998audit_sysclose(struct thread *td, int fd, struct file *fp)
999{
1000 struct kaudit_record *ar;
1001 struct vnode *vp;
1002
1003 KASSERT(td != NULL, ("audit_sysclose: td == NULL"));
1004
1005 ar = currecord();
1006 if (ar == NULL)
1007 return;
1008
1009 audit_arg_fd(fd);
1010
1011 vp = fp->f_vnode;
1012 if (vp == NULL)
1013 return;
1014 vn_lock(vp, LK_SHARED | LK_RETRY);
1015 audit_arg_vnode1(vp);
1016 VOP_UNLOCK(vp);
1017}

Callers 1

closefp_implFunction · 0.85

Calls 4

currecordFunction · 0.85
audit_arg_fdFunction · 0.85
vn_lockFunction · 0.85
audit_arg_vnode1Function · 0.85

Tested by

no test coverage detected