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
This commit is contained in:
Mike Fleetwood 2015-12-31 17:03:30 +00:00 committed by Curtis Gedak
parent e86e7b91b2
commit ae57f3cd4e
1 changed files with 4 additions and 2 deletions

View File

@ -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() ;