summaryrefslogtreecommitdiff
path: root/news/nntpcache/files/patch-src-authinfo_ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'news/nntpcache/files/patch-src-authinfo_ldap.c')
-rw-r--r--news/nntpcache/files/patch-src-authinfo_ldap.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/news/nntpcache/files/patch-src-authinfo_ldap.c b/news/nntpcache/files/patch-src-authinfo_ldap.c
new file mode 100644
index 000000000000..99b4a551cfd1
--- /dev/null
+++ b/news/nntpcache/files/patch-src-authinfo_ldap.c
@@ -0,0 +1,19 @@
+--- src/authinfo_ldap.c.orig Sat Dec 18 12:08:30 1999
++++ src/authinfo_ldap.c Wed Sep 26 10:55:27 2001
+@@ -78,7 +78,16 @@
+
+ lderr = ldap_bind_s(ld, dnbuf, pass, LDAP_AUTH_SIMPLE);
+ if (lderr != LDAP_SUCCESS && lderr != LDAP_INVALID_CREDENTIALS && lderr != LDAP_INAPPROPRIATE_AUTH)
++#if LDAP_API_VERSION >= 2004
++ {
++ int ld_errno = 0;
++ ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
++ logen(("LDAP ERROR: ldap user bind failed (%d): %s", lderr, ldap_err2string(ld_errno)));
++ }
++#else
++
+ logen(("LDAP ERROR: ldap user bind failed (%d): %s", lderr, ldap_err2string(GET_LDERROR(ld))));
++#endif
+ ldap_unbind(ld);
+ memset(pass, strlen(pass), 0);
+ if (lderr == LDAP_SUCCESS) {