diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-11-23 17:40:47 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-11-29 14:50:51 +0100 |
commit | 7d5c680ace7ccea3b0f7f1471cf8dbc07b3da5a1 (patch) | |
tree | 9dbbb1c9cf63a236947ecee6d82ea16d4c256a3e /ipaserver/install/server/replicainstall.py | |
parent | 75b70e3f0d52a9c98f443d3fc2f7cef92bdc7b1a (diff) | |
download | freeipa-7d5c680ace7ccea3b0f7f1471cf8dbc07b3da5a1.tar.gz freeipa-7d5c680ace7ccea3b0f7f1471cf8dbc07b3da5a1.tar.xz freeipa-7d5c680ace7ccea3b0f7f1471cf8dbc07b3da5a1.zip |
ipautil: move kinit functions to ipalib.install
kinit_password() depends on ipaplatform.
Move kinit_password() as well as kinit_keytab() to a new
ipalib.install.kinit module, as they are used only from installers.
https://fedorahosted.org/freeipa/ticket/6474
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipaserver/install/server/replicainstall.py')
-rw-r--r-- | ipaserver/install/server/replicainstall.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py index 1aad308bc..a9e25c98f 100644 --- a/ipaserver/install/server/replicainstall.py +++ b/ipaserver/install/server/replicainstall.py @@ -18,6 +18,7 @@ from pkg_resources import parse_version import six from ipalib.install import sysrestore +from ipalib.install.kinit import kinit_keytab from ipapython import ipaldap, ipautil from ipapython.dn import DN from ipapython.ipa_log_manager import root_logger @@ -816,9 +817,9 @@ def install_check(installer): enroll_dl0_replica(installer, fstore, remote_api) ccache = os.environ['KRB5CCNAME'] - ipautil.kinit_keytab('host/{env.host}@{env.realm}'.format(env=api.env), - paths.KRB5_KEYTAB, - ccache) + kinit_keytab('host/{env.host}@{env.realm}'.format(env=api.env), + paths.KRB5_KEYTAB, + ccache) except errors.ACIError: raise ScriptError("\nThe password provided is incorrect for LDAP server " @@ -1042,9 +1043,9 @@ def promote_check(installer): installutils.verify_fqdn(config.master_host_name, options.no_host_dns) ccache = os.environ['KRB5CCNAME'] - ipautil.kinit_keytab('host/{env.host}@{env.realm}'.format(env=api.env), - paths.KRB5_KEYTAB, - ccache) + kinit_keytab('host/{env.host}@{env.realm}'.format(env=api.env), + paths.KRB5_KEYTAB, + ccache) cafile = paths.IPA_CA_CRT if not ipautil.file_exists(cafile): |