[Date Prev][Date Next] [Chronological] [Thread] [Top]

OpenLDAP and Sendmail 8.10



Hi There

Has anyone used sendmail 8.10 + OpenLDAP 1.2.7 with success?

I've compiled sendmail with -DLDAPMAP on Solaris7 

Added the following two lines to sendmail.cf

O LDAPDefaultSpec= -h"ldap1.myorg.dk" -b"o=myorg,c=dk"
O AliasFile=ldap:-1 -k"uid=%s" -v"forward"

..it works..until sendmail tries to get the second attr of the result.

Debug follows:

ber_get_next: tag 0x30 len 61 contents:
ber_dump: buf 0x96640, ptr 0x96640, end 0x9667d
          current len 61, contents:
        02 01 02  c  8 04 0a  o  =  r  u  c  ,  c  =  d
         k 0a 01 02 0a 01 00 02 01 00 02 01 00 01 01 00
        a3 0e 04 03  u  i  d 04 07  t  h  e  l  m  e  r
         0 0b 04 09  "  f  o  r  w  a  r  d  " 
ber_flush: 32 bytes to sd 5
         0 1e 02 01 02  d 19 04 15  c  n  =  t  h  e  l
         m  e  r  ,  o  =  r  u  c  ,  c  =  d  k  0 00
        (end) HERE SHOULD COME MORE...

There's a note in sendmail's map.c about a bug/feature in openldap libs

	**  We check errno != LDAP_DECODING_ERROR since
	**  OpenLDAP 1.X has a very ugly *undocumented*
	**  hack of returning this error code from
	**  ldap_next_attribute() if the library freed the
	**  ber attribute.  See:
	**  http://www.openldap.org/lists/openldap-devel/9901/msg00064.html
	*/


Regards, Tom

-- 
Tom Helmer Jensen, System Manager, Computer Science
Roskilde University. Building 42.1, P.O. BOX 260, DK-4000 Denmark
WWW: http://www.dat.ruc.dk/~thelmer   E-mail: mailto://thelmer@ruc.dk
Voice: +45 4674 3829   Fax: +45 4674 3072  Private: +45 3876 1506