diff options
author | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2018-04-10 13:22:48 +0000 |
---|---|---|
committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2018-04-10 13:22:48 +0000 |
commit | 8f1c45c20ab6167e767ac994ff156e3edb3d3c45 (patch) | |
tree | 07c0cab53647b2a0b80c25453200a268bf4089f4 /sbin | |
parent | 5819c3eb8a1e2ac0a4f96a3aff5fefac276ae581 (diff) | |
download | src-8f1c45c20ab6167e767ac994ff156e3edb3d3c45.tar.gz src-8f1c45c20ab6167e767ac994ff156e3edb3d3c45.zip |
Introduce dry run option for attaching the device.
This will allow us to verify if passphrase and key is valid without
decrypting whole device.
Reviewed by: cem@, allanjude@
Differential Revision: https://reviews.freebsd.org/D15000
Notes
Notes:
svn path=/head/; revision=332361
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/geom/class/eli/geli.8 | 7 | ||||
-rw-r--r-- | sbin/geom/class/eli/geom_eli.c | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sbin/geom/class/eli/geli.8 b/sbin/geom/class/eli/geli.8 index c3e36fd7263e..e88cf78dd413 100644 --- a/sbin/geom/class/eli/geli.8 +++ b/sbin/geom/class/eli/geli.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 17, 2017 +.Dd April 10, 2018 .Dt GELI 8 .Os .Sh NAME @@ -67,7 +67,7 @@ utility: .Cm init .Nm .Cm attach -.Op Fl dprv +.Op Fl dnprv .Op Fl j Ar passfile .Op Fl k Ar keyfile .Ar prov @@ -420,6 +420,9 @@ For more information see the description of the option for the .Cm init subcommand. +.It Fl n +Do a dry-run decryption. +This is useful to verify passphrase and keyfile without decrypting the device. .It Fl p Do not use a passphrase as a component of the User Key. Cannot be combined with the diff --git a/sbin/geom/class/eli/geom_eli.c b/sbin/geom/class/eli/geom_eli.c index 84e721316eb6..bb43a4910260 100644 --- a/sbin/geom/class/eli/geom_eli.c +++ b/sbin/geom/class/eli/geom_eli.c @@ -148,11 +148,12 @@ struct g_command class_commands[] = { { 'd', "detach", NULL, G_TYPE_BOOL }, { 'j', "passfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI }, { 'k', "keyfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI }, + { 'n', "dryrun", NULL, G_TYPE_BOOL }, { 'p', "nopassphrase", NULL, G_TYPE_BOOL }, { 'r', "readonly", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-dprv] [-j passfile] [-k keyfile] prov" + "[-dnprv] [-j passfile] [-k keyfile] prov" }, { "detach", 0, NULL, { |