PERFORCE change 45162 for review

Robert Watson rwatson at FreeBSD.org
Sun Jan 11 19:38:02 GMT 2004


http://perforce.freebsd.org/chv.cgi?CH=45162

Change 45162 by rwatson at 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);
 
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list