Date: Wed, 7 Aug 2002 13:43:10 -0400 (EDT) From: Robert Watson <rwatson@FreeBSD.org> To: Julian Elischer <julian@elischer.org> Cc: julian@FreeBSD.org, jhb@FreeBSD.org, arch@FreeBSD.org Subject: Re: Problem with credential for initproc Message-ID: <Pine.NEB.3.96L.1020807134037.10577B-100000@fledge.watson.org> In-Reply-To: <Pine.BSF.4.21.0208061616330.65715-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1020807134037.10577B-100000>