summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2006-08-09 18:11:14 +0000
committerpjd <pjd@FreeBSD.org>2006-08-09 18:11:14 +0000
commitb2ae936be5770cb95ef230182dc30da91308565b (patch)
treec2ce4f09e3fa2e0c6279cf9dcb57fa4bc280e161 /sbin
parent41a38f71c97dbc8a0216c1f1456203720aff5868 (diff)
downloadFreeBSD-src-b2ae936be5770cb95ef230182dc30da91308565b.zip
FreeBSD-src-b2ae936be5770cb95ef230182dc30da91308565b.tar.gz
Allow geli to operate on read-only providers.
Initial patch from: vd MFC after: 2 weeks
Diffstat (limited to 'sbin')
-rw-r--r--sbin/geom/class/eli/geli.84
-rw-r--r--sbin/geom/class/eli/geom_eli.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/sbin/geom/class/eli/geli.8 b/sbin/geom/class/eli/geli.8
index e0ceeb0..fb5626a 100644
--- a/sbin/geom/class/eli/geli.8
+++ b/sbin/geom/class/eli/geli.8
@@ -64,7 +64,7 @@ utility:
.Cm init
.Nm
.Cm attach
-.Op Fl dpv
+.Op Fl dprv
.Op Fl k Ar keyfile
.Ar prov
.Nm
@@ -288,6 +288,8 @@ Probably a better choice is the
option for the
.Cm detach
subcommand.
+.It Fl r
+Attach read-only provider. It will not be opened for writting.
.It Fl k Ar keyfile
Specifies a file which contains part of the key.
For more information see the description of the
diff --git a/sbin/geom/class/eli/geom_eli.c b/sbin/geom/class/eli/geom_eli.c
index e331ba9..d9543ae 100644
--- a/sbin/geom/class/eli/geom_eli.c
+++ b/sbin/geom/class/eli/geom_eli.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>
+ * Copyright (c) 2004-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -78,7 +78,7 @@ static void eli_dump(struct gctl_req *req);
*
* init [-bhPv] [-a aalgo] [-e ealgo] [-i iterations] [-l keylen] [-K newkeyfile] prov
* label - alias for 'init'
- * attach [-dpv] [-k keyfile] prov
+ * attach [-dprv] [-k keyfile] prov
* detach [-fl] prov ...
* stop - alias for 'detach'
* onetime [-d] [-a aalgo] [-e ealgo] [-l keylen] prov ...
@@ -124,9 +124,10 @@ struct g_command class_commands[] = {
{ 'd', "detach", NULL, G_TYPE_NONE },
{ 'k', "keyfile", keyfile, G_TYPE_STRING },
{ 'p', "nopassphrase", NULL, G_TYPE_NONE },
+ { 'r', "readonly", NULL, G_TYPE_NONE },
G_OPT_SENTINEL
},
- "[-dpv] [-k keyfile] prov"
+ "[-dprv] [-k keyfile] prov"
},
{ "detach", 0, NULL,
{
OpenPOWER on IntegriCloud