[PATCH] Don't abuse ksdata to default to locked password (#860029)
Jesse Keating
jkeating at redhat.com
Tue Oct 2 01:10:39 UTC 2012
When doing kickstarts we don't actually go through the apply() block,
which is what would change the ksdata.lock from True to False. Instead
use a _lock attribute to reflect that we default to being locked.
---
pyanaconda/ui/gui/spokes/password.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py
index 672c44c..8134172 100644
--- a/pyanaconda/ui/gui/spokes/password.py
+++ b/pyanaconda/ui/gui/spokes/password.py
@@ -56,7 +56,7 @@ class PasswordSpoke(NormalSpoke):
def initialize(self):
NormalSpoke.initialize(self)
# Set the rootpw to locked by default, setting a password is optional
- self.data.rootpw.lock = True
+ self._lock = True
# place holders for the text boxes
self.pw = self.builder.get_object("pw")
self.confirm = self.builder.get_object("confirm")
@@ -77,7 +77,7 @@ class PasswordSpoke(NormalSpoke):
def status(self):
if self._error:
return _("Error setting root password")
- elif self.data.rootpw.lock:
+ elif self._lock and not self.data.rootpw.password:
return _("Root account is disabled")
else:
return _("Root password is set")
@@ -87,9 +87,11 @@ class PasswordSpoke(NormalSpoke):
self.data.rootpw.password = cryptPassword(self._password)
self.data.rootpw.isCrypted = True
self.data.rootpw.lock = False
+ self._lock = False
else:
# Blank password case, disable the account
self.data.rootpw.lock = True
+ self._lock = True
self.data.rootpw.password = ''
self.data.rootpw.isCrypted = False
--
1.7.11.4
More information about the anaconda-patches
mailing list