[PATCH jk-tui 2/2] Crypt the root we get from the user

Jesse Keating jkeating at redhat.com
Tue Aug 21 23:44:05 UTC 2012


No sense having it hang around in the kickstart object in plain text.

Also add my name to the authors as now I've got a bunch of lines in this
file too.
---
 pyanaconda/ui/tui/spokes/password.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/tui/spokes/password.py b/pyanaconda/ui/tui/spokes/password.py
index eb9ff1e..4188a52 100644
--- a/pyanaconda/ui/tui/spokes/password.py
+++ b/pyanaconda/ui/tui/spokes/password.py
@@ -17,10 +17,12 @@
 # Red Hat, Inc.
 #
 # Red Hat Author(s): Martin Sivak <msivak at redhat.com>
+#                    Jesse Keating <jkeating at redhat.com>
 #
 
 from pyanaconda.ui.tui.spokes import NormalTUISpoke
 from pyanaconda.ui.tui.simpleline import TextWidget
+from pyanaconda.users import cryptPassword
 import getpass
 import pwquality
 import string
@@ -70,8 +72,8 @@ class PasswordSpoke(NormalTUISpoke):
         #return None
 
     def apply(self):
-        self.data.rootpw.password = self._password
-        self.data.rootpw.isCrypted = False
+        self.data.rootpw.password = cryptPassword(self._password)
+        self.data.rootpw.isCrypted = True
 
     def validate(self, p1, p2):
         # Check length of password
-- 
1.7.11.2



More information about the anaconda-patches mailing list