[gparted] Prevent Mount/Umount operation being available for LUKS (#760080)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Prevent Mount/Umount operation being available for LUKS (#760080)
- Date: Sat, 30 Jan 2016 17:41:40 +0000 (UTC)
commit ae57f3cd4ea0c7bcca2f489f9aae689d2ff1d70b
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Thu Dec 31 17:03:30 2015 +0000
Prevent Mount/Umount operation being available for LUKS (#760080)
The code currently allows attempting to mount and unmount a LUKS
partition. It is nonsense to directly try to mount and unmount a LUKS
partition and obviously doesn't work. For read-only LUKS support there
is no need to attempt to apply this to the encrypted file system within.
Therefore prevent these operations for LUKS partitions.
Bug 760080 - Implement read-only LUKS support
src/Win_GParted.cc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index eb4e56d..c33cc78 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -1100,6 +1100,7 @@ void Win_GParted::set_valid_operations()
&& selected_partition_ptr->type != TYPE_EXTENDED
&& selected_partition_ptr->filesystem != FS_LVM2_PV
&& selected_partition_ptr->filesystem != FS_LINUX_SWRAID
+ && selected_partition_ptr->filesystem != FS_LUKS
&& ( selected_partition_ptr->busy
|| selected_partition_ptr->get_mountpoints().size() /* Have mount point(s) */
|| selected_partition_ptr->filesystem == FS_LINUX_SWAP
@@ -1244,9 +1245,10 @@ void Win_GParted::set_valid_operations()
if ( selected_partition_ptr->status == STAT_REAL && fs.write_uuid )
allow_change_uuid( true ) ;
- // Generate Mount on submenu, except for LVM2 PVs
- // borrowing mount point to display the VGNAME
+ // Generate Mount on submenu, except for LVM2 PVs borrowing mount point to
+ // display the VGNAME and read-only supported LUKS.
if ( selected_partition_ptr->filesystem != FS_LVM2_PV &&
+ selected_partition_ptr->filesystem != FS_LUKS &&
selected_partition_ptr->get_mountpoints().size() )
{
menu = menu_partition .items()[ MENU_MOUNT ] .get_submenu() ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]