From owner-freebsd-arch Wed Aug 7 14:40:26 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E225037B405; Wed, 7 Aug 2002 14:40:11 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA3D843E84; Wed, 7 Aug 2002 14:40:08 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020807214008.GHSI23732.sccrmhc01.attbi.com@InterJet.elischer.org>; Wed, 7 Aug 2002 21:40:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id OAA75745; Wed, 7 Aug 2002 14:21:08 -0700 (PDT) Date: Wed, 7 Aug 2002 14:21:07 -0700 (PDT) From: Julian Elischer To: Robert Watson Cc: julian@FreeBSD.org, jhb@FreeBSD.org, arch@FreeBSD.org Subject: Re: Problem with credential for initproc In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 7 Aug 2002, Robert Watson wrote: > > On Tue, 6 Aug 2002, Julian Elischer wrote: > > > > X > > > X Something needs to happen here so that the thread cred is updated > > > X > > > > yes, since in normal processes the thread cred is updated on each kernel > > entry, something extra needs to be done for threads that never go to > > user space. It's possible that a simple > > cred_update_thread(FIRST_THREAD_IN_PROC(td)); would be sufficient.. > > Adding the cred_update_thread() call to init_main.c following the > credential divorcing code appears to have the right effect: code in > start_init() now uses the correct credential prior to the userland process > launching, so the root file system is mounted using the right label, and > nfs sockets are created and labeled properly. I'll merge the change to > the main tree. > > I notice that cred_update_thread() currently grabs Giant -- is this > something that can go away at some point? The proc lock is clearly > necessary, but my initial reading also suggests it should be > sufficient...? I don't know jhb was fiddling with it.. I don't know if it is needed or not.. > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > robert@fledge.watson.org Network Associates Laboratories > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message