[gparted] Add bug checks into label file system operation methods (#774818)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Add bug checks into label file system operation methods (#774818)
- Date: Sat, 14 Jan 2017 15:53:05 +0000 (UTC)
commit 49c05646019f76a015afaee32335f53cc4d58f1f
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sat Dec 3 20:06:44 2016 +0000
Add bug checks into label file system operation methods (#774818)
Ensure pre-condition of never being passed a Partition object containing
an open LUKS encryption mapping is met for label file system operation
related methods.
Bug 774818 - Implement LUKS read-write actions NOT requiring a
passphrase
src/GParted_Core.cc | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 7f5af03..cbc8121 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -2146,6 +2146,14 @@ bool GParted_Core::remove_filesystem( const Partition & partition, OperationDeta
bool GParted_Core::label_filesystem( const Partition & partition, OperationDetail & operationdetail )
{
+ if ( partition.filesystem == FS_LUKS && partition.busy )
+ {
+ operationdetail.add_child( OperationDetail(
+ GPARTED_BUG + ": " + _("partition contains open LUKS encryption for a label file
system only step"),
+ STATUS_ERROR, FONT_ITALIC ) );
+ return false;
+ }
+
if( partition.get_filesystem_label().empty() ) {
operationdetail.add_child( OperationDetail(
String::ucompose( _("Clear file system label on %1"), partition.get_path() ) ) );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]