| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=337968
|
|
|
|
|
|
|
|
|
|
|
| |
Adding batch mode to the jail `bectl(8)` subcommand enables jailing of
ZFS Boot Environments in a scriptable fashion.
Submitted by: Shawn Webb
Obtained from: HardenedBSD (9e72d1c59a and ef7b6d9e1c with minor edit)
Notes:
svn path=/head/; revision=337947
|
|
|
|
| |
Notes:
svn path=/head/; revision=337918
|
|
|
|
| |
Notes:
svn path=/head/; revision=337917
|
|
|
|
|
|
|
| |
Use strlcpy instead of a plain strcpy
Notes:
svn path=/head/; revision=337916
|
|
|
|
|
|
|
|
| |
While here, use sizeof() in some places that it makes sense to reduce room
for error and prefer strlcpy to strncpy
Notes:
svn path=/head/; revision=337915
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: bcr, jilles, imp (earlier version)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D16700
Notes:
svn path=/head/; revision=337834
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous iteration of this assumed that these won't fail because we've
already setup the jail param to this point, but the allocations could still
fail in pretty bad conditions.
Admit that it's possible and return (ENOENT, EINVAL, ENOMEM, or 0) when
deleting arguments. EINVAL shouldn't happen since we're passing optarg;
which may satisfy *optarg == '\0' but never optarg == NULL.
CID: 1394885, 1394901
Notes:
svn path=/head/; revision=337805
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
after opening the console, replacing init as PID 1.
From the user point of view, it makes it possible to run eg the
shell as PID 1, using 'set init_exec=/bin/sh' at the loader(8)
prompt.
Reviewed by: kib
MFC after: 2 weeks
Relnotes: yes
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D16625
Notes:
svn path=/head/; revision=337740
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were previously necessary because the libnvpair and libzfs_core
includes were not installed into the SYSROOT, being a part of the copies
target in include/Makefile rather than being installed with the library.
This was fixed in r337696 and the headers are now installed properly, so we
may let go of the cruft.
Notes:
svn path=/head/; revision=337699
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deleting the temp snapshot isn't immediately possible because it's the
origin of the newly imported boot environment. However, this is trivially
solved by opening the new boot environment and promoting it. The roles are
now reversed and the temp snapshot/dataset may be completely destroyed.
Remove the BUGS from libbe(3) and bectl(8).
Notes:
svn path=/head/; revision=337697
|
|
|
|
| |
Notes:
svn path=/head/; revision=337667
|
|
|
|
| |
Notes:
svn path=/head/; revision=337664
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bectl(8) is an administrative interface for working with ZFS boot
environments, intended to provide a superset of the functionality provided
by sysutils/beadm.
libbe(3) is the back-end library that the required functionality has been
pulled out into for later reuse.
These were originally written for GSoC 2017 under the mentorship of
allanjude@.
bectl(8) has proven pretty stable in my testing, with the known bug
documented in the man page.
Relnotes: yes
Notes:
svn path=/head/; revision=337663
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Missing include path
- Fully specify libzfs's dependencies (except for deps pulled in by other
deps) in Makefile.inc1
- Drop WARNS back down to 2 for libbe(3). I do this with much hesitation,
but the libzfs headers are apparently a hot warning-filled mess as far as
GCC 4.2 is concerned.
Notes:
svn path=/projects/bectl/; revision=337662
|
| |
| |
| |
| | |
Notes:
svn path=/projects/bectl/; revision=337657
|
| |\
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=337608
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=337606
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
"Despite my inconsistency, consistency is king." -Anonymous
Notes:
svn path=/projects/bectl/; revision=337603
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=337602
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=337598
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The mostly-undocumented 'add' functionality, from initial read-through, is
intended for construction of deep ("bdrewery style") boot environments.
However, it's mostly broken at this point. `#if SOON` it out on both sides
so that we're not exposing a broken API/feature.
Work will resume on it in due time.
Notes:
svn path=/projects/bectl/; revision=337596
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=337416
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- File names don't necessarily need to be repeated
- Add SPDX tags
- Add a missing copyright for Kyle Kneitinger in bectl.8, originally written
by him in GSoC 2017; his standard copyright notice has been copied from
other files within the same directory to remain consistent with how he
clearly wished to portray it
Notes:
svn path=/projects/bectl/; revision=337414
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes the be_exists behavior match the comments that assert that we've
already checked that the dataset derived from the BE name is set to mount at
/.
Other changes of note:
- bectl_list sees another change; changing mountpoint based on mount status
turns out to be a bad idea, so instead make the mounted property of the
returned nvlist the path that it's mounted at
- Always return the "mountpoint" property in "mountpoint" if it's ste
Notes:
svn path=/projects/bectl/; revision=337406
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is to accomodate a later change in libbe(3) that will always return the
mountpoint, whether it be the directory the dataset is actively mounted at
or the "mountpoint" property.
Notes:
svn path=/projects/bectl/; revision=337405
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
All but name, host.hostname, and path may be completely unset.
Notes:
svn path=/projects/bectl/; revision=337380
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=337369
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Support passing arbitrary jail arguments via -o
- Split the related (and rewritten since the GSoC) jail bits out into a new
bectl_jail.c file, to reduce clutter in bectl.c
- Don't use RFC 1918 IP space [0]; we'll instead set no default IPv4 and let
the user pass in any address options they wish via -o
Reported by: rgrimes [0], Shawn Webb [0]
Notes:
svn path=/projects/bectl/; revision=337368
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=337359
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
be_get_dataset_snapshots has been added to libbe(3), effectively returning
the same information as be_get_bootenv_props but for snapshots of the given
dataset. The assumption is that one will have the BE dataset name before
wanting to grab snapshots.
Notes:
svn path=/projects/bectl/; revision=337358
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This also accomplishes the following:
- Proxy through zfs_nicenum as be_nicenum, because it looks better than
humanize_number and would presumably be useful to other libbe consumers.
- Rename be_get_snapshot_props to be_get_dataset_props, make it more useful
Notes:
svn path=/projects/bectl/; revision=337343
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
-H is for a scripted format, where all fields are tab-delimited and the
headers go away. We accomplish this by splitting out pad printing to a
separate function that'll take into account whether we're supposed to be
scripted or not.
This has the nice side effect of maintaining positive column sizes again.
Notes:
svn path=/projects/bectl/; revision=337341
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While it could be preferred to do this at insert in libbe(3), there's no
convenient way to insert at the head of an nvlist. Instead, we'll make two
passes over- once to print anything active either now or at nextboot, and
another to print everything else.
This doesn't actually impact performance in a significant way here, so we'll
worry about further optimizations if the need actually arises.
Notes:
svn path=/projects/bectl/; revision=337284
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
bectl list -a should show the boot environment, its relevant dataset, and
the snapshot it was created from. The header also changes to indicate the
rough order in which these things will show.
While here, start doing a little bit of spring cleaning and splitting
different bits out.
Notes:
svn path=/projects/bectl/; revision=337283
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This more closely matches the behavior for beadm. The associated libbe(3)
API is still getting worked out a little bit.
Notes:
svn path=/projects/bectl/; revision=337228
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=337226
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This may later get reused for printing snapshot and/or origin snapshot
information.
Notes:
svn path=/projects/bectl/; revision=337225
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=336748
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Note that the space is currently just the 'used' property of the dataset.
Notes:
svn path=/projects/bectl/; revision=336747
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=336732
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The jail is created with allow.mount, allow.mount.devfs, and
enforce_statfs=1. Upon creation, we immediately attach, chdir to "/", and
drop the user into a shell inside the jail.
The default IP for this is arbitrarily 10.20.30.40.
Notes:
svn path=/projects/bectl/; revision=336731
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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).
Notes:
svn path=/projects/bectl/; revision=336730
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=336715
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Based on the idea that we shouldn't have all-new library and utility going
into base that need WARNS=1...
- Decent amount of constification
- Lots of parentheses
- Minor other nits
Notes:
svn path=/projects/bectl/; revision=336710
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For the moment, this is a primitive nvlist dump of what we get back from
be_get_bootenv_props as a proof-of-concept and to make sure that we're
getting back the kind of information we want to see from list.
Notes:
svn path=/projects/bectl/; revision=336708
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=336703
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=336702
|
| | |
| | |
| | |
| | | |
Notes:
svn path=/projects/bectl/; revision=336694
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Approved by: hselaskey
Notes:
svn path=/projects/bectl/; revision=336684
|