From c5957d6bba0c4cc0539a5d16d00e7a9a368a686a Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Wed, 1 Jul 2009 13:22:08 +0000 Subject: [PATCH] Fix link(2) auditing: use the second audit record path for the new object name. Approved by: re (kib) MFC after: 3 days --- sys/kern/vfs_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 496cecf6027c..f3d21e9b9829 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1583,7 +1583,7 @@ kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2, VFS_UNLOCK_GIANT(vfslocked); return (error); } - NDINIT_AT(&nd, CREATE, LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, + NDINIT_AT(&nd, CREATE, LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE2, segflg, path2, fd2, td); if ((error = namei(&nd)) == 0) { lvfslocked = NDHASGIANT(&nd);