summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-install/ipa-client-install
diff options
context:
space:
mode:
authorJr Aquino <jr.aquino@citrix.com>2011-02-14 12:00:49 -0800
committerRob Crittenden <rcritten@redhat.com>2011-02-14 15:43:18 -0500
commit72e315c9362e2831a0a425bb7651ddc419cf5e97 (patch)
tree7f1bc2c7b1ed94761012d1c4c2e9bffc32d3bac2 /ipa-client/ipa-install/ipa-client-install
parent309ed42865715dbc652f1946320ecb522267e97c (diff)
downloadfreeipa-72e315c9362e2831a0a425bb7651ddc419cf5e97.zip
freeipa-72e315c9362e2831a0a425bb7651ddc419cf5e97.tar.gz
freeipa-72e315c9362e2831a0a425bb7651ddc419cf5e97.tar.xz
Bugfix for ipa-client-install echo's password in cleartext to stdout https://fedorahosted.org/freeipa/ticket/959
Diffstat (limited to 'ipa-client/ipa-install/ipa-client-install')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install6
1 files changed, 4 insertions, 2 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index d69a103..20c327d 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -658,8 +658,10 @@ def main():
stdin = options.password
else:
if not options.unattended:
- print "Password for %s: " % principal,
- sys.stdout.flush()
+ stdin = getpass.getpass("Password for %s: " % principal)
+ if not stdin:
+ sys.exit("Password must be provided for %s. " %
+ principal)
else:
if sys.stdin.isatty():
sys.exit("Password must be provided in non-interactive mode.\nThis can be done via echo password | ipa-client-install ... or\nwith the -w option.")