From owner-freebsd-arch@FreeBSD.ORG Thu May 28 15:18:17 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9A1F106568A for ; Thu, 28 May 2009 15:18:17 +0000 (UTC) (envelope-from zml@FreeBSD.org) Received: from seaxch10.isilon.com (seaxch10.isilon.com [74.85.160.26]) by mx1.freebsd.org (Postfix) with ESMTP id 9A8E18FC1A for ; Thu, 28 May 2009 15:18:17 +0000 (UTC) (envelope-from zml@FreeBSD.org) Received: from famine.isilon.com ([10.54.190.95]) by seaxch10.isilon.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 28 May 2009 08:18:03 -0700 Received: from zloafman by famine.isilon.com with local (Exim 4.69) (envelope-from ) id 1M9hMn-0001hc-Sk; Thu, 28 May 2009 08:18:01 -0700 Date: Thu, 28 May 2009 08:18:01 -0700 From: Zachary Loafman To: John Baldwin Message-ID: <20090528151800.GA18467@isilon.com> References: <20090528000147.GB3704@isilon.com> <200905280816.29617.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200905280816.29617.jhb@freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-OriginalArrivalTime: 28 May 2009 15:18:03.0365 (UTC) FILETIME=[7E9EF950:01C9DFA7] Cc: steven.danneman@isilon.com, freebsd-arch@freebsd.org Subject: Re: pthread_setugid_np X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2009 15:18:18 -0000 On Thu, May 28, 2009 at 08:16:29AM -0400, John Baldwin wrote: > I suppose you would implement this by having a new flag in td_pflags to > indicate that the thread is using a private credential and use that to > disable the automatic updating of td_ucred on syscall return and then just > point td_ucred at the thread-specific credential? That sounds about right, though is actually more detailed than I had gotten in my cursory investigation. > Hmm, the XXX in Darwin's source about P_SUGID is probably meaningful for us as > we still use that flag. I would defer to Robert on how that should work > though. Hm, given the intent of issetugid(2), it seems like P_SUGID should instead become a count of tainted threads rather than a flag. -- Zach Loafman | Staff Engineer | Isilon Systems