68 lines
2.6 KiB
Diff
68 lines
2.6 KiB
Diff
From ee52e579dee7e8b33c932a61d27151826e47a97e Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
|
|
<marmarek@invisiblethingslab.com>
|
|
Date: Fri, 19 Oct 2018 08:02:13 +0200
|
|
Subject: [PATCH] anaconda: fix root password dialog
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Properly save 'lock' state. Previously if it was unchecked, new password
|
|
was saved, but remained locked.
|
|
|
|
Fixes QubesOS/qubes-issues#3327
|
|
|
|
Signed-off-by: Frédéric Pierret <frederic.epitre@orange.fr>
|
|
---
|
|
pyanaconda/ui/gui/spokes/password.py | 11 ++++++++---
|
|
1 file changed, 8 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py
|
|
index 3e8ada1cc..646e7f7c1 100644
|
|
--- a/pyanaconda/ui/gui/spokes/password.py
|
|
+++ b/pyanaconda/ui/gui/spokes/password.py
|
|
@@ -99,6 +99,8 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
|
|
self.pw.set_placeholder_text(_("The password is set."))
|
|
self.confirm.set_placeholder_text(_("The password is set."))
|
|
|
|
+ self._lock = self.data.rootpw.lock
|
|
+
|
|
self.pw_bar = self.builder.get_object("password_bar")
|
|
self.pw_label = self.builder.get_object("password_label")
|
|
|
|
@@ -131,6 +133,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
|
|
self.confirm.set_sensitive(not lock.get_active())
|
|
if not lock.get_active():
|
|
self.pw.grab_focus()
|
|
+ self._lock = lock.get_active()
|
|
|
|
# Caps lock detection isn't hooked up right now
|
|
# def setCapsLockLabel(self):
|
|
@@ -161,10 +164,12 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
|
|
self.data.rootpw.seen = False
|
|
self._kickstarted = False
|
|
|
|
- if pw:
|
|
+ if self._lock:
|
|
+ self.data.rootpw.lock = True
|
|
+ elif pw:
|
|
+ self.data.rootpw.lock = False
|
|
self.data.rootpw.password = cryptPassword(pw)
|
|
self.data.rootpw.isCrypted = True
|
|
- self.data.rootpw.lock = self._lock
|
|
|
|
self.pw.set_placeholder_text("")
|
|
self.confirm.set_placeholder_text("")
|
|
@@ -265,7 +270,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
|
|
return InputCheck.CHECK_OK
|
|
|
|
# If the password is empty, clear the strength bar and skip this check
|
|
- if not pw and not confirm:
|
|
+ if self.lock.get_active() or (not pw and not confirm):
|
|
self._updatePwQuality(True, 0)
|
|
return InputCheck.CHECK_OK
|
|
|
|
--
|
|
2.14.4
|
|
|