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

RE: version of openldap server



Hello Michael,

Version <= 2.0.23 :
===================
  ld = ldap_init(theServer, pPortNumber);
  if ( !ld )
     return 1;

  if ( !(ld = ldap_open(theServer, pPortNumber)) ) // the ldap_search give
an error in OpenLDAP 2.1.X
     return 2;
  rc = ldap_simple_bind_s(ld, theLogon, thePassword);

Version  2.1.X :
================
  ld = ldap_init(theServer, pPortNumber);
  if ( !ld )
     return 1;

  rc = ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version);
  if ( rc != LDAP_OPT_SUCCESS )
     return false;
  rc = ldap_simple_bind_s(ld, theLogon, thePassword);

In other way, the version 2.1.X have the 'hasSubordinates' attributes
If I can test the version, I know if this attribute is available or not.

A+
Guy

> -----Original Message-----
> From: Michael Stroder [mailto:michael@stroeder.com]
> Sent: Friday, July 19, 2002 9:05 AM
> To: De Leeuw Guy
> Cc: openldap-software@OpenLDAP.org
> Subject: Re: version of openldap server
>
>
> De Leeuw Guy wrote:
> >>
> >>Most server implementors hide the vendor and version info in
> >>cn=monitor in proprietary attributes.
> >
> > I try this search whithout succes :(
> > 	ldapsearch  -x -LLL -b "" -s base "cn=monitor" * +
>
> Monitor backend is not available in OpenLDAP 2.0.x and has to be
> enabled when building OpenLDAP 2.1.x with
>
> ./configure --enable-monitor
>
> Which kind problems do you want to solve by reading the server
> version number?
>
> Ciao, Michael.
>