From owner-p4-projects@FreeBSD.ORG Wed Sep 21 11:07:21 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0860A16A421; Wed, 21 Sep 2005 11:07:21 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D675F16A41F for ; Wed, 21 Sep 2005 11:07:20 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A26A643D49 for ; Wed, 21 Sep 2005 11:07:20 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j8LB7Khh041135 for ; Wed, 21 Sep 2005 11:07:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8LB7KuH041132 for perforce@freebsd.org; Wed, 21 Sep 2005 11:07:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 21 Sep 2005 11:07:20 GMT Message-Id: <200509211107.j8LB7KuH041132@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 84047 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2005 11:07:21 -0000 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);