From owner-freebsd-arch Thu Nov 1 13:40:13 2001 Delivered-To: freebsd-arch@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 4713237B401; Thu, 1 Nov 2001 13:40:11 -0800 (PST) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id NAA42322; Thu, 1 Nov 2001 13:35:47 -0800 (PST) Date: Thu, 1 Nov 2001 13:35:35 -0800 (PST) From: Julian Elischer To: Robert Watson Cc: arch@FreeBSD.org Subject: Re: Changes to suser() and friends 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 Thu, 1 Nov 2001, Robert Watson wrote: > > error = suser(p->p_ucred); > or > error = suser(td->td_proc->p_ucred); > or > error = suser(td->td_ucred); the reason for the existance of suser_td is so that it could be called by functions for which 'thread *' was an opaque pointer.. i.e. there are many places that use suser() and suser_td() that do not include proc.h and thus do not know about any sub elements of the thread structure. (or proc structure) by making this change you are forcing these file sto include proc.h. this is not hard, but just another move towards "every file includes every .h file" > > is substantial. In fact, given that threads will have access to two > credentials (the thread cached credential, and the process credential), > making it explicit is probably a very good idea. > > Assuming there are no objections, I plan to commit this change on Monday. > > Robert N M Watson FreeBSD Core Team, TrustedBSD Project > robert@fledge.watson.org NAI Labs, Safeport Network Services > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message