* 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. */
| 995 | * call itself. |
| 996 | */ |
| 997 | void |
| 998 | audit_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 | } |
no test coverage detected