[EXIM] Exim + Netscape LDAP 3 > Has anyone attempted to run …

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Stuart Lynne
Datum:  
To: exim-users
Betreff: [EXIM] Exim + Netscape LDAP 3 > Has anyone attempted to run exim linked against the Netscape v3 LDAP SDK ?
> I still have to get my hands on a copy, but reading through the manual and
> archive, all references seem to be to UMich. Granted, Netscape should be
> the same since it's the same two authors who used to be at UMich, but I
> figured i'd put out a feeler and see what comes up overnight.


Attached is patch to let the ldap driver link against Netscape. It's
tested with the Netscape LDAP SDK that is available in source. I don't
know if it will work (but it should) with their binary LDAP SDK libraries.

-- 
Stuart Lynne <sl@???>      604-916-4741      <http://www.poste.com>
PGP Fingerprint: 28 E2 A0 15 99 62 9A 00  88 EC A3 EE 2D 1C 15 68

Index: ldap.c
===================================================================
RCS file: /home/cvs/repository/local/exim/src/lookups/ldap.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.4.2.1
diff -r1.1.1.4 -r1.1.1.4.2.1
66,67c66
< perform_ldap_search(void *handle, char *ldap_url, BOOL single, BOOL newline_sep, char **res,
< char **errmsg)
---
> perform_ldap_search(void *handle, char *ldap_url, BOOL single, BOOL newline_sep, char **res, char **errmsg)

85a85,86
> char *matched;
> char *error;

93,94c94
<   *errmsg = string_sprintf("ldap_is_ldap_url: not an LDAP url \"%s\"\n",
<     ldap_url);
---

> *errmsg = string_sprintf("ldap_is_ldap_url: not an LDAP url \"%s\"\n", ldap_url);

104,105c104
<   *errmsg = string_sprintf("ldap_url_parse: (error %d) parsing \"%s\"\n", rc,
<     ldap_url);
---

> *errmsg = string_sprintf("ldap_url_parse: (error %d) parsing \"%s\"\n", rc, ldap_url);

140,141c139
<     *errmsg = string_sprintf("ldap_open: failed to initialise LDAP search: %s",
<       strerror(errno));
---

>     *errmsg = string_sprintf("ldap_open: failed to initialise LDAP search: %s", strerror(errno));

177,179c175,182
<   *errmsg = string_sprintf("ldap_url_search failed: %s",
<     ldap_err2string(lcp->ld->ld_errno));
<   DEBUG(9) debug_printf("open: %s\n", *errmsg);
---

> #if LDAP_OPT_SIZELIMIT    /* Netscape SDK */
>   (void)ldap_get_lderrno(lcp->ld, &matched, &error);
> #else
>   matched = ld->ld_matched;
>   error = lcp->ld->ld_error;
> #endif
>   *errmsg = string_sprintf("ldap_url_search failed: %s (%s)", error, matched);
>   DEBUG(9) debug_printf("open: %s %s\n", *matched, *errmsg);

190,191c193,200
<   *errmsg = string_sprintf("ldap_result: failed to yield any result: %s",
<     ldap_err2string(lcp->ld->ld_errno));
---

> #if LDAP_OPT_SIZELIMIT    /* Netscape SDK */
>   (void)ldap_get_lderrno(lcp->ld, &matched, &error);
> #else
>   matched = lcp->ld->ld_matched;
>   error = lcp->ld->ld_error;
> #endif
>   *errmsg = string_sprintf("ldap_url_search failed: %s (%s)", error, matched);

>