summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/ldap_child.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-05-18 18:57:08 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-06-14 15:52:28 -0400
commit3ca7450bc821ac37851e92a256d0a2b89f4f2032 (patch)
tree7292cab8b821b46e6c42417179c1c0ddb1fb8122 /src/providers/ldap/ldap_child.c
parent727937fb86cfb042063f02fa2a229d236d7f105f (diff)
downloadsssd-3ca7450bc821ac37851e92a256d0a2b89f4f2032.tar.gz
sssd-3ca7450bc821ac37851e92a256d0a2b89f4f2032.tar.xz
sssd-3ca7450bc821ac37851e92a256d0a2b89f4f2032.zip
Provide more debugging in krb5_child and ldap_child
https://fedorahosted.org/sssd/ticket/1225
Diffstat (limited to 'src/providers/ldap/ldap_child.c')
-rw-r--r--src/providers/ldap/ldap_child.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/providers/ldap/ldap_child.c b/src/providers/ldap/ldap_child.c
index 13e12e93c..83ce468fa 100644
--- a/src/providers/ldap/ldap_child.c
+++ b/src/providers/ldap/ldap_child.c
@@ -118,6 +118,10 @@ static int pack_buffer(struct response *r, int result, krb5_error_code krberr,
return ENOMEM;
}
+ DEBUG(SSSDBG_TRACE_LIBS,
+ ("result [%d] krberr [%d] msgsize [%d] msg [%s]\n",
+ result, krberr, len, msg));
+
/* result */
SAFEALIGN_SET_UINT32(&r->buf[p], result, &p);
@@ -183,7 +187,6 @@ static krb5_error_code ldap_child_get_tgt_sync(TALLOC_CTX *memctx,
krberr = KRB5KRB_ERR_GENERIC;
goto done;
}
-
} else {
realm_name = talloc_strdup(memctx, realm_str);
if (!realm_name) {
@@ -235,6 +238,7 @@ static krb5_error_code ldap_child_get_tgt_sync(TALLOC_CTX *memctx,
} else {
krberr = krb5_kt_default(context, &keytab);
}
+ DEBUG(SSSDBG_CONF_SETTINGS, ("Using keytab [%s]\n", KEYTAB_CLEAN_NAME));
if (krberr) {
DEBUG(SSSDBG_FATAL_FAILURE,
("Failed to read keytab file [%s]: %s\n",
@@ -275,6 +279,7 @@ static krb5_error_code ldap_child_get_tgt_sync(TALLOC_CTX *memctx,
tmp_str = getenv("KRB5_CANONICALIZE");
if (tmp_str != NULL && strcasecmp(tmp_str, "true") == 0) {
+ DEBUG(SSSDBG_CONF_SETTINGS, ("Will canonicalize principals\n"));
canonicalize = 1;
}
sss_krb5_get_init_creds_opt_set_canonicalize(&options, canonicalize);
@@ -514,11 +519,13 @@ int main(int argc, const char *argv[])
goto fail;
}
+ DEBUG(SSSDBG_TRACE_FUNC, ("ldap_child completed successfully\n"));
close(STDOUT_FILENO);
talloc_free(main_ctx);
_exit(0);
fail:
+ DEBUG(SSSDBG_CRIT_FAILURE, ("ldap_child failed!\n"));
close(STDOUT_FILENO);
talloc_free(main_ctx);
_exit(-1);