Fix link(2) auditing: use the second audit record path for the new object

name.

Approved by:	re (kib)
MFC after:	3 days
This commit is contained in:
rwatson 2009-07-01 13:22:08 +00:00
parent 39f3d3385b
commit 0e50a12ccd

View File

@ -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);