Remove sensitive information from logs

When -w/--password option is passed to ipa-replica-install it is
printed to ipareplica-install.log. Make sure that the value of this
option is hidden.

https://fedorahosted.org/freeipa/ticket/1378
This commit is contained in:
Martin Kosek
2011-07-12 10:02:09 +02:00
parent 0cb65fd9f6
commit 02520ab98c
2 changed files with 11 additions and 11 deletions

View File

@@ -55,15 +55,16 @@ def replica_conn_check(master_host, host_name, realm, check_ca,
"--auto-master-check", "--realm", realm,
"--principal", "admin",
"--hostname", host_name]
nolog=tuple()
if admin_password:
args.extend(["--password", admin_password])
nolog=(admin_password,)
if check_ca:
args.append('--check-ca')
logging.debug("Running ipa-replica-conncheck with following arguments: %s" %
" ".join(args))
(stdin, stderr, returncode) = ipautil.run(args,raiseonerr=False, capture_output=False)
(stdin, stderr, returncode) = ipautil.run(args,raiseonerr=False,capture_output=False,
nolog=nolog)
if returncode != 0:
sys.exit("Connection check failed!" +