#ifndef _KDB_LDAP_H
#define _KDB_LDAP_H 1
+/* We want the interfaces marked "deprecated" in OpenLDAP. */
+#define LDAP_DEPRECATED 1
#include <ldap.h>
+
+/* Check for acceptable versions. */
+#if defined(LDAP_API_FEATURE_X_OPENLDAP)
+# if LDAP_VENDOR_VERSION < 20224
+# error This code triggers bugs in old OpenLDAP implementations. Please update to 2.2.24 or later.
+# endif
+#endif
+
#include <k5-thread.h>
#include <kdb5.h>
#include "k5-int.h"
krb5_ldap_db_get_age(krb5_context, char *, time_t *);
krb5_error_code
-krb5_ldap_lib_init();
+krb5_ldap_lib_init(void);
krb5_error_code
krb5_ldap_lib_cleanup(void);
int
has_sasl_external_mech(krb5_context, char *);
+krb5_error_code
+krb5_get_policydn(krb5_context, krb5_db_entry *, char **);
+
/* DAL functions */
krb5_error_code
krb5_error_code
krb5_ldap_free_supported_realms( krb5_context, char ** );
-krb5_error_code
+const char *
krb5_ldap_errcode_2_string( krb5_context, long );
#endif
#include "ldap_misc.h"
#include "ldap_err.h"
+#ifdef NEED_STRPTIME_PROTO
+extern char *strptime (const char *, const char *, struct tm *);
+#endif
+
/*
* This function reads the parameters from the krb5.conf file. The parameters read here are
* DAL-LDAP specific attributes. Some of these are ldap_port, ldap_server ....
return status;
}
-krb5_error_code
+const char *
krb5_ldap_errcode_2_string(krb5_context kcontext, long err_code)
{
- krb5_error_code status = KRB5_PLUGIN_OP_NOTSUPP;
- krb5_set_error_message(kcontext, status, "LDAP %s", error_message(status));
- return status;
+ return error_message(err_code);
}