summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-06-08 14:39:50 +0200
committerMartin Kosek <mkosek@redhat.com>2011-06-13 12:59:22 +0200
commitd2b483cbb3ca15a68115cf32cfaf89572259914e (patch)
tree1661f3021e3b0b3cc54f75af68f044171f363d3e /ipaserver
parent645e55651e866f74b76108fe298526daaffb18ce (diff)
downloadfreeipa-d2b483cbb3ca15a68115cf32cfaf89572259914e.zip
freeipa-d2b483cbb3ca15a68115cf32cfaf89572259914e.tar.gz
freeipa-d2b483cbb3ca15a68115cf32cfaf89572259914e.tar.xz
Fix directory manager password validation in ipa-nis-manage.
ticket 1283, 1284
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/installutils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index 8d93a60..f5a8625 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -288,15 +288,18 @@ def get_password(prompt):
else:
return sys.stdin.readline().rstrip()
-def read_password(user, confirm=True, validate=True):
+def read_password(user, confirm=True, validate=True, retry=True):
correct = False
pwd = ""
while not correct:
+ if not retry:
+ correct = True
pwd = get_password(user + " password: ")
if not pwd:
continue
if validate and len(pwd) < 8:
print "Password must be at least 8 characters long"
+ pwd = ""
continue
if not confirm:
correct = True
@@ -305,6 +308,7 @@ def read_password(user, confirm=True, validate=True):
if pwd != pwd_confirm:
print "Password mismatch!"
print ""
+ pwd = ""
else:
correct = True
print ""