Date: Sun, 22 Sep 2002 14:37:30 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 17942 for review Message-ID: <200209222137.g8MLbULP089960@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17942 Change 17942 by rwatson@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@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209222137.g8MLbULP089960>