diff options
author | Martin Babinsky <mbabinsk@redhat.com> | 2015-03-16 16:43:10 +0100 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-04-20 08:27:35 +0000 |
commit | 3d2feac0e416c66ba37eee53ef5b3833c2c3e414 (patch) | |
tree | 77d8907c8dbba8db76db3cac3b9be09ffc970f01 /daemons/dnssec/ipa-ods-exporter | |
parent | a8e30e96716992e4160abdb7ac5995bb75e54eae (diff) | |
download | freeipa-3d2feac0e416c66ba37eee53ef5b3833c2c3e414.tar.gz freeipa-3d2feac0e416c66ba37eee53ef5b3833c2c3e414.tar.xz freeipa-3d2feac0e416c66ba37eee53ef5b3833c2c3e414.zip |
Adopted kinit_keytab and kinit_password for kerberos auth
Calls to ipautil.run using kinit were replaced with calls
kinit_keytab/kinit_password functions implemented in the PATCH 0015.
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Simo Sorce <ssorce@redhat.com>
Reviewed-By: Petr Spacek <pspacek@redhat.com>
Diffstat (limited to 'daemons/dnssec/ipa-ods-exporter')
-rwxr-xr-x | daemons/dnssec/ipa-ods-exporter | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/daemons/dnssec/ipa-ods-exporter b/daemons/dnssec/ipa-ods-exporter index 401f35087..6d33b79bb 100755 --- a/daemons/dnssec/ipa-ods-exporter +++ b/daemons/dnssec/ipa-ods-exporter @@ -399,7 +399,9 @@ ipalib.api.finalize() # Kerberos initialization PRINCIPAL = str('%s/%s' % (DAEMONNAME, ipalib.api.env.host)) log.debug('Kerberos principal: %s', PRINCIPAL) -ipautil.kinit_hostprincipal(paths.IPA_ODS_EXPORTER_KEYTAB, WORKDIR, PRINCIPAL) +ccache_name = os.path.join(WORKDIR, 'ccache') +ipautil.kinit_keytab(PRINCIPAL, paths.IPA_ODS_EXPORTER_KEYTAB, ccache_name) +os.environ['KRB5CCNAME'] = ccache_name log.debug('Got TGT') # LDAP initialization @@ -407,7 +409,7 @@ dns_dn = DN(ipalib.api.env.container_dns, ipalib.api.env.basedn) ldap = ipalib.api.Backend[ldap2] # fixme log.debug('Connecting to LDAP') -ldap.connect(ccache="%s/ccache" % WORKDIR) +ldap.connect(ccache=ccache_name) log.debug('Connected') |