From owner-svn-src-projects@freebsd.org Thu Jul 26 03:32:04 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC60B105E134 for ; Thu, 26 Jul 2018 03:32:04 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 621527A6E6; Thu, 26 Jul 2018 03:32:04 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 03BDE225A9; Thu, 26 Jul 2018 03:32:04 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f47.google.com with SMTP id j8-v6so188602lfb.4; Wed, 25 Jul 2018 20:32:03 -0700 (PDT) X-Gm-Message-State: AOUpUlGBd0meQASi1TGKCktT5HzYrLlwLfPxDI6thrYoR1XPmRkY9mCK BWPovqLFJLf2ruXo/ZOXBZinnDWaXOxrf4Fpw2M= X-Google-Smtp-Source: AAOMgpdYKKTIuVlPSI4PcrgYuL3NYloV+erUndAR5DkA8BZp6OqUZmfhjaHkF4zgs5SPOuydwe47BsmZwrgMT/6tXJI= X-Received: by 2002:a19:138b:: with SMTP id 11-v6mr116740lft.74.1532575922387; Wed, 25 Jul 2018 20:32:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Wed, 25 Jul 2018 20:31:41 -0700 (PDT) In-Reply-To: <201807260314.w6Q3Ewhf008665@repo.freebsd.org> References: <201807260314.w6Q3Ewhf008665@repo.freebsd.org> From: Kyle Evans Date: Wed, 25 Jul 2018 22:31:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336730 - projects/bectl/sbin/bectl To: Kyle Evans Cc: src-committers , svn-src-projects@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jul 2018 03:32:04 -0000 On Wed, Jul 25, 2018 at 10:14 PM, Kyle Evans wrote: > Author: kevans > Date: Thu Jul 26 03:14:58 2018 > New Revision: 336730 > URL: https://svnweb.freebsd.org/changeset/base/336730 > > Log: > bectl(8): Support unjailing a boot environment > > The given parameter may either be a jid, jail name, or a BE name. In all > cases, the parameter will be resolved to a jid and bectl(8) will > sanity-check that there's actually a BE mounted at the requested jail root > before invoking jail_remove(2). It was probably also worth mentioning that this will currently leave the mount point hanging around to be unmounted manually. This was a conscious decision- at the moment, `bectl jail` will throw you into a shell inside the jail. Exiting the shell will clean up the jail and the mount appropriately, leaving 'unjail' for edge cases where this cleanup didn't get to happen -- but that won't always be the case. I waffled on whether or not unjail will be useful for removing the mount in the current world, and decided against it for now. The jail command will be getting modified to instead use jail API to create the jail then exec sh inside, at which point I will likely make 'unjail' properly remove the mount as the user will be free to go in and out of jail without worrying about it getting cleaned up upon 'exit'.