summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-10-09 19:02:22 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-10-12 09:56:54 +0200
commite7a24374d97e1d1c32d3e18561a20e8c5e6319ec (patch)
tree7acc2bb1d30f9e3cc72b500a5810ae4e48748743 /src/util
parent115cc768599d7df4b3206426652d3e7a3971d597 (diff)
downloadsssd-e7a24374d97e1d1c32d3e18561a20e8c5e6319ec.tar.gz
sssd-e7a24374d97e1d1c32d3e18561a20e8c5e6319ec.tar.xz
sssd-e7a24374d97e1d1c32d3e18561a20e8c5e6319ec.zip
Collect krb5 trace on high debug levels
If the debug level contains SSSDBG_TRACE_ALL, then the logs would also include tracing information from libkrb5. https://fedorahosted.org/sssd/ticket/1539
Diffstat (limited to 'src/util')
-rw-r--r--src/util/sss_krb5.c12
-rw-r--r--src/util/sss_krb5.h7
2 files changed, 19 insertions, 0 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index cce8d9021..0a80f23a8 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -963,3 +963,15 @@ sss_krb5_residual_check_type(const char *full_location,
return sss_krb5_residual_by_type(full_location, type);
}
+
+void
+sss_child_krb5_trace_cb(krb5_context context,
+ const struct krb5_trace_info *info, void *data)
+{
+ if (info == NULL) {
+ /* Null info means destroy the callback data. */
+ return;
+ }
+
+ DEBUG(SSSDBG_TRACE_ALL, ("%s\n", info->message));
+}
diff --git a/src/util/sss_krb5.h b/src/util/sss_krb5.h
index 15dd1e6a6..708914c6c 100644
--- a/src/util/sss_krb5.h
+++ b/src/util/sss_krb5.h
@@ -34,6 +34,9 @@
#include "util/util.h"
+#define KRB5_CHILD_LOG_FILE "krb5_child"
+#define LDAP_CHILD_LOG_FILE "ldap_child"
+
/* MIT Kerberos has the same hardcoded warning interval of 7 days. Due to the
* fact that using the expiration time of a Kerberos password with LDAP
* authentication is presumably a rare case a separate config option is not
@@ -164,4 +167,8 @@ typedef krb5_ticket_times sss_krb5_ticket_times;
typedef krb5_times sss_krb5_ticket_times;
#endif
+void
+sss_child_krb5_trace_cb(krb5_context context,
+ const struct krb5_trace_info *info, void *data);
+
#endif /* __SSS_KRB5_H__ */