mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
options: rename key.device as key.id
In the future it will be also something else other than the device name. (cherry picked from commit c863ee5e1df5e1eca7ad6821bd2db3796277a6bd in libguestfs-common) PT: the documentation was amended manually.
This commit is contained in:
@@ -124,15 +124,16 @@ security problem with malicious guests (CVE-2010-3851).
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -108,15 +108,16 @@ security problem with malicious guests (CVE-2010-3851).
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -355,15 +355,16 @@ L</RECURSIVE LONG LISTING> above.
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -126,15 +126,16 @@ security problem with malicious guests (CVE-2010-3851).
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -57,8 +57,8 @@ guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv)
|
||||
struct key_store_key key;
|
||||
|
||||
elemv = Field (keysv, 0);
|
||||
key.device = strdup (String_val (Field (elemv, 0)));
|
||||
if (!key.device)
|
||||
key.id = strdup (String_val (Field (elemv, 0)));
|
||||
if (!key.id)
|
||||
caml_raise_out_of_memory ();
|
||||
|
||||
v = Field (elemv, 1);
|
||||
|
||||
@@ -148,7 +148,7 @@ get_keys (struct key_store *ks, const char *device)
|
||||
for (i = 0; i < ks->nr_keys; ++i) {
|
||||
struct key_store_key *key = &ks->keys[i];
|
||||
|
||||
if (STRNEQ (key->device, device))
|
||||
if (STRNEQ (key->id, device))
|
||||
continue;
|
||||
|
||||
switch (key->type) {
|
||||
@@ -193,8 +193,8 @@ key_store_add_from_selector (struct key_store *ks, const char *selector)
|
||||
}
|
||||
|
||||
/* 1: device */
|
||||
key.device = strdup (fields[0]);
|
||||
if (!key.device)
|
||||
key.id = strdup (fields[0]);
|
||||
if (!key.id)
|
||||
error (EXIT_FAILURE, errno, "strdup");
|
||||
|
||||
/* 2: key type */
|
||||
@@ -265,6 +265,6 @@ free_key_store (struct key_store *ks)
|
||||
free (key->file.name);
|
||||
break;
|
||||
}
|
||||
free (key->device);
|
||||
free (key->id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,10 +104,12 @@ struct mp {
|
||||
|
||||
/* A key in the key store. */
|
||||
struct key_store_key {
|
||||
/* The device this key refers to. There may be multiple matching
|
||||
* devices in the list.
|
||||
/* An ID for the device this key refers to. It must be the libguestfs
|
||||
* device name.
|
||||
*
|
||||
* There may be multiple matching devices in the list.
|
||||
*/
|
||||
char *device;
|
||||
char *id;
|
||||
|
||||
enum {
|
||||
key_string, /* key specified as string */
|
||||
|
||||
@@ -141,15 +141,16 @@ security problem with malicious guests (CVE-2010-3851).
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -169,15 +169,16 @@ Display file sizes in human-readable format.
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -156,15 +156,16 @@ security problem with malicious guests (CVE-2010-3851).
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -283,15 +283,16 @@ were found.
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -249,15 +249,16 @@ mounted on the real virtual machine.
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -92,15 +92,16 @@ security problem with malicious guests (CVE-2010-3851).
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -117,15 +117,16 @@ ensure the format is always specified.
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -233,15 +233,16 @@ See L</IN-PLACE SPARSIFICATION> below.
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -189,15 +189,16 @@ security problem with malicious guests (CVE-2010-3851).
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
@@ -337,15 +337,16 @@ through VDDK.
|
||||
=item B<--key> SELECTOR
|
||||
|
||||
Specify a key for LUKS, to automatically open a LUKS device when using
|
||||
the inspection. C<SELECTOR> can be in one of the following formats:
|
||||
the inspection. C<ID> must be the libguestfs device name of the LUKS
|
||||
device.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--key> C<DEVICE>:key:KEY_STRING
|
||||
=item B<--key> C<ID>:key:KEY_STRING
|
||||
|
||||
Use the specified C<KEY_STRING> as passphrase.
|
||||
|
||||
=item B<--key> C<DEVICE>:file:FILENAME
|
||||
=item B<--key> C<ID>:file:FILENAME
|
||||
|
||||
Read the passphrase from F<FILENAME>.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user