From: Jeremy Harris Date: Mon, 19 Aug 2024 14:01:56 +0000 (+0100) Subject: Fix ldapauth X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/221f7d1e232ed26b674325adcfd3e30e3e2cf857 Fix ldapauth Broken-by: 419d8549aad9 --- diff --git a/src/src/expand.c b/src/src/expand.c index d7b55831f..e17c21788 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -2807,7 +2807,7 @@ switch(cond_type = identify_operator(&s, &opname)) int stype = search_findtype(US"ldapauth", 8), expand_setup = -1; void * handle = search_open(NULL, stype, 0, NULL, NULL); if (handle) - rc= search_find(handle, NULL, sub[0], + rc = search_find(handle, NULL, sub[0], -1, NULL, 0, 0, &expand_setup, NULL) ? OK : f.search_find_defer ? DEFER : FAIL; else diff --git a/src/src/lookups/ldap.c b/src/src/lookups/ldap.c index 8a142398e..bf1e63325 100644 --- a/src/src/lookups/ldap.c +++ b/src/src/lookups/ldap.c @@ -117,7 +117,7 @@ Arguments: search_type SEARCH_LDAP_MULTIPLE allows values from multiple entries SEARCH_LDAP_SINGLE allows values from one entry only SEARCH_LDAP_DN gets the DN from one entry - res set to point at the result (not used for ldapauth) + res set to point at the result (ldapauth gets an empty string if OK) errmsg set to point a message if result is not OK defer_break set TRUE if no more servers to be tried after a DEFER user user name for authentication, or NULL @@ -611,6 +611,7 @@ if ( !lcp->bound if (search_type == SEARCH_LDAP_AUTH) { DEBUG(D_lookup) debug_printf_indent("Bind succeeded: ldapauth returns OK\n"); + *res = US""; goto RETURN_OK; } @@ -1614,7 +1615,7 @@ static lookup_info ldapauth_lookup_info = { .find = eldapauth_find, /* find function */ .close = NULL, /* no close function */ .tidy = eldap_tidy, /* sic */ /* tidy function */ - .quote = eldap_quote, /* sic */ /* quoting function */ + .quote = NULL, /* NO quoting function */ .version_report = NULL /* no version reporting (redundant) */ };