search for: selector_orig

Displaying 6 results from an estimated 6 matches for "selector_orig".

2019 Nov 26
0
[PATCH common v2 1/3] options: Simplify selector parsing for --key options.
...+), 21 deletions(-) diff --git a/options/keys.c b/options/keys.c index f783066..74b5497 100644 --- a/options/keys.c +++ b/options/keys.c @@ -153,49 +153,42 @@ get_key (struct key_store *ks, const char *device) } struct key_store * -key_store_add_from_selector (struct key_store *ks, const char *selector_orig) +key_store_add_from_selector (struct key_store *ks, const char *selector) { - CLEANUP_FREE char *selector = strdup (selector_orig); - const char *elem; - char *saveptr; + CLEANUP_FREE_STRING_LIST char **fields = + guestfs_int_split_string (':', selector); struct key_store_key ke...
2019 Nov 12
0
[PATCH 2/2] options: Allow multiple --key parameters and default keys.
...* Key not found in the key store, ask the user for it. */ + s = read_key (device); + if (!s) + error (EXIT_FAILURE, 0, _("could not read key from user")); + r[0] = s; + } + + return r; } struct key_store * -key_store_add_from_selector (struct key_store *ks, const char *selector_orig) +key_store_add_from_selector (struct key_store *ks, const char *selector) { - CLEANUP_FREE char *selector = strdup (selector_orig); - const char *elem; - char *saveptr; + CLEANUP_FREE_STRING_LIST char **fields = + guestfs_int_split_string (':', selector); struct key_store_key ke...
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.
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
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
...ase key_file: + return read_first_line_from_file (key->file.name); + } + + /* Key not found in the key store, ask the user for it. */ + break; + } + } + + return read_key (device); +} + +struct key_store * +key_store_add_from_selector (struct key_store *ks, const char *selector_orig) +{ + CLEANUP_FREE char *selector = strdup (selector_orig); + const char *elem; + char *saveptr; + struct key_store_key key; + + if (!selector) + error (EXIT_FAILURE, errno, "strdup"); + + /* 1: device */ + elem = strtok_r (selector, ":", &saveptr); + if (!elem) {...
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 +-