Skip to content

Commit

Permalink
gui: tui: storage: Disable the partial adv encrypt support
Browse files Browse the repository at this point in the history
The support for using encrypted file systems with advanced disk
configuration needs a lot more work.
Tracking new GitHub Issue in #512

Signed-off-by: Mark D Horn <[email protected]>
  • Loading branch information
mdhorn committed Sep 13, 2019
1 parent c190a71 commit 2615d01
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
1 change: 1 addition & 0 deletions gui/pages/disk_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func (disk *DiskConfig) advancedButtonToggled() {
}

disk.encryptCheck.SetSensitive(storage.AdvancedPartitionsRequireEncryption(disk.model.TargetMedias))
disk.encryptCheck.SetActive(false) // Force off for Advance as not support yet

results := storage.DesktopValidateAdvancedPartitions(disk.model.TargetMedias)
if len(results) > 0 {
Expand Down
36 changes: 21 additions & 15 deletions storage/ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -1498,13 +1498,15 @@ func FindAdvancedInstallTargets(medias []*BlockDevice) []*BlockDevice {
}
}
break
case "e":
if ch.MountPoint == "/boot" {
log.Warning("AdvancedPartitioning: /boot can no be encrypted, skipping")
} else {
ch.Type = BlockDeviceTypeCrypt
log.Debug("AdvancedPartitioning: Encrypt partition %s", ch.Name)
}
/*
case "e":
if ch.MountPoint == "/boot" {
log.Warning("AdvancedPartitioning: /boot can no be encrypted, skipping")
} else {
ch.Type = BlockDeviceTypeCrypt
log.Debug("AdvancedPartitioning: Encrypt partition %s", ch.Name)
}
*/
case "f":
ch.FormatPartition = true
log.Debug("AdvancedPartitioning: Format partition %s enabled", ch.Name)
Expand Down Expand Up @@ -1679,12 +1681,14 @@ func validateAdvancedPartitions(rootSize uint64, medias []*BlockDevice) []string
results = append(results, warning)
}
break
case "e":
if strings.HasPrefix(strings.ToLower(ch.PartitionLabel), "clr_boot") {
warning := utils.Locale.Get("Encryption of %s is not supported", "CLR_BOOT")
results = append(results, warning)
log.Warning("validateAdvancedPartitions: %s %+v", warning, ch)
}
/*
case "e":
if strings.HasPrefix(strings.ToLower(ch.PartitionLabel), "clr_boot") {
warning := utils.Locale.Get("Encryption of %s is not supported", "CLR_BOOT")
results = append(results, warning)
log.Warning("validateAdvancedPartitions: %s %+v", warning, ch)
}
*/
}
}
}
Expand Down Expand Up @@ -1734,8 +1738,10 @@ func AdvancedPartitionsRequireEncryption(medias []*BlockDevice) bool {
switch lowerPart {
case "boot":
break
case "e":
encryptionFound = true
/*
case "e":
encryptionFound = true
*/
}
}
}
Expand Down
1 change: 1 addition & 0 deletions tui/media_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ func (page *MediaConfigPage) advancedRadioOnChange(active bool) {
page.isDestructiveSelected = false

page.encryptCheck.SetEnabled(storage.AdvancedPartitionsRequireEncryption(page.getModel().TargetMedias))
page.encryptCheck.SetState(0) // Force off for Advance as not support yet

page.advancedCfgBtn.SetEnabled(true)

Expand Down

0 comments on commit 2615d01

Please sign in to comment.