From owner-freebsd-threads@FreeBSD.ORG Mon Sep 12 11:07:13 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 F00661065676 for ; Mon, 12 Sep 2011 11:07:13 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C476B8FC20 for ; Mon, 12 Sep 2011 11:07:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p8CB7DGU005591 for ; Mon, 12 Sep 2011 11:07:13 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p8CB7DVK005589 for freebsd-threads@FreeBSD.org; Mon, 12 Sep 2011 11:07:13 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 Sep 2011 11:07:13 GMT Message-Id: <201109121107.p8CB7DVK005589@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-threads@FreeBSD.org 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: Mon, 12 Sep 2011 11:07:14 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o threa/157040 threads [libthr] valgrind detects leaks in libthr.so.3 o threa/154893 threads pthread_sigmask don't work if mask and oldmask are pas o threa/150959 threads [libc] Stub pthread_once in libc should call _libc_onc o threa/149366 threads pthread_cleanup_pop never runs the configured routine o threa/148515 threads Memory / syslog strangeness in FreeBSD 8.x ( possible o threa/141721 threads rtprio(1): (id|rt)prio priority resets when new thread o threa/136345 threads Recursive read rwlocks in thread A cause deadlock with o threa/135673 threads databases/mysql50-server - MySQL query lock-ups on 7.2 o threa/128922 threads threads hang with xorg running o threa/127225 threads bug in lib/libthr/thread/thr_init.c o threa/122923 threads 'nice' does not prevent background process from steali o threa/121336 threads lang/neko threading ok on UP, broken on SMP (FreeBSD 7 o threa/116668 threads can no longer use jdk15 with libthr on -stable SMP o threa/115211 threads pthread_atfork misbehaves in initial thread o threa/110636 threads [request] gdb(1): using gdb with multi thread applicat o threa/110306 threads apache 2.0 segmentation violation when calling gethost o threa/103975 threads Implicit loading/unloading of libpthread.so may crash o threa/101323 threads [patch] fork(2) in threaded programs broken. s threa/84483 threads problems with devel/nspr and -lc_r on 4.x o threa/80992 threads abort() sometimes not caught by gdb depending on threa o threa/79683 threads svctcp_create() fails if multiple threads call at the s threa/76694 threads fork cause hang in dup()/close() function in child (-l s threa/48856 threads Setting SIGCHLD to SIG_IGN still leaves zombies under s threa/34536 threads accept() blocks other threads s threa/30464 threads [patch] pthread mutex attributes -- pshared 25 problems total. From owner-freebsd-threads@FreeBSD.ORG Mon Sep 12 19:55:51 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 3B826106566B for ; Mon, 12 Sep 2011 19:55:51 +0000 (UTC) (envelope-from gonzalo.a.r@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id C92F78FC15 for ; Mon, 12 Sep 2011 19:55:50 +0000 (UTC) Received: by wwe3 with SMTP id 3so2579828wwe.31 for ; Mon, 12 Sep 2011 12:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=g5N97VjydrPDAdFdMH5Kk/hBpJihwWETsXy+ERiiySo=; b=bMgx+ph5JTUARshu6ITCW9tGX7uyaFCzBHbp5V1rMhz4N6FZav8FMfj4UYPnfdMni4 4KkTj2Z6RSWkODPDZiFuaAoXxRrHo1Cp3TMKkdMK01EpOs2Xu268ZSz+Zt7pKfo2icFi rTWxJf+Nfa7sXvOXhUP7OVrpMEKBthE8ykEPQ= MIME-Version: 1.0 Received: by 10.216.156.138 with SMTP id m10mr187513wek.63.1315855863791; Mon, 12 Sep 2011 12:31:03 -0700 (PDT) Received: by 10.216.168.208 with HTTP; Mon, 12 Sep 2011 12:31:03 -0700 (PDT) Date: Mon, 12 Sep 2011 16:31:03 -0300 Message-ID: From: Gonzalo To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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: Mon, 12 Sep 2011 19:55:51 -0000 Hello guys. 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 :( 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 :( Thanks in advance ;) Gonzalo From owner-freebsd-threads@FreeBSD.ORG Tue Sep 13 14:20:06 2011 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17E6C1065672 for ; Tue, 13 Sep 2011 14:20:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E1CAF8FC12 for ; Tue, 13 Sep 2011 14:20:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p8DEK5s6054058 for ; Tue, 13 Sep 2011 14:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p8DEK5GW054057; Tue, 13 Sep 2011 14:20:05 GMT (envelope-from gnats) Resent-Date: Tue, 13 Sep 2011 14:20:05 GMT Resent-Message-Id: <201109131420.p8DEK5GW054057@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Michael Pounov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D084106566B for ; Tue, 13 Sep 2011 14:11:13 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 635A28FC13 for ; Tue, 13 Sep 2011 14:11:13 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p8DEBCKd009343 for ; Tue, 13 Sep 2011 14:11:12 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p8DEBCnu009342; Tue, 13 Sep 2011 14:11:12 GMT (envelope-from nobody) Message-Id: <201109131411.p8DEBCnu009342@red.freebsd.org> Date: Tue, 13 Sep 2011 14:11:12 GMT From: Michael Pounov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: threads/160708: Bypass process stack quota :) 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: Tue, 13 Sep 2011 14:20:06 -0000 >Number: 160708 >Category: threads >Synopsis: Bypass process stack quota :) >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 13 14:20:05 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Michael Pounov >Release: FreeBSD 8.2 and FreeBSD 9.0-CURRENT >Organization: ELWIX >Environment: FreeBSD misho.batmbg.com 8.2-STABLE FreeBSD 8.2-STABLE #1: Tue Jun 14 12:17:19 EEST 2011 root@misho.batmbg.com:/usr/obj/usr/src/sys/GENERIC i386 FreeBSD elwix.aitnet.org 9.0-CURRENT FreeBSD 9.0-CURRENT #8: Sun Jul 17 14:36:16 EEST 2011 root@elwix.aitnet.org:/usr/obj/usr/src/sys/GENERIC i386 >Description: With thread application you may get all system memory for one process. Excellent DoS for hostings and other application providers. When you use threads his stack not are restricted from system's quota and you may get all memory. >How-To-Repeat: Compile and start program "pt" from PR example: ./pt 10000 >Fix: Patch attached with submission follows: /* * Problem with stack limit per process. * Bypass process stack limit quota from threads :) NICE! :-P * * Tested on FreeBSD 8.x/9.x * * Author: Michael Pounov * * cc -o pt -O2 -g -Wall pt.c -lpthread * * Test: ./pt [KBytes] * Example: ./pt 10000 # test with 10MB stack size per thread * 10 = 100MB total size * you may add and 100MB stack size per thread :):):) */ #include #include #include #include #include #include #include #include void * meow(void *slen) { char *buf = (char*) &buf; buf = alloca(((size_t) slen) - sizeof(char*)); printf("buf[%u]->%p\n", ((size_t) slen) - sizeof(char*), buf); fflush(stdout); if (!buf) printf("allocation with size %u failed #%d - %s\n", (size_t) slen, errno, strerror(errno)); else { memset(buf, '*', ((size_t) slen) - sizeof(char*)); buf[((size_t) slen) - sizeof(char*) - 1] = 0; printf("successful allocated memory with %u bytes :) test print=%s\n", (size_t) slen, buf + (((size_t) slen) - sizeof(char*) - 8)); } sleep(10); printf("done.\n"); return NULL; } int main(int argc, char **argv) { #define TIDZ 10 pthread_attr_t attr; pthread_t tid[TIDZ]; size_t stacklen; register int i; struct rlimit rl; int kblen; kblen = argc > 1 ? strtol(argv[1], NULL, 0) : 1; getrlimit(RLIMIT_STACK, &rl); printf("stack limit: current=%llu KB max=%llu KB\n", rl.rlim_cur / ((rlim_t) 1024), rl.rlim_max / ((rlim_t) 1024)); printf("we try to get %d * %u KB = %u KB\n", TIDZ, kblen, kblen * TIDZ); if (((rlim_t) kblen * TIDZ) < (rl.rlim_max / ((rlim_t) 1024))) { printf("Error:: new stack size %u KB is under process stack limit %llu KB\n", kblen * TIDZ, rl.rlim_max / ((rlim_t) 1024)); return 1; } pthread_attr_init(&attr); pthread_attr_getstacksize(&attr, &stacklen); printf("default stacklen=%u\n", stacklen); pthread_attr_setstacksize(&attr, kblen * 1024); pthread_attr_getstacksize(&attr, &stacklen); printf("new stacklen=%u\n", stacklen); for (i = 0; i < TIDZ; i++) pthread_create(&tid[i], &attr, meow, (void*) stacklen); for (i = 0; i < TIDZ; i++) pthread_join(tid[i], NULL); pthread_attr_destroy(&attr); return 0; } >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Fri Sep 16 03:20:09 2011 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F670106564A for ; Fri, 16 Sep 2011 03:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7D28FC14 for ; Fri, 16 Sep 2011 03:20:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p8G3K97C089468 for ; Fri, 16 Sep 2011 03:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p8G3K90A089467; Fri, 16 Sep 2011 03:20:09 GMT (envelope-from gnats) Date: Fri, 16 Sep 2011 03:20:09 GMT Message-Id: <201109160320.p8G3K90A089467@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Peter Wemm Cc: Subject: Re: threads/160708: Bypass process stack quota :) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Peter Wemm List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 03:20:09 -0000 The following reply was made to PR threads/160708; it has been noted by GNATS. From: Peter Wemm To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: threads/160708: Bypass process stack quota :) Date: Thu, 15 Sep 2011 19:52:18 -0700 RLIMIT_STACK is more meant as a safety measure against runaway processes rather than a security system. The limit you are looking for is: #define RLIMIT_VMEM 10 /* virtual process size (incl. mmap) */ Given that you can freely move your stack, there is nothing to stop you relocating your stack pointer to a blob of memory you got from mmap. Or even the data segment. And that is what RLIMIT_VMEM aka RLIMIT_AS are for. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-freebsd-threads@FreeBSD.ORG Sat Sep 17 11:40:11 2011 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 889B51065670 for ; Sat, 17 Sep 2011 11:40:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5F95F8FC0A for ; Sat, 17 Sep 2011 11:40:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p8HBeBhA062815 for ; Sat, 17 Sep 2011 11:40:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p8HBeBAW062812; Sat, 17 Sep 2011 11:40:11 GMT (envelope-from gnats) Date: Sat, 17 Sep 2011 11:40:11 GMT Message-Id: <201109171140.p8HBeBAW062812@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Michael Pounov Cc: Subject: Re: threads/160708: Bypass process stack quota :) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Michael Pounov List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2011 11:40:11 -0000 The following reply was made to PR threads/160708; it has been noted by GNATS. From: Michael Pounov To: bug-followup@FreeBSD.org, peter@wemm.org Cc: Subject: Re: threads/160708: Bypass process stack quota :) Date: Sat, 17 Sep 2011 14:18:38 +0300 Hmm, you no so right Peter. Yes I can move esp pointer in any other address, but please start program and see address of allocated memory for every thread. All this allocations is made in upper memory called stack. Try same alloca() in main program thread and you see how system terminate program if you going over stack limit. Best Regards Michael Pounov From owner-freebsd-threads@FreeBSD.ORG Sat Sep 17 11:50:08 2011 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C3B9106566B for ; Sat, 17 Sep 2011 11:50:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 38B018FC08 for ; Sat, 17 Sep 2011 11:50:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p8HBo8Kn071543 for ; Sat, 17 Sep 2011 11:50:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p8HBo8lZ071542; Sat, 17 Sep 2011 11:50:08 GMT (envelope-from gnats) Date: Sat, 17 Sep 2011 11:50:08 GMT Message-Id: <201109171150.p8HBo8lZ071542@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Michael Pounov Cc: Subject: Re: threads/160708: Bypass process stack quota :) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Michael Pounov List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2011 11:50:08 -0000 The following reply was made to PR threads/160708; it has been noted by GNATS. From: Michael Pounov To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: threads/160708: Bypass process stack quota :) Date: Sat, 17 Sep 2011 14:26:11 +0300 Hmm, you no so right Peter. Yes I can move esp pointer in any other address, but please start program and see address of allocated memory for every thread. All this allocations is made in upper memory called stack. Try same alloca() in main program thread and you see how system terminate program if you going over stack limit. Best Regards Michael Pounov From owner-freebsd-threads@FreeBSD.ORG Sat Sep 17 13:30:44 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 AD743106564A for ; Sat, 17 Sep 2011 13:30:44 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay002.isp.belgacom.be (mailrelay002.isp.belgacom.be [195.238.6.175]) by mx1.freebsd.org (Postfix) with ESMTP id 39B158FC12 for ; Sat, 17 Sep 2011 13:30:43 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhkIALicdE5bscf3/2dsb2JhbABBmSaOOXiBUwEBBAFWIwULCxguOR4ih24CArULhngEhz+dOQ Received: from 247.199-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.199.247]) by relay.skynet.be with ESMTP; 17 Sep 2011 15:20:12 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id p8HDKBct030044; Sat, 17 Sep 2011 15:20:11 +0200 (CEST) (envelope-from tijl@coosemans.org) From: Tijl Coosemans To: freebsd-threads@freebsd.org Date: Sat, 17 Sep 2011 15:20:00 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-BETA1; KDE/4.6.5; i386; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1496188.AboS4Ho5kA"; protocol="application/pgp-signature"; micalg=pgp-sha256 Content-Transfer-Encoding: 7bit Message-Id: <201109171520.09423.tijl@coosemans.org> Cc: 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: Sat, 17 Sep 2011 13:30:44 -0000 --nextPart1496188.AboS4Ho5kA Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 --nextPart1496188.AboS4Ho5kA Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EABEIAAYFAk50nokACgkQfoCS2CCgtit/2gD/XyZrUVyCSEhAX8B5JkwogS0M YCBbI3S3iWS3661NHpgA/jF6ALvpd8CPqriZmyHJfugLb/c1fL5SdNG3nBeAoMVh =Wb/8 -----END PGP SIGNATURE----- --nextPart1496188.AboS4Ho5kA-- From owner-freebsd-threads@FreeBSD.ORG Sat Sep 17 18:51:49 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 710F0106564A for ; Sat, 17 Sep 2011 18:51:49 +0000 (UTC) (envelope-from gonzalo.a.r@gmail.com) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx1.freebsd.org (Postfix) with ESMTP id 036138FC17 for ; Sat, 17 Sep 2011 18:51:48 +0000 (UTC) Received: by wyf23 with SMTP id 23so4998515wyf.37 for ; Sat, 17 Sep 2011 11:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5Brtdj4tDXPrhk3sKr7TAoqfB0f95bpWCg3lHFTDzuk=; b=wTWKGPJ6X+SJ9QzRxLBcVlxovdMPpTxZKdYoHE/dO96+eTXNC8PTn4bUKi5AuVhLm3 Vvyn8Buz76IV3ZE2bsJXWUTnr29NeNC9uipdvkl0m9dwvXJQOXgDa6wKPHuNsq3MMmeJ r3RQWnwVpxEd2YcAYmj6W9EvnEqw1oDnftE74= MIME-Version: 1.0 Received: by 10.216.182.197 with SMTP id o47mr777554wem.78.1316285507933; Sat, 17 Sep 2011 11:51:47 -0700 (PDT) Received: by 10.216.208.23 with HTTP; Sat, 17 Sep 2011 11:51:47 -0700 (PDT) In-Reply-To: <201109171520.09423.tijl@coosemans.org> References: <201109171520.09423.tijl@coosemans.org> Date: Sat, 17 Sep 2011 15:51:47 -0300 Message-ID: From: Gonzalo To: Tijl Coosemans Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: 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: Sat, 17 Sep 2011 18:51:49 -0000 So, as a imagined, is not possible a thread impersonation on FreeBSD? 2011/9/17 Tijl Coosemans > 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 >