Hello,

Hide traceback in ipa-dnskeysyncd if kinit failed.

https://fedorahosted.org/freeipa/ticket/4657

-- 
Petr^2 Spacek
From 1b27dc0c667569f4bbe653b350e0f95a43b6b341 Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Tue, 23 Jun 2015 14:14:33 +0200
Subject: [PATCH] Hide traceback in ipa-dnskeysyncd if kinit failed.

https://fedorahosted.org/freeipa/ticket/4657
---
 daemons/dnssec/ipa-dnskeysyncd | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/daemons/dnssec/ipa-dnskeysyncd b/daemons/dnssec/ipa-dnskeysyncd
index 31027cb0ce10496c17a6c4b500525d2e5b8b2e93..7213168b4423aad15bc031c7cd425d0ce17e9e24 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
-- 
2.1.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to