aboutsummaryrefslogtreecommitdiff
path: root/sbin/bectl/bectl.8
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-12-25 15:18:41 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-12-25 15:18:41 +0000
commit7ce09314b2f0611f4fc171b7829bb550a346f3c2 (patch)
tree26b9e4ecff1daad245d2bd0b514efce23382d85d /sbin/bectl/bectl.8
parenta89c806508c0831a25256fa4440d85b690f26568 (diff)
downloadsrc-7ce09314b2f0611f4fc171b7829bb550a346f3c2.tar.gz
src-7ce09314b2f0611f4fc171b7829bb550a346f3c2.zip
bectl: use jail id as the default jail name for a boot environment
By default, bectl is setting the jail 'name' parameter to the boot environment name, which causes an error when the boot environment name is not a valid jail name. With the attached fix, when no name is supplied, the default jail name will be the jail id - this is is the same behavior as the jail command. Additionally, this commit addresses two other bugs that prevented unjailing in scenarios where the jail name does not match the boot environment name: 1. In 'bectl_locate_jail', 'mountpoint' is used to resolve the boot environment path, but really 'mounted' should be used. 'mountpoint' is the path where the zfs dataset will be mounted. 'mounted' is the path where the dataset is actually mounted. 2. in 'bectl_search_jail_paths', 'jail_getv' would fail after the first call. Which is fine, if the boot environment you're unjailing is the next one up. According to 'man jail_getv', it's expecting name and value strings. 'jail_getv' is being passed an integer for the lastjid, so amend that to use a string instead. Test cases have been amended to reflect the bugs found. PR: 233637 Submitted by: Rob <rob.fx907_gmail.com> MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D18607
Notes
Notes: svn path=/head/; revision=342466
Diffstat (limited to 'sbin/bectl/bectl.8')
-rw-r--r--sbin/bectl/bectl.811
1 files changed, 3 insertions, 8 deletions
diff --git a/sbin/bectl/bectl.8 b/sbin/bectl/bectl.8
index 575091613a12..daff7306b0dd 100644
--- a/sbin/bectl/bectl.8
+++ b/sbin/bectl/bectl.8
@@ -18,7 +18,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 21, 2018
+.Dd December 25, 2018
.Dt BECTL 8
.Os
.Sh NAME
@@ -52,7 +52,6 @@
.Cm jail
.Brq Fl b | Fl U
.Oo Bro Fl o Ar key Ns = Ns Ar value | Fl u Ar key Brc Oc Ns ...
-.Brq Ar jailID | jailName
.Ar bootenv
.Op Ar utility Op Ar argument ...
.Nm
@@ -153,7 +152,6 @@ from
.Cm jail
.Brq Fl b | Fl U
.Oo Bro Fl o Ar key Ns = Ns Ar value | Fl u Ar key Brc Oc Ns ...
-.Brq Ar jailID | jailName
.Ao Ar bootenv Ac
.Op Ar utility Op Ar argument ...
.Xc
@@ -193,10 +191,7 @@ The
.Va host.hostname ,
and
.Va path
-may not actually be unset.
-Attempts to unset any of these will revert them to the default values specified
-below, if they have been overwritten by
-.Fl o .
+must be set, the default values are specified below.
.Pp
All
.Ar key Ns = Ns Ar value
@@ -207,7 +202,7 @@ The following default parameters are provided:
.It Va allow.mount Ta Cm true
.It Va allow.mount.devfs Ta Cm true
.It Va enforce_statfs Ta Cm 1
-.It Va name Ta Va bootenv
+.It Va name Ta jail id
.It Va host.hostname Ta Va bootenv
.It Va path Ta Set to a path in /tmp generated by
.Xr libbe 3 .