[gparted] Also prompt for LUKS password as required for check operation (#59)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Also prompt for LUKS password as required for check operation (#59)
- Date: Sun, 25 Apr 2021 16:09:18 +0000 (UTC)
commit 80624bfd400f1df76dd8fed4804bb1651700f939
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Wed Apr 7 16:08:22 2021 +0100
Also prompt for LUKS password as required for check operation (#59)
A check operation involves (1) checking the file system, (2) growing the
encryption volume and (3) growing the file system. Therefore prompt for
the LUKS passphrase as required when composing a check operation too.
Closes #59 - Resize of LUKS2 encrypted file system fails with "Nothing
to read on input"
src/Win_GParted.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 011d1e96..cbe9d0b7 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -3238,12 +3238,18 @@ void Win_GParted::activate_manage_flags()
if ( dialog .any_change )
menu_gparted_refresh_devices() ;
}
-
+
+
void Win_GParted::activate_check()
{
g_assert( selected_partition_ptr != NULL ); // Bug: Partition callback without a selected partition
g_assert( valid_display_partition_ptr( selected_partition_ptr ) ); // Bug: Not pointing at a valid
display partition object
+ if (! ask_for_password_for_encrypted_resize_as_required(*selected_partition_ptr))
+ // Open encryption mapping needing a passphrase to resize but the password
+ // dialog was cancelled or closed without providing a working passphrase.
+ return;
+
// FIXME: Consider constructing new partition object with zero unallocated and
// messages cleared to represent how applying a check operation also grows the
// file system to fill the partition.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]