From owner-freebsd-threads@FreeBSD.ORG Sun Sep 18 03:10:47 2011 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38F03106564A for ; Sun, 18 Sep 2011 03:10:47 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id CBDF78FC08 for ; Sun, 18 Sep 2011 03:10:46 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p8I2sNNL059972 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 17 Sep 2011 19:54:25 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4E755D84.7080103@freebsd.org> Date: Sat, 17 Sep 2011 19:55:00 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.22) Gecko/20110902 Thunderbird/3.1.14 MIME-Version: 1.0 To: Gonzalo References: <201109171520.09423.tijl@coosemans.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Tijl Coosemans , freebsd-threads@freebsd.org Subject: Re: thread impersonation X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2011 03:10:47 -0000 On 9/17/11 11:51 AM, Gonzalo wrote: > So, as a imagined, is not possible a thread impersonation on FreeBSD? > > 2011/9/17 Tijl Coosemans I'm not quite sure what you are trying to achieve, and why. each thread DOES have its own credentials but the kernel/unix spec defines them to all be the same user.. It MIGHT be possible for a thread spawned before a seteuid() to keep some of the credentials of the prior ID but I haven't looked.. Nor do I know how that would be used.. usually UID tests are made on the PROCESS credentials and not the thread credentials (which exist for other reasons). >> On Monday 12 September 2011 21:31:03 Gonzalo wrote: >>> I'm new in freeBSD and I'm looking a way to impersonate threads in >> FreeBSD. >>> In Linux I did that with setfsuid, but that only work in linux and is not >>> portable :( >> There's seteuid(2) or setuid(2) which are portable. They change the uid of >> the entire process though, not per thread. >> >>> I saw that in FreeBSD there is Jails, that could work? Is possible to >> create >>> a Jail for every new thread and "impersonate the Jail"? Maybe I'm saying >>> things without sense :( >> A jail is a form of virtualisation. It's not related to what you're trying >> to do. You can read more about jails in the handbook: >> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails-intro.html >> > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" >