]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r316312, r332361, r333438-r333439, r339804: GELI dry-run
authorkevans <kevans@FreeBSD.org>
Wed, 20 Feb 2019 23:42:03 +0000 (23:42 +0000)
committerkevans <kevans@FreeBSD.org>
Wed, 20 Feb 2019 23:42:03 +0000 (23:42 +0000)
commit52520b1e9fa7e4032336cc68cfacd2932348bee5
tree90994da153f362727690fa9297970f86c7436e04
parentee8cd6f5547cf4381d536d29818c5cda03a701b0
MFC r316312, r332361, r333438-r333439, r339804: GELI dry-run

r316312:
sys/geom/eli: Switch bzero() to explicit_bzero() for sensitive data

In GELI, anywhere we are zeroing out possibly sensitive data, like
the metadata struct, the metadata sector (both contain the encrypted
master key), the user key, or the master key, use explicit_bzero.

Didn't touch the bzero() used to initialize structs.

r332361:
Introduce dry run option for attaching the device.
This will allow us to verify if passphrase and key is valid without
decrypting whole device.

r333438:
Change option dry-run from 'n' to 'C' in geli attach command.

'n' is used in other commands to define the key index.
We should be consistent with that.
'C' option is used by patch(1) to perform dryrun so lets use that.

r333439:
Introduce the 'n' flag for the geli attach command.

If the 'n' flag is provided the provided key number will be used to
decrypt device. This can be used combined with dryrun to verify if the key
is set correctly. This can be also used to determine which key slot we want to
change on already attached device.

r339804:
Restore backward compatibility for "attach" verb.

In r332361 and r333439, two new parameters were added to geli attach
verb using gctl_get_paraml, which requires the value to be present.
This would prevent old geli(8) binary from attaching geli(4) device
as they have no knowledge about the new parameters.

Restore backward compatibility by treating the absense of these two
values as seeing the default value supplied by userland.
sbin/geom/class/eli/geli.8
sbin/geom/class/eli/geom_eli.c
stand/libsa/geli/geliboot.c
sys/geom/eli/g_eli.c
sys/geom/eli/g_eli.h
sys/geom/eli/g_eli_ctl.c
sys/geom/eli/g_eli_key.c
sys/geom/eli/g_eli_key_cache.c