From d402f62d438a72804cff14315bcac14dfdb60675 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 4 Apr 2012 06:33:11 -0700 Subject: Clean up log messages about keytab_name There were many places where we were printing (null) to the logs because a NULL keytab name tells libkrb5 to use its configured default instead of a particular path. This patch should clean up all uses of this to print "default" in the logs. https://fedorahosted.org/sssd/ticket/1288 --- src/providers/ldap/ldap_child.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/providers/ldap/ldap_child.c') diff --git a/src/providers/ldap/ldap_child.c b/src/providers/ldap/ldap_child.c index 025236e5e..e66406c0e 100644 --- a/src/providers/ldap/ldap_child.c +++ b/src/providers/ldap/ldap_child.c @@ -228,8 +228,10 @@ static krb5_error_code ldap_child_get_tgt_sync(TALLOC_CTX *memctx, krberr = krb5_kt_default(context, &keytab); } if (krberr) { - DEBUG(0, ("Failed to read keytab file: %s\n", - sss_krb5_get_error_message(context, krberr))); + DEBUG(SSSDBG_FATAL_FAILURE, + ("Failed to read keytab file [%s]: %s\n", + KEYTAB_CLEAN_NAME, + sss_krb5_get_error_message(context, krberr))); goto done; } @@ -272,11 +274,14 @@ static krb5_error_code ldap_child_get_tgt_sync(TALLOC_CTX *memctx, keytab, 0, NULL, &options); if (krberr) { - DEBUG(0, ("Failed to init credentials: %s\n", - sss_krb5_get_error_message(context, krberr))); - sss_log(SSS_LOG_ERR, "Failed to initialize credentials using keytab [%s]: %s. " - "Unable to create GSSAPI-encrypted LDAP connection.", - keytab_name, sss_krb5_get_error_message(context, krberr)); + DEBUG(SSSDBG_FATAL_FAILURE, + ("Failed to init credentials: %s\n", + sss_krb5_get_error_message(context, krberr))); + sss_log(SSS_LOG_ERR, + "Failed to initialize credentials using keytab [%s]: %s. " + "Unable to create GSSAPI-encrypted LDAP connection.", + KEYTAB_CLEAN_NAME, + sss_krb5_get_error_message(context, krberr)); goto done; } -- cgit