From owner-freebsd-jail@FreeBSD.ORG Mon Apr 22 18:29:45 2013 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 467204F7 for ; Mon, 22 Apr 2013 18:29:45 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from m2.gritton.org (gritton.org [199.192.164.235]) by mx1.freebsd.org (Postfix) with ESMTP id 2BFC21C7E for ; Mon, 22 Apr 2013 18:29:44 +0000 (UTC) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by m2.gritton.org (8.14.5/8.14.5) with ESMTP id r3MIThkK095832; Mon, 22 Apr 2013 12:29:43 -0600 (MDT) (envelope-from jamie@FreeBSD.org) Message-ID: <51758192.2050300@FreeBSD.org> Date: Mon, 22 Apr 2013 12:29:38 -0600 From: Jamie Gritton User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120126 Thunderbird/9.0 MIME-Version: 1.0 To: Miroslav Lachman <000.fbsd@quip.cz> Subject: Re: automatic garbage collection of stuff mounted (etc.) by jailed root References: <20130422091711.GA3115@dft-labs.eu> <517553B0.6010602@FreeBSD.org> <517575BF.8020305@quip.cz> In-Reply-To: <517575BF.8020305@quip.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-jail@FreeBSD.org X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2013 18:29:45 -0000 On 04/22/13 11:39, Miroslav Lachman wrote: > Jamie Gritton wrote: >> On 04/22/13 03:17, Mateusz Guzik wrote: > > [...] > >>> Again, the goal is to have jails clean up automatically after anything >>> jailed root was permitted to do. >>> >>> Thoughts? >> >> This already happens when jails are created using a jail.conf file. Any >> mounts there are unmounted as part of the jail removal process. Just >> recently I fixed it to properly do this unmounting in reverse order. > > Do you mean mounts defined in jail.conf or all mounts manually done by > root user in jail? > > Miroslav Lachman Ah, I see the difference. Yes, that's only for mounts in the jail.conf. For mounts done by the jail itself, I guess we would go off the mount record's credential. So is this something you expect to be happening entirely in the kernel? - Jamie