Re: [PATCH][devel, f12] Missing volume_key shouldn't break LUKS support completely. (#526899)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ack

On 10/12/2009 08:00 PM, David Lehman wrote:
Live images don't contain volume_key, which makes sense since key
escrow is kickstart-only functionality. At any rate, failure to
import volume_key should only break key escrow.
---
  storage/formats/luks.py |    8 +++++++-
  1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/storage/formats/luks.py b/storage/formats/luks.py
index 15b92b6..668e689 100644
--- a/storage/formats/luks.py
+++ b/storage/formats/luks.py
@@ -24,7 +24,10 @@

  import os

-import volume_key
+try:
+    import volume_key
+except ImportError:
+    volume_key = None

  from iutil import log_method_call
  from ..errors import *
@@ -266,6 +269,9 @@ class LUKS(DeviceFormat):

      def escrow(self, directory, backupPassphrase):
          log.debug("escrow: escrowVolume start for %s" % self.device)
+        if volume_key is None:
+            raise LUKSError("Missing key escrow support libraries")
+
          vol = volume_key.Volume.open(self.device)
          volume_ident = self._escrowVolumeIdent(vol)


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux