From owner-p4-projects Sun Sep 22 14:37:32 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 444A037B404; Sun, 22 Sep 2002 14:37:31 -0700 (PDT) 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 E0F3337B401 for ; Sun, 22 Sep 2002 14:37:30 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CFA443E42 for ; Sun, 22 Sep 2002 14:37:30 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8MLbUCo089964 for ; Sun, 22 Sep 2002 14:37:30 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8MLbULP089960 for perforce@freebsd.org; Sun, 22 Sep 2002 14:37:30 -0700 (PDT) Date: Sun, 22 Sep 2002 14:37:30 -0700 (PDT) Message-Id: <200209222137.g8MLbULP089960@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 17942 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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