Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2005 11:07:20 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 84047 for review
Message-ID:  <200509211107.j8LB7KuH041132@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=84047

Change 84047 by rwatson@rwatson_zoo on 2005/09/21 11:06:45

	Audit vnode data in getdirentries() only after necessary vnode
	locking and Giant locking has occurred.

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/kern/vfs_syscalls.c#12 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/sys/kern/vfs_syscalls.c#12 (text+ko) ====

@@ -3690,8 +3690,6 @@
 	if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0)
 		return (error);
 
-	AUDIT_ARG(vnpath, fp->f_vnode, ARG_VNODE1);
-
 	if ((fp->f_flag & FREAD) == 0) {
 		fdrop(fp, td);
 		return (EBADF);
@@ -3713,6 +3711,8 @@
 	auio.uio_resid = uap->count;
 	/* vn_lock(vp, LK_SHARED | LK_RETRY, td); */
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
+	AUDIT_ARG(vnpath, fp->f_vnode, ARG_VNODE1);
+
 	loff = auio.uio_offset = fp->f_offset;
 #ifdef MAC
 	error = mac_check_vnode_readdir(td->td_ucred, vp);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509211107.j8LB7KuH041132>