summaryrefslogtreecommitdiffstats
path: root/daemons
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2015-06-23 14:14:33 +0200
committerPetr Vobornik <pvoborni@redhat.com>2015-06-24 14:25:40 +0200
commit33bc9e7faca55497e00a3f6c08f4bff7262e290c (patch)
treed4125a8cb814a2baf1ce65e9b5c226d30fcddc96 /daemons
parent495da412f155603c02907187c21dd4511281df2c (diff)
downloadfreeipa-33bc9e7faca55497e00a3f6c08f4bff7262e290c.tar.gz
freeipa-33bc9e7faca55497e00a3f6c08f4bff7262e290c.tar.xz
freeipa-33bc9e7faca55497e00a3f6c08f4bff7262e290c.zip
Hide traceback in ipa-dnskeysyncd if kinit failed.
https://fedorahosted.org/freeipa/ticket/4657 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'daemons')
-rwxr-xr-xdaemons/dnssec/ipa-dnskeysyncd7
1 files changed, 6 insertions, 1 deletions
diff --git a/daemons/dnssec/ipa-dnskeysyncd b/daemons/dnssec/ipa-dnskeysyncd
index 31027cb0c..7213168b4 100755
--- a/daemons/dnssec/ipa-dnskeysyncd
+++ b/daemons/dnssec/ipa-dnskeysyncd
@@ -66,7 +66,12 @@ signal.signal(signal.SIGINT, commenceShutdown)
PRINCIPAL = str('%s/%s' % (DAEMONNAME, api.env.host))
log.debug('Kerberos principal: %s', PRINCIPAL)
ccache_filename = os.path.join(WORKDIR, 'ipa-dnskeysyncd.ccache')
-ipautil.kinit_keytab(PRINCIPAL, KEYTAB_FB, ccache_filename)
+try:
+ ipautil.kinit_keytab(PRINCIPAL, KEYTAB_FB, ccache_filename)
+except Exception as ex:
+ log.critical(ex)
+ # signal failure and let init system to restart the daemon
+ sys.exit(1)
os.environ['KRB5CCNAME'] = ccache_filename
# LDAP initialization