PERFORCE change 17942 for review

Robert Watson rwatson at freebsd.org
Sun Sep 22 21:37:30 GMT 2002


http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17942

Change 17942 by rwatson at rwatson_paprika on 2002/09/22 14:37:16

	During ffs_close_ea(), if the authorizing credential is NULL,
	use the closed equivilent to KERNELCRED, thread0.td_ucred.
	This prevents a NULL pointer dereference in ffs_extwrite,
	re-fixing a bug phk previously fixed and possibly
	re-introduced.  We'll have to figure out a bit more about
	what we mean by "kernel credential" sometime, but this
	approximation is workable.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/ufs/ffs/ffs_vnops.c#9 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/ufs/ffs/ffs_vnops.c#9 (text+ko) ====

@@ -1430,6 +1430,8 @@
 	dp = ip->i_din2;
 	error = ip->i_ea_error;
 	if (commit && error == 0) {
+		if (cred == NULL)
+			cred = thread0.td_ucred;
 		liovec.iov_base = ip->i_ea_area;
 		liovec.iov_len = ip->i_ea_len;
 		luio.uio_iov = &liovec;
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