From owner-p4-projects@FreeBSD.ORG Sun Jan 11 11:38:05 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 88D5516A4D8; Sun, 11 Jan 2004 11:38:05 -0800 (PST) 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 1A7C316A4E8 for ; Sun, 11 Jan 2004 11:38:05 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D03E443D54 for ; Sun, 11 Jan 2004 11:38:02 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i0BJc20B071448 for ; Sun, 11 Jan 2004 11:38:02 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i0BJc2Dk071445 for perforce@freebsd.org; Sun, 11 Jan 2004 11:38:02 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 11 Jan 2004 11:38:02 -0800 (PST) Message-Id: <200401111938.i0BJc2Dk071445@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 Subject: PERFORCE change 45162 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2004 19:38:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=45162 Change 45162 by rwatson@rwatson_paprika on 2004/01/11 11:37:01 Remove macro wrapper for vn_rdwr(), and just use the FreeBSD syntax: we have a file_cred as well as an active_cred pointer. Since there's no file descriptor, just use active_cred, which is the cached credential from opening the audit file, so in fact is the right credential anyway. Affected files ... .. //depot/projects/trustedbsd/audit2/sys/security/audit/audit.c#8 edit Differences ... ==== //depot/projects/trustedbsd/audit2/sys/security/audit/audit.c#8 (text+ko) ==== @@ -48,10 +48,6 @@ #define kmem_alloc(map, ptrref, size) #define kmem_free(map, ptr, size) -#define vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, cred, resid, td) \ - vn_rdwr((rw), (vp), (base), (len), (offset), (segflg), (ioflg), \ - (cred), NULL, (resid), (td)) - #ifdef AUDIT /* @@ -179,7 +175,8 @@ */ if (ar->k_udata != NULL) { vn_rdwr(UIO_WRITE, vp, (void *)ar->k_udata, ar->k_ulen, - (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, cred, NULL, td); + (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, cred, NULL, + NULL, td); } /* @@ -202,7 +199,7 @@ * take the BSM record as a parameter. */ ret = (vn_rdwr(UIO_WRITE, vp, (void *)bsm->data, bsm->len, - (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, cred, NULL, td)); + (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, cred, NULL, NULL, td)); kau_free(bsm);