From owner-freebsd-jail@FreeBSD.ORG Wed Nov 3 17:13:15 2010 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 029341065675 for ; Wed, 3 Nov 2010 17:13:15 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from gritton.org (gritton.org [208.92.232.93]) by mx1.freebsd.org (Postfix) with ESMTP id A44968FC12 for ; Wed, 3 Nov 2010 17:13:14 +0000 (UTC) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by gritton.org (8.14.3/8.14.3) with ESMTP id oA3Gkmrf025231; Wed, 3 Nov 2010 10:46:48 -0600 (MDT) (envelope-from jamie@FreeBSD.org) Message-ID: <4CD1919D.9010009@FreeBSD.org> Date: Wed, 03 Nov 2010 10:45:17 -0600 From: Jamie Gritton User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.5) Gecko/20100103 Thunderbird/3.0 MIME-Version: 1.0 To: freebsd-jail@FreeBSD.org References: <20101103071615.95100@gmx.com> In-Reply-To: <20101103071615.95100@gmx.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: jail_attach does not chdir to new root? X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2010 17:13:15 -0000 On 11/03/10 00:56, Nikos Vassiliadis wrote: > Out of curiosity, why jail_attach() does not > chdir() to the new root? > > It seems like something worth mentioning in jail(2). I wasn't involved in the early jail stuff, but I'll venture it was because chroot(2) also doesn't chdir to the new root, and jail originally grew out of chroot. The difference is the chroot(2) man page does specifically mention that the current directory isn't changed, and you're right that jail(2) should as well. - Jamie