From 4a28fb10122bd74ba33607af46f028813de9161d Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 4 Mar 2011 22:17:55 +0100 Subject: Don't pass NULL to printf for TLS errors https://fedorahosted.org/sssd/ticket/643 --- src/util/sss_ldap.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/util/sss_ldap.h') diff --git a/src/util/sss_ldap.h b/src/util/sss_ldap.h index 14747dff..223f6ecd 100644 --- a/src/util/sss_ldap.h +++ b/src/util/sss_ldap.h @@ -22,6 +22,21 @@ #define __SSS_LDAP_H__ #include +#include + +#ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE +#define SDAP_DIAGNOSTIC_MESSAGE LDAP_OPT_DIAGNOSTIC_MESSAGE +#else +#ifdef LDAP_OPT_ERROR_STRING +#define SDAP_DIAGNOSTIC_MESSAGE LDAP_OPT_ERROR_STRING +#else +#error No extended diagnostic message available +#endif +#endif + +int sss_ldap_get_diagnostic_msg(TALLOC_CTX *mem_ctx, + LDAP *ld, + char **_errmsg); int sss_ldap_control_create(const char *oid, int iscritical, struct berval *value, int dupval, -- cgit