From: Michael <mi...@st...> - 2000-10-07 15:09:33
|
David Leonard wrote: > > On Thu, 5 Oct 2000, Michael Ströder typed thusly: > > > > Ok, I edited Modules/LDAPObject.c to use only 2 arguments. The > > really, configure.in should be modified to test for and pick that up... Uuuh, I removed config.cache. After that configure was able to determine the right value for LDAP_SET_REBIND_PROC_3ARGS. > > > ldap.LDAPError: unknown error (C API does not expose error) > > I just looked at netscape's docs and found the function ldap_get_lderrno(). > i've added it in (untested patch at end of message) This patch seems to work now. > > It's me again. ;-) > > talking to yourself is a sign of impending madness :) We're all kinda mad, aren't we. ;-) > > I managed to connect to a OpenLDAP 2.0.6 server (which is LDAPv3). > > Connecting to OpenLDAP 1.2.11 server (LDAPv2) does not work. I was able to connect to both OpenLDAP versions now. Unfortunately it does "do_bind: v2 anonymous bind" to the OpenLDAP 2 server. But I would like to have a v3 bind. > > ldap_obj.options = 0 > > NameError: cannot set that field > > hmm, perhaps this is a design error. if the C API doesn't support things > like options, then there will be no .options attribute to set. I had > originally imagined people writing code like: > > if hasattr(ldap_obj, 'options'): ldap_obj.options = 0 I'm fine with doing a hasattr(ldap_obj, 'options'). But I want to avoid that the LDAP lib itself chases the referral. How to do that with Netscape's SDK? > however at this level (_ldap), I really wanted to get as close to the > C api as possible, and leave it to "higher-level" abstractions to deal with > such nitty gritty logic. That's ok. > > I would like to actively catch LDAPv3 referrals. > > suggested patches are welcome :) I'm not a C programmer. :-( If 1. I can set .options or a similar field with Netscape's SDK to switch off OPT_REFERRALS and 2. I can do a LDAPv3 bind I would be quite happy. Ciao, Michael. |