Call the C-language helper key_store_requires_network() in guestfish and
guestmount.
(Short log for the "common" submodule, commit range
35467027f657..ab6f3b2cc7cb:
Laszlo Ersek (12):
options: fix UUID comparison logic bug in get_keys()
mltools/tools_utils: remove unused function "key_store_to_cli"
mltools/tools_utils: allow multiple "--key" options for OCaml tools too
options: replace NULL-termination with number-of-elements in get_keys()
options: wrap each passphrase from get_keys() into a struct
options: add back-end for LUKS decryption with Clevis+Tang
options: introduce selector type "key_clevis"
options: generalize "--key" selector parsing for C-language utilities
mltools/tools_utils-c: handle internal type error with abort()
mltools/tools_utils: generalize "--key" selector parsing for OCaml utils
options, mltools/tools_utils: parse "--key ID:clevis" options
options, mltools/tools_utils: add helper for network dependency
).
Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1809453
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
Reviewed-by: Richard W.M. Jones <rjones(a)redhat.com>
---
Notes:
v2:
- refresh the submodule update (in the commit message too);
need to do it again upon merge
- pick up Rich's R-b
v1:
The submodule commit range 35b49ce142fb..0399dea30e63 needs to be
refreshed in both the commit message and the "common" hunk, once the
libguestfs-common series is upstream.
fish/fish.c | 3 +++
fuse/guestmount.c | 4 ++++
common | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/fish/fish.c b/fish/fish.c
index 23d9bb94f3a4..19e3d2799e84 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -474,10 +474,13 @@ main (int argc, char *argv[])
CHECK_OPTION_blocksize_consumed;
/* If we've got drives to add, add them now. */
add_drives (drvs);
+ if (key_store_requires_network (ks) && guestfs_set_network (g, 1) == -1)
+ exit (EXIT_FAILURE);
+
/* If we've got mountpoints or prepared drives or -i option, we must
* launch the guest and mount them.
*/
if (next_prepared_drive > 1 || mps != NULL || inspector) {
/* RHBZ#612178: If --listen flag is given, then we will fork into
diff --git a/fuse/guestmount.c b/fuse/guestmount.c
index 77c534828fcd..3c6d57bde0d6 100644
--- a/fuse/guestmount.c
+++ b/fuse/guestmount.c
@@ -346,10 +346,14 @@ main (int argc, char *argv[])
if (guestfs_set_recovery_proc (g, !do_fork) == -1)
exit (EXIT_FAILURE);
/* Do the guest drives and mountpoints. */
add_drives (drvs);
+
+ if (key_store_requires_network (ks) && guestfs_set_network (g, 1) == -1)
+ exit (EXIT_FAILURE);
+
if (guestfs_launch (g) == -1)
exit (EXIT_FAILURE);
if (inspector)
inspect_mount ();
mount_mps (mps);
diff --git a/common b/common
index 35467027f657..ab6f3b2cc7cb 160000
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 35467027f657de76aca34b48a6f23e9608b23a57
+Subproject commit ab6f3b2cc7cbb0fa786e6faf633689a826cb0d9b
--
2.19.1.3.g30247aa5d201