On Thu, Sep 26, 2002 at 03:51:38PM +0300, Mike Jackson wrote: > Claudio Jeker ([EMAIL PROTECTED]) wrote: > > > > > > OpenLDAP 1.x libs only speak LDAPv2 protocol - no need for > > > ldap_set_option() > > > > > > > It also has no ldap_set_option() symbol defined. > > Correct. >
So your commited patch would not compile under OpenLDAP 1.x which is still in use by some admins. > > > > According to the RFC 2251 section 4.2, applications today should first > > > attempt to do an LDAPv3 connect and if unsuccessful, then they should close > > > the connection and do an LDAPv2 connect. > > > > > > > This is was your code does. Does anybody know if there is a ldap-sdk that > > tries to connect using LDAPv1 protocol or needs an explicit call to > > ldap_set_option() to get a correct connection? Netscape / Sun ? > > The current Netscape/Sun ONE C LDAP SDK uses the same ldap_set_option() > calls as does OpenLDAP 2.x libs. LDAPv1 protocol never existed as an > RFC. I have never seen anything related to LDAPv1. I think you are still > confused about this protocol versioning versus software versioning. > I just remembered that the old ldap_set_option() was added by Andre because of Netscape LDAP SDK, so I was not sure if it was neccesairy in Netscapes LDAP SDK to force LDAPv2 or the connection would be something else that does not work. > > > > > The error is not an error and so the qldap_errno is overridden by the next > > error. Therfor I think it is impossible to get the LDAP_VERSION_ERROR. > > We will see... > > > > The point is to differentiate between an error message of anything else > and a response that you attempted to connect with LDAPv3 to a server > that only speaks LDAPv2, so that the code will either exit or continue > to attempt connecting with a lower protocol version. > My problem is that the LDAP_VERSION_ERROR is hidden by the next failing attempt. So you never get / see this error in qmail-ldap. -- :wq Claudio
