From owner-freebsd-arch Wed Aug 7 10:43:36 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 C7C1337B413; Wed, 7 Aug 2002 10:43:32 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 976E543E4A; Wed, 7 Aug 2002 10:43:31 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.4/8.12.4) with SMTP id g77HhAOo011932; Wed, 7 Aug 2002 13:43:10 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Wed, 7 Aug 2002 13:43:10 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Julian Elischer 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 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...? 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