summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-patches/greeter-15653-15656.diff
blob: f28a3dc66ebdf5d5bb19e63da088b28864f65286 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/usr/lib/python3/dist-packages/tailsgreeter/persistence.py b/usr/lib/python3/dist-packages/tailsgreeter/persistence.py
index e1415fa..cabefd6 100644
--- a/usr/lib/python3/dist-packages/tailsgreeter/persistence.py
+++ b/usr/lib/python3/dist-packages/tailsgreeter/persistence.py
@@ -54,15 +54,17 @@ class PersistenceSettings(object):
         Returns: True if everything went fine, False if the user should try
         again."""
         logging.debug("Unlocking persistence")
-        try:
-            self.activate_container(
-                device=self.containers[0]['path'],
-                password=passphrase,
-                readonly=readonly)
-            self.is_unlocked = True
-            return True
-        except tailsgreeter.errors.WrongPassphraseError:
-            return False
+        for container in self.containers:
+            try:
+                self.activate_container(
+                    device=container['path'],
+                    password=passphrase,
+                    readonly=readonly)
+                self.is_unlocked = True
+                return True
+            except tailsgreeter.errors.WrongPassphraseError:
+                pass
+        return False
 
     def lock(self):
         logging.debug("Locking persistence")
@@ -133,7 +135,7 @@ class PersistenceSettings(object):
                 "/sbin/cryptsetup", "luksClose",
                 self.cleartext_name
                 ]
-            self.check_output_and_error(
+            tailsgreeter.utils.check_output_and_error(
                 args,
                 exception=tailsgreeter.errors.LivePersistError,
                 error_message=_("cryptsetup failed with return code "