use separate ccache filename for each IPA DNSSEC daemon

ipa-dnskeysyncd, ipa-dnskeysync-replica, and ipa-ods-exporter use a generic
'ccache' filename for credential storage, making debugging Kerberos-related
errors unnecessarily complicated. This patch renames the ccache files so that
each of these daemons now has its own credenital cache.

Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
Martin Babinsky 2015-04-15 15:20:00 +02:00 committed by Tomas Babej
parent 2c8c4b8c88
commit 528e9503ed
3 changed files with 3 additions and 3 deletions

View File

@ -139,7 +139,7 @@ log.setLevel(level=logging.DEBUG)
# Kerberos initialization
PRINCIPAL = str('%s/%s' % (DAEMONNAME, ipalib.api.env.host))
log.debug('Kerberos principal: %s', PRINCIPAL)
ccache_filename = os.path.join(WORKDIR, 'ccache')
ccache_filename = os.path.join(WORKDIR, 'ipa-dnskeysync-replica.ccache')
ipautil.kinit_keytab(PRINCIPAL, paths.IPA_DNSKEYSYNCD_KEYTAB, ccache_filename)
os.environ['KRB5CCNAME'] = ccache_filename
log.debug('Got TGT')

View File

@ -65,7 +65,7 @@ log = root_logger
# Kerberos initialization
PRINCIPAL = str('%s/%s' % (DAEMONNAME, api.env.host))
log.debug('Kerberos principal: %s', PRINCIPAL)
ccache_filename = os.path.join(WORKDIR, 'ccache')
ccache_filename = os.path.join(WORKDIR, 'ipa-dnskeysyncd.ccache')
ipautil.kinit_keytab(PRINCIPAL, KEYTAB_FB, ccache_filename)
os.environ['KRB5CCNAME'] = ccache_filename

View File

@ -399,7 +399,7 @@ ipalib.api.finalize()
# Kerberos initialization
PRINCIPAL = str('%s/%s' % (DAEMONNAME, ipalib.api.env.host))
log.debug('Kerberos principal: %s', PRINCIPAL)
ccache_name = os.path.join(WORKDIR, 'ccache')
ccache_name = os.path.join(WORKDIR, 'ipa-ods-exporter.ccache')
ipautil.kinit_keytab(PRINCIPAL, paths.IPA_ODS_EXPORTER_KEYTAB, ccache_name)
os.environ['KRB5CCNAME'] = ccache_name
log.debug('Got TGT')