mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Don't log one-time password in logs when configuring client.
https://fedorahosted.org/freeipa/ticket/1801
This commit is contained in:
parent
eaf0a83ab1
commit
4487a9564b
@ -23,17 +23,15 @@ try:
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import stat
|
|
||||||
import time
|
import time
|
||||||
import socket
|
import socket
|
||||||
import logging
|
import logging
|
||||||
import tempfile
|
import tempfile
|
||||||
import getpass
|
import getpass
|
||||||
import re
|
|
||||||
from ipaclient import ipadiscovery
|
from ipaclient import ipadiscovery
|
||||||
import ipaclient.ipachangeconf
|
import ipaclient.ipachangeconf
|
||||||
import ipaclient.ntpconf
|
import ipaclient.ntpconf
|
||||||
from ipapython.ipautil import run, user_input, CalledProcessError, file_exists, install_file
|
from ipapython.ipautil import run, user_input, CalledProcessError, file_exists
|
||||||
import ipapython.services as ipaservices
|
import ipapython.services as ipaservices
|
||||||
from ipapython import ipautil
|
from ipapython import ipautil
|
||||||
from ipapython import dnsclient
|
from ipapython import dnsclient
|
||||||
@ -888,6 +886,7 @@ def install(options, env, fstore, statestore):
|
|||||||
return CLIENT_INSTALL_ERROR
|
return CLIENT_INSTALL_ERROR
|
||||||
|
|
||||||
if not options.on_master:
|
if not options.on_master:
|
||||||
|
nolog = tuple()
|
||||||
# First test out the kerberos configuration
|
# First test out the kerberos configuration
|
||||||
try:
|
try:
|
||||||
(krb_fd, krb_name) = tempfile.mkstemp()
|
(krb_fd, krb_name) = tempfile.mkstemp()
|
||||||
@ -929,6 +928,7 @@ def install(options, env, fstore, statestore):
|
|||||||
print stdout
|
print stdout
|
||||||
return CLIENT_INSTALL_ERROR
|
return CLIENT_INSTALL_ERROR
|
||||||
elif options.password:
|
elif options.password:
|
||||||
|
nolog = (options.password,)
|
||||||
join_args.append("-w")
|
join_args.append("-w")
|
||||||
join_args.append(options.password)
|
join_args.append(options.password)
|
||||||
elif options.prompt_password:
|
elif options.prompt_password:
|
||||||
@ -938,9 +938,10 @@ def install(options, env, fstore, statestore):
|
|||||||
password = getpass.getpass("Password: ")
|
password = getpass.getpass("Password: ")
|
||||||
join_args.append("-w")
|
join_args.append("-w")
|
||||||
join_args.append(password)
|
join_args.append(password)
|
||||||
|
nolog = (password,)
|
||||||
|
|
||||||
# Now join the domain
|
# Now join the domain
|
||||||
(stdout, stderr, returncode) = run(join_args, raiseonerr=False, env=env)
|
(stdout, stderr, returncode) = run(join_args, raiseonerr=False, env=env, nolog=nolog)
|
||||||
|
|
||||||
if returncode != 0:
|
if returncode != 0:
|
||||||
print >>sys.stderr, "Joining realm failed: %s" % stderr,
|
print >>sys.stderr, "Joining realm failed: %s" % stderr,
|
||||||
|
Loading…
Reference in New Issue
Block a user