HomeFreeBSD

libbe(3): Don't allow bootfs to be destroyed

Description

libbe(3): Don't allow bootfs to be destroyed

Previously, the following sequence of events was feasible under some
circumstance:

bectl create test
bectl activate test

the test BE dataset gets promoted and set as bootfs

bectl destroy test

I was unable to reproduce the destroy succeeding, but we should be rejecting
this before it even gets to libzfs because it would leave the system in an
inconsistent state. Forcing the user to be explicit as to which environment
should be activated instead is much better.

Reported by: Graham Perrin <grahamperrin@gmail.com>
MFC after: 3 days

Details

Provenance
kevansAuthored on
Parents
rS342848: OptionalObsoleteFiles: remove groff leftovers
Branches
Unknown
Tags
Unknown