[PATCH 2/6] Open as many luks devs as possible with any given passphrase. (#965754)

David Lehman dlehman at redhat.com
Wed May 29 15:46:15 UTC 2013


---
 blivet/devicetree.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 691f1b2..f8db987 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1153,8 +1153,11 @@ class DeviceTree(object):
                     # this makes device.configured return True
                     device.format.passphrase = 'yabbadabbadoo'
             else:
-                # Try each known passphrase.
-                for passphrase in self.__passphrases:
+                # Try each known passphrase. Include luksDevs values in case a
+                # passphrase has been set for a specific device without a full
+                # reset/populate, in which case the new passphrase would not be
+                # in self.__passphrases.
+                for passphrase in self.__passphrases + self.__luksDevs.values():
                     device.format.passphrase = passphrase
                     try:
                         device.format.setup()
-- 
1.8.1.4



More information about the anaconda-patches mailing list