From owner-p4-projects Wed Aug 7 10:41: 9 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F326537B401; Wed, 7 Aug 2002 10:41:02 -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 78D4637B400 for ; Wed, 7 Aug 2002 10:41:02 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 948D043E72 for ; Wed, 7 Aug 2002 10:41:01 -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.4/8.12.4) with ESMTP id g77Hf1JU033669 for ; Wed, 7 Aug 2002 10:41:01 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g77Hf1K6033666 for perforce@freebsd.org; Wed, 7 Aug 2002 10:41:01 -0700 (PDT) Date: Wed, 7 Aug 2002 10:41:01 -0700 (PDT) Message-Id: <200208071741.g77Hf1K6033666@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 15646 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=15646 Change 15646 by rwatson@rwatson_tislabs on 2002/08/07 10:40:23 Make sure that the thread credential for initproc is kept in sync with the process credential following credential divorcing, or we'll use the cached credential until init first hits userland, resulting in the proc0 cred being used instead of proc1 for the root mount process. Discussed with/suggested by: julian Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/init_main.c#28 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/init_main.c#28 (text+ko) ==== @@ -671,6 +671,7 @@ initproc->p_ucred = newcred; PROC_UNLOCK(initproc); crfree(oldcred); + cred_update_thread(FIRST_THREAD_IN_PROC(initproc)); mtx_lock_spin(&sched_lock); initproc->p_sflag |= PS_INMEM; mtx_unlock_spin(&sched_lock); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message