diff options
author | David Lehman <dlehman@redhat.com> | 2009-10-12 12:55:17 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2009-10-12 13:42:51 -0500 |
commit | 20d22fa6bef4f8c73de0e1f72c0c63958b252177 (patch) | |
tree | b3f0a0908b4fefbf4261fb80dd24f670be386b8d | |
parent | 7b43a50cb9e96f39cb88c43c4cd4fc3e4a9604ad (diff) | |
download | anaconda-20d22fa6bef4f8c73de0e1f72c0c63958b252177.tar.gz anaconda-20d22fa6bef4f8c73de0e1f72c0c63958b252177.tar.xz anaconda-20d22fa6bef4f8c73de0e1f72c0c63958b252177.zip |
Missing volume_key shouldn't break LUKS support completely. (#526899)
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.
-rw-r--r-- | 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 15b92b6ba..668e6891d 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) |