|
|
7ed5e3 |
From 778c08fe7b7eb00b7f48189dd1a3edf3f3be2625 Mon Sep 17 00:00:00 2001
|
|
|
7ed5e3 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
7ed5e3 |
Date: Mon, 30 Mar 2020 14:40:45 +0100
|
|
|
7ed5e3 |
Subject: [PATCH 3/4] options: Support Windows BitLocker (RHBZ#1808977).
|
|
|
7ed5e3 |
|
|
|
7ed5e3 |
---
|
|
|
7ed5e3 |
mltools/tools_utils.mli | 5 ++---
|
|
|
7ed5e3 |
options/decrypt.c | 9 ++++-----
|
|
|
7ed5e3 |
2 files changed, 6 insertions(+), 8 deletions(-)
|
|
|
7ed5e3 |
|
|
|
7ed5e3 |
diff --git a/mltools/tools_utils.mli b/mltools/tools_utils.mli
|
|
|
7ed5e3 |
index 102abff..1d1ac8a 100644
|
|
|
7ed5e3 |
--- a/common/mltools/tools_utils.mli
|
|
|
7ed5e3 |
+++ b/common/mltools/tools_utils.mli
|
|
|
7ed5e3 |
@@ -195,9 +195,8 @@ val is_btrfs_subvolume : Guestfs.guestfs -> string -> bool
|
|
|
7ed5e3 |
(** Checks if a filesystem is a btrfs subvolume. *)
|
|
|
7ed5e3 |
|
|
|
7ed5e3 |
val inspect_decrypt : Guestfs.guestfs -> key_store -> unit
|
|
|
7ed5e3 |
-(** Simple implementation of decryption: look for any [crypto_LUKS]
|
|
|
7ed5e3 |
- partitions and decrypt them, then rescan for VGs. This only works
|
|
|
7ed5e3 |
- for Fedora whole-disk encryption. *)
|
|
|
7ed5e3 |
+(** Simple implementation of decryption: look for any encrypted
|
|
|
7ed5e3 |
+ partitions and decrypt them, then rescan for VGs. *)
|
|
|
7ed5e3 |
|
|
|
7ed5e3 |
val with_timeout : string -> int -> ?sleep:int -> (unit -> 'a option) -> 'a
|
|
|
7ed5e3 |
(** [with_timeout op timeout ?sleep fn] implements a timeout loop.
|
|
|
7ed5e3 |
diff --git a/options/decrypt.c b/options/decrypt.c
|
|
|
7ed5e3 |
index 45de5b2..8eb24bc 100644
|
|
|
7ed5e3 |
--- a/common/options/decrypt.c
|
|
|
7ed5e3 |
+++ b/common/options/decrypt.c
|
|
|
7ed5e3 |
@@ -65,10 +65,8 @@ make_mapname (const char *device, char *mapname, size_t len)
|
|
|
7ed5e3 |
}
|
|
|
7ed5e3 |
|
|
|
7ed5e3 |
/**
|
|
|
7ed5e3 |
- * Simple implementation of decryption: look for any C<crypto_LUKS>
|
|
|
7ed5e3 |
- * partitions and decrypt them, then rescan for VGs. This only works
|
|
|
7ed5e3 |
- * for Fedora whole-disk encryption. WIP to make this work for other
|
|
|
7ed5e3 |
- * encryption schemes.
|
|
|
7ed5e3 |
+ * Simple implementation of decryption: look for any encrypted
|
|
|
7ed5e3 |
+ * partitions and decrypt them, then rescan for VGs.
|
|
|
7ed5e3 |
*/
|
|
|
7ed5e3 |
void
|
|
|
7ed5e3 |
inspect_do_decrypt (guestfs_h *g, struct key_store *ks)
|
|
|
7ed5e3 |
@@ -82,7 +80,8 @@ inspect_do_decrypt (guestfs_h *g, struct key_store *ks)
|
|
|
7ed5e3 |
|
|
|
7ed5e3 |
for (i = 0; partitions[i] != NULL; ++i) {
|
|
|
7ed5e3 |
CLEANUP_FREE char *type = guestfs_vfs_type (g, partitions[i]);
|
|
|
7ed5e3 |
- if (type && STREQ (type, "crypto_LUKS")) {
|
|
|
7ed5e3 |
+ if (type &&
|
|
|
7ed5e3 |
+ (STREQ (type, "crypto_LUKS") || STREQ (type, "BitLocker"))) {
|
|
|
7ed5e3 |
char mapname[32];
|
|
|
7ed5e3 |
make_mapname (partitions[i], mapname, sizeof mapname);
|
|
|
7ed5e3 |
|
|
|
7ed5e3 |
--
|
|
|
7ed5e3 |
2.18.4
|
|
|
7ed5e3 |
|