search for: free_key_store

Displaying 19 results from an estimated 19 matches for "free_key_store".

2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
...t;)) { + OPTION_key; } else error (EXIT_FAILURE, 0, _("unknown long option: %s (%d)"), @@ -249,6 +254,7 @@ main (int argc, char *argv[]) /* Free up data structures, no longer needed after this point. */ free_drives (drvs); free_mps (mps); + free_key_store (ks); r = do_cat (argc - optind, &argv[optind]); diff --git a/cat/log.c b/cat/log.c index d6e98cb4c..afba541ca 100644 --- a/cat/log.c +++ b/cat/log.c @@ -81,6 +81,7 @@ usage (int status) " --echo-keys Don't turn off echo for passphrases\n"...
2019 Nov 12
4
[PATCH 1/2] options: Fixes and enhancements to --key parsing.
The first patch fixes a rather serious bug, the second patch allows multiple --key parameters and default parameters. There is a third patch to libguestfs which adds a test, coming up. I did not yet review and fix the documentation. I think we need to centralize it in one place because at the moment the same documentation for --key is copy/pasted all over the tools. Rich.
2018 Sep 19
5
[PATCH 0/2] RFC: --key option for tools
Hi, the following series adds a --key option in the majority of tools: this makes it possible to pass LUKS credentials programmatically, avoid the need to manually input them, or unsafely pass them via stdin. Thanks, Pino Toscano (2): mltools: create a cmdline_options struct Introduce a --key option in tools that accept keys builder/cmdline.ml | 2 +-
2019 Nov 29
8
[PATCH 0/1] Allow UUIDs for --key identifiers.
This combined patch series enables to decrypt LUKS devices on inspection by allowing the UUID of the LUKS device with the --key syntax. I opted for reusing the option instead of adding another one, as I think that device names and UUIDs are different enough that can be properly distinguished. A test for this (patch #4) can be applied only when the patches for common are applied, and the
2019 Nov 12
0
[PATCH 1/2] options: Fix segfault when multiple --key parameters given.
...64/libc.so.6 #1 0x00007ffff78ee8d9 in abort () from /lib64/libc.so.6 #2 0x00007ffff79494af in __libc_message () from /lib64/libc.so.6 #3 0x00007ffff7950a6c in malloc_printerr () from /lib64/libc.so.6 #4 0x00007ffff79528d0 in _int_free () from /lib64/libc.so.6 #5 0x00005555555bdd6e in free_key_store () #6 0x0000555555589027 in main () (gdb) quit --- options/keys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/options/keys.c b/options/keys.c index 7f68986..f783066 100644 --- a/options/keys.c +++ b/options/keys.c @@ -216,7 +216,8 @@ key_store_import_key (struct key_...
2019 Nov 29
0
[common PATCH 1/2] options: rename key.device as key.id
...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); } } diff --git a/options/options.h b/options/options.h index 510e8a8..b83a92b 100644 --- a/options/options.h +++ b/options/options.h @@ -104,10 +104,12 @@ struct mp {...
2019 Nov 29
0
[common PATCH 2/2] options: allow a UUID as identifier for --key
...tern char **get_keys (struct key_store *ks, const char *device, const char *uuid); extern struct key_store *key_store_add_from_selector (struct key_store *ks, const char *selector); extern struct key_store *key_store_import_key (struct key_store *ks, const struct key_store_key *key); extern void free_key_store (struct key_store *ks); -- 2.21.0
2019 Nov 26
0
[PATCH common v2 2/3] options: Allow multiple --key parameters.
...char *device); +extern char **get_keys (struct key_store *ks, const char *device); extern struct key_store *key_store_add_from_selector (struct key_store *ks, const char *selector); extern struct key_store *key_store_import_key (struct key_store *ks, const struct key_store_key *key); extern void free_key_store (struct key_store *ks); -- 2.23.0
2020 Jan 27
0
[PATCH v2 2/2] sparsify: support LUKS-encrypted partitions
...6ec3a51e7 100644 --- a/inspector/inspector.c +++ b/inspector/inspector.c @@ -298,7 +298,7 @@ main (int argc, char *argv[]) * the -i option) because it can only handle a single root. So we * use low-level APIs. */ - inspect_do_decrypt (g, ks); + inspect_do_decrypt (g, ks, false); free_key_store (ks); diff --git a/sparsify/in_place.ml b/sparsify/in_place.ml index 7da83dafd..ade3c6843 100644 --- a/sparsify/in_place.ml +++ b/sparsify/in_place.ml @@ -62,7 +62,7 @@ let run disk format ignores zeroes ks = error ~exit_code:3 (f_"discard/trim is not supported"); (* Decrypt t...
2019 Nov 12
0
[PATCH 2/2] options: Allow multiple --key parameters and default keys.
...char *device); +extern char **get_keys (struct key_store *ks, const char *device); extern struct key_store *key_store_add_from_selector (struct key_store *ks, const char *selector); extern struct key_store *key_store_import_key (struct key_store *ks, const struct key_store_key *key); extern void free_key_store (struct key_store *ks); -- 2.23.0
2020 Feb 13
1
[common PATCH v4 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> v4 fixes issues found during code review: - whitespace-change-only hunks are removed - options are alphabetically orderred now v3 is just a spelling correction spotted by Eric Blake https://www.redhat.com/archives/libguestfs/2020-February/msg00111.html In v2 I've moved '--blocksize' parameter description into the separate file called
2020 Jan 21
12
[PATCH 0/1] WIP: Support LUKS-encrypted partitions
The following patch attempts to implement sparsification of LUKS-encrypted partitions. It uses lsblk to pair the underlying LUKS block device with its mapped name. Also, --allow-discards was added by default to luks_open(). There are several potential issues that I can think of: 1) If and entire device is encrypted (not just one of more partitions), the lsblk trick might not work. 2) The
2020 Feb 12
0
[common PATCH v2 1/1] options: add '--blocksize' option for C-based tools
...i; /* original URI (for error messages etc.) */ + int blocksize; /* blocksize (0 == default) */ } uri; struct { char *guest; /* guest name */ @@ -156,7 +158,7 @@ extern struct key_store *key_store_import_key (struct key_store *ks, const struc extern void free_key_store (struct key_store *ks); /* in options.c */ -extern void option_a (const char *arg, const char *format, struct drv **drvsp); +extern void option_a (const char *arg, const char *format, int blocksize, struct drv **drvsp); extern void option_d (const char *arg, struct drv **drvsp); extern char ad...
2020 Feb 11
1
[common PATCH] options: add '--blocksize' option for C-based tools
...i; /* original URI (for error messages etc.) */ + int blocksize; /* blocksize (0 == default) */ } uri; struct { char *guest; /* guest name */ @@ -156,7 +158,7 @@ extern struct key_store *key_store_import_key (struct key_store *ks, const struc extern void free_key_store (struct key_store *ks); /* in options.c */ -extern void option_a (const char *arg, const char *format, struct drv **drvsp); +extern void option_a (const char *arg, const char *format, int blocksize, struct drv **drvsp); extern void option_d (const char *arg, struct drv **drvsp); extern char ad...
2020 Feb 12
1
[common PATCH v3 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> v3 is just a spelling correction spotted by Eric Blake In v2 I've moved '--blocksize' parameter description into the separate file called blocksize-option.pod so we can include it everywhere we need similar to key-option.pod. https://www.redhat.com/archives/libguestfs/2020-February/msg00099.html v1 was here:
2020 Feb 12
3
[common PATCH v2 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> In v2 I've moved '--blocksize' parameter description into the separate file called blocksize-option.pod so we can include it everywhere we need similar to key-option.pod. v1 was here: https://www.redhat.com/archives/libguestfs/2020-February/msg00096.html Nikolay Ivanets (1): options: add '--blocksize' option for C-based
2020 Jan 22
3
[PATCH 1/1] sparsify: support LUKS-encrypted partitions
...ff..db322a19a 100644 --- a/inspector/inspector.c +++ b/inspector/inspector.c @@ -298,7 +298,7 @@ main (int argc, char *argv[]) * the -i option) because it can only handle a single root. So we * use low-level APIs. */ - inspect_do_decrypt (g, ks); + inspect_do_decrypt (g, ks, 0); free_key_store (ks); diff --git a/sparsify/in_place.ml b/sparsify/in_place.ml index 7da83dafd..ade3c6843 100644 --- a/sparsify/in_place.ml +++ b/sparsify/in_place.ml @@ -62,7 +62,7 @@ let run disk format ignores zeroes ks = error ~exit_code:3 (f_"discard/trim is not supported"); (* Decrypt t...
2019 Nov 26
6
[PATCH options v2 0/3] options: Allow multiple and default --key parameters.
v1: https://www.redhat.com/archives/libguestfs/2019-November/msg00036.html
2020 Jan 27
3
[PATCH v2 1/2] mltools, options: support --allow-discards when decrypting LUKS devices
--- mltools/tools_utils-c.c | 8 ++++---- mltools/tools_utils.ml | 6 +++--- mltools/tools_utils.mli | 8 ++++++-- options/decrypt.c | 5 +++-- options/inspect.c | 2 +- options/options.h | 2 +- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/mltools/tools_utils-c.c b/mltools/tools_utils-c.c index 6c43b8d..1dcebc4 100644 --- a/mltools/tools_utils-c.c +++