Re: LDAP v3 bind
"Eric Sandall" <[email protected]>
| Newsgroups | gmane.network.directoryadmin |
|---|---|
| Message-ID | <[email protected]> |
Guido Trotter said: > On Mon, Jun 23, 2003 at 04:59:22PM -0500, Manuel Amador (Rudd-O) wrote: > > Hi, > >> There might be a bug in the feature, but since the V3 code was shipped >> in a >> patch, and I don't have V3 LDAP servers to test against, that might be >> understandable (although not acceptable for a production release, >> right?). >> > > Openldap 2.1 by default disallows v2 connections. But Openldap 2.0 > supports > bind in v3 mode, and can block v2 ones simply adding > > disallow bind_v2 > > to the config file. So this can be tested with any recent Openldap server. > >> Can someone help me track the thing and fix it? that would be function >> connection_profile_connect in the file profile.c. >> > > I've investigated into it. The problem was that ldap_set_option should be > called *before* actually doing any bind to the server, otherwise the > protocol version doesn't affect the previous bind, which, if the server > don't support LDAPv2, fails and returns "Protocol Error". > > So I've patched the code simply moving the option selection before the > actual bind, tried with a server that disallows LDAPv2, and it worked. > I attach the patch to this mail, hoping you'll include it. > > Bye, > > Guido Thanks for the patch Guido, I've applied it to the SMGL package for diradmin (and updated to v1.5.1) and I no longer have to allow v2 binds in /etc/openldap/slapd.conf. :) Hopefully this makes it into the next release. On another note, Is there any further news on fixing the "Object class violation" when adding new users? -sandalle -- PGP Key Fingerprint: FCFF 26A1 BE21 08F4 BB91 FAED 1D7B 7D74 A8EF DD61 http://search.keyserver.net:11371/pks/lookup?op=get&search=0xA8EFDD61 Eric Sandall | Source Mage GNU/Linux Developer [email protected] | http://www.sourcemage.org/ http://eric.sandall.us/ | SysAdmin @ Inst. Shock Physics @ WSU http://counter.li.org/ #196285 | http://www.shock.wsu.edu/ ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php