From: Philip Hazel Date: Tue, 19 Dec 2006 14:51:34 +0000 (+0000) Subject: Robert Bannocks' patch for an LDAP problem on Solaris LDAP. X-Git-Tag: exim-4_64~3 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/21eb6e72d6d616a6430e1346e085b7cc74298f88?hp=922e1c28fd6e43dce9a91523742563756339413c Robert Bannocks' patch for an LDAP problem on Solaris LDAP. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index c9b69ab37..1a8a1af5d 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.445 2006/12/19 14:38:38 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.446 2006/12/19 14:51:34 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -354,6 +354,9 @@ PH/52 Applied John Jetmore's patch to allow tls-on-connect and STARTTLS to be PH/53 Added missing "#include " to pcre/pcretest.c (this was a PCRE bug, fixed in subsequent PCRE releases). +PH/54 Applied Robert Bannocks' patch to avoid a problem with references that + arises when using the Solaris LDAP libraries (but not with OpenLDAP). + Exim version 4.63 ----------------- diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS index 2f8f5acb0..08440283a 100644 --- a/src/ACKNOWLEDGMENTS +++ b/src/ACKNOWLEDGMENTS @@ -1,4 +1,4 @@ -$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.66 2006/12/12 15:47:39 ph10 Exp $ +$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.67 2006/12/19 14:51:34 ph10 Exp $ EXIM ACKNOWLEDGEMENTS @@ -20,7 +20,7 @@ relatively small patches. Philip Hazel Lists created: 20 November 2002 -Last updated: 12 December 2006 +Last updated: 19 December 2006 THE OLD LIST @@ -68,6 +68,7 @@ Alexander Alekseev Use of function attribute checks in gcc Justo Alonso Suggested patch for maildir++ maildirsize file support Anton Altaparmakov Patches to get cyrus_sasl fully working Claus Assmann Example code for OpenSSL CRL support +Robert Bannocks Patch for LDAP reference problem on Solaris Ian Bell Analysis of a bug and an infelicity in clock tick code Patch for ${quote_local_part Peter Benie A number mistakes found by analysing the code diff --git a/src/src/lookups/ldap.c b/src/src/lookups/ldap.c index 55761977c..b0a4cc2e9 100644 --- a/src/src/lookups/ldap.c +++ b/src/src/lookups/ldap.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/lookups/ldap.c,v 1.12 2006/07/17 09:18:09 ph10 Exp $ */ +/* $Cambridge: exim/src/src/lookups/ldap.c,v 1.13 2006/12/19 14:51:34 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -853,18 +853,27 @@ We need to parse the message to find out exactly what's happened. */ (1) If we get LDAP_SIZELIMIT_EXCEEDED, just carry on, to return the truncated result list. - (2) The range of errors defined by LDAP_NAME_ERROR generally mean "that + (2) If we get LDAP_RES_SEARCH_REFERENCE, also just carry on. This was a + submitted patch that is reported to "do the right thing" with Solaris + LDAP libraries. (The problem it addresses apparently does not occur with + Open LDAP.) + + (3) The range of errors defined by LDAP_NAME_ERROR generally mean "that object does not, or cannot, exist in the database". For those cases we fail the lookup. - (3) All other non-successes here are treated as some kind of problem with + (4) All other non-successes here are treated as some kind of problem with the lookup, so return DEFER (which is the default in error_yield). */ DEBUG(D_lookup) debug_printf("ldap_parse_result yielded %d: %s\n", rc, ldap_err2string(rc)); -if (rc != LDAP_SUCCESS && rc != LDAP_SIZELIMIT_EXCEEDED) +if (rc != LDAP_SUCCESS && rc != LDAP_SIZELIMIT_EXCEEDED + #ifdef LDAP_RES_SEARCH_REFERENCE + && rc != LDAP_RES_SEARCH_REFERENCE + #endif + ) { *errmsg = string_sprintf("LDAP search failed - error %d: %s%s%s%s%s", rc,