From: Jens V. <je...@di...> - 2001-06-15 15:29:59
|
hi guys, a couple days ago there were some posts indicating that python-ldap does indeed build against 2.0.11. i just tried building a python-ldap head CVS checkout against 2.0.11 and it stops with the well-known... <snip> checking for library containing ber_free... -llber checking for library containing ldap_open... no checking for ldap_open... no configure: error: Couldn't find LDAP library </snip> can anyone confirm what the status is vis-a-vis OpenLDAP 2.x (or just 2.0. 11)? the postings led me to believe that no extra patches were needed at this point. if they are, can someone point them out? :) jens |
From: Joe L. <jl...@op...> - 2001-06-15 15:37:33
|
well, the patches are now a part of my RPM at open-it.org (Thanks to Michael and Konstantin). I haven't been able to get an unpatched version to compile either. David has his own tree which he indicated does compile against 2.x, but I am unsure if/when that may be added to the main tree. Some people like to stick w. 1.x for stability and completeness, others just want 2.0. :) Separately, email me directly. I've been playing around with ZopeLDAP and jshell hasn't answered back. Maybe you can clue me in to the status of all things LDAP in regards to Zope. (I'm most interested in documentation of current ZClass integration, etc) On Friday, June 15, 2001, at 08:29 AM, Jens Vagelpohl wrote: > hi guys, > > a couple days ago there were some posts indicating that python-ldap > does indeed build against 2.0.11. > > i just tried building a python-ldap head CVS checkout against 2.0.11 > and it stops with the well-known... > > <snip> > checking for library containing ber_free... -llber > checking for library containing ldap_open... no > checking for ldap_open... no > configure: error: Couldn't find LDAP library > </snip> > > can anyone confirm what the status is vis-a-vis OpenLDAP 2.x (or just > 2.0. > 11)? the postings led me to believe that no extra patches were needed > at this point. if they are, can someone point them out? :) > > jens > > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > http://lists.sourceforge.net/lists/listinfo/python-ldap-dev > |
From: Jens V. <je...@di...> - 2001-06-15 15:52:47
|
joe, > well, the patches are now a part of my RPM at open-it.org (Thanks to > Michael and Konstantin). I haven't been able to get an unpatched version > to compile either. David has his own tree which he indicated does compile > against 2.x, but I am unsure if/when that may be added to the main tree. > Some people like to stick w. 1.x for stability and completeness, others > just want 2.0. :) unfortunately, RPM is of no help to me. i am trying to set it up so i can do development work on the Zope LDAPLoginAdapter and LDAPUserManager on my OS X-based powerbook while i'm abroad. i would need patches for the source, i already got OpenLDAP 2.0.11 running successfully. and no, this is not a combo i would use for "production", it's just so i can work away from my development servers ;) > Separately, email me directly. I've been playing around with ZopeLDAP and > jshell hasn't answered back. Maybe you can clue me in to the status of > all things LDAP in regards to Zope. (I'm most interested in documentation > of current ZClass integration, etc) ZopeLDAP development has pretty much ended. jeffrey hasn't worked on it in a while and us unwilling (and has no time) to continue it. if i had time i would consider keeping it alive, but at this point i really don't. there is a couple other LDAP products for zope that i know of: - LDAPLoginAdapter: my own product. active development, will be combined with the LDAPUserManager into a single LDAPUserFolder product at some point - LDAPUserManager: my own product. active development, will be combined with the LDAPLoginAdapter into a single LDAPUserFolder at some point - LDAPAdapter: ross lazarus' and soren roug's LDAP-based user folder. i think development has pretty much ended. i do not know about any ZClass integration. i personally do not use ZClasses at all, only file system-based python products. jens |
From: Daniel S. <da...@ma...> - 2001-06-16 00:16:36
|
On Fri, Jun 15, 2001 at 11:29:57AM -0400, Jens Vagelpohl wrote: > a couple days ago there were some posts indicating that python-ldap does > indeed build against 2.0.11. > > i just tried building a python-ldap head CVS checkout against 2.0.11 and > it stops with the well-known... > > <snip> > checking for library containing ber_free... -llber > checking for library containing ldap_open... no > checking for ldap_open... no > configure: error: Couldn't find LDAP library > </snip> When I first tried to compile python-ldap it behaved exactly like this. Actually I do have a workaround, but it is not anchored in the autoconf scripts, so you have to do it by hand. --- cut from the logs --- I startet vi on configure, skipped to line 1403 and replaced LIBS="$ac_func_search_save_LIBS" with LIBS="$ac_func_search_save_LIBS -lldap -lresolv" After rerunning configure and make everything worked as it should. --- cut --- This should do. libldap.so is after that recognized as "not needed", but do not worry about, because it still links correctly. bye, Daniel |
From: Joe L. <jl...@op...> - 2001-06-16 00:26:09
|
I answered this to Jens.. The problem is with the inclusion of ssl silently into MacOSX builds of OpenLDAP. He had to rebuild OpenLDAP --without-tls or to add -lssl to that lines. second, its not a shared library, so you need to have _ldapmodule.so build with the libraries as objects (full path to libldap.a etc) On Friday, June 15, 2001, at 05:16 PM, Daniel Schlenzig wrote: > On Fri, Jun 15, 2001 at 11:29:57AM -0400, Jens Vagelpohl wrote: > >> a couple days ago there were some posts indicating that python-ldap >> does >> indeed build against 2.0.11. >> >> i just tried building a python-ldap head CVS checkout against 2.0.11 >> and >> it stops with the well-known... >> >> <snip> >> checking for library containing ber_free... -llber >> checking for library containing ldap_open... no >> checking for ldap_open... no >> configure: error: Couldn't find LDAP library >> </snip> > When I first tried to compile python-ldap it behaved exactly like this. > Actually I do have a workaround, but it is not anchored in the autoconf > scripts, so you have to do it by hand. > > --- cut from the logs --- > > I startet vi on configure, skipped to line 1403 and replaced > > LIBS="$ac_func_search_save_LIBS" > > with > > LIBS="$ac_func_search_save_LIBS -lldap -lresolv" > > After rerunning configure and make everything worked as it should. > > --- cut --- > > This should do. libldap.so is after that recognized as "not needed", but > do not worry about, because it still links correctly. > > bye, Daniel > > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > http://lists.sourceforge.net/lists/listinfo/python-ldap-dev > |
From: David L. <dav...@cs...> - 2001-06-17 04:55:29
|
On Fri, 15 Jun 2001, Jens Vagelpohl typed thusly: > can anyone confirm what the status is vis-a-vis OpenLDAP 2.x (or just 2.0. > 11)? the postings led me to believe that no extra patches were needed at > this point. if they are, can someone point them out? :) python-ldap 1.10a3 won't work with OpenLDAP 2.x unless you apply those patches that you refer to. (is that right?) the current status of the development tree seems to be: * removing autoconf, in favour of python's distutils (which is weaker at detecting what is there but slightly more configurable and supposedly easier to build distributions with) * supporting OpenLDAP 2.* (but dropping support for earlier versions) d -- David Leonard Dav...@ds... DSTC Room:78-632 Ph:+61 7 336 58358 The University of Queensland http://www.dstc.edu.au/ QLD 4072 AUSTRALIA B73CD65FBEF4C089B79A8EBADF1A932F13EA0FC8 .signature: Invalid argument |
From: Michael <mi...@st...> - 2001-06-17 09:44:30
|
David Leonard wrote: > > the current status of the development tree seems to be: > * removing autoconf, in favour of python's distutils > (which is weaker at detecting what is there but slightly more > configurable and supposedly easier to build distributions with) > * supporting OpenLDAP 2.* (but dropping support for earlier > versions) I have to say that I'm feeling *very* unhappy about the current situation. I have absolutely no clue what to tell my users about how to install python-ldap. - There's no proper stable release since months although the CVS tree was pretty stable until a few weeks ago. I suggested to make a release before tinkering with the CVS version several times... - It's completely unclear what the status of the current CVS tree is. Who really knows? - There were no on-list announcements about changes to the CVS tree but maybe there were significant changes. Who knows? - People ask for building against OpenLDAP 2.0.x libs without having enough knowledge about the differences of the APIs. - Undocumented OpenLDAP 2.0.x-related patches are floating around which actually break existing python-ldap applications. I'd really prefer a stable version which builds against OpenLDAP 1.2.x, works rock-solid without memory leaks, do not core-dump and behaves as documented instead of OpenLDAP 2.0.x-patched version which break code and do not have any additional benefits. I'm seriously considering switching to another LDAP programming platform. Ciao, Michael. |
From: \(::\) B. I. <bo...@re...> - 2001-06-17 10:07:30
|
Quoting Michael Ströder <mi...@st...>: > David Leonard wrote: > > > > the current status of the development tree seems to be: > > * removing autoconf, in favour of python's distutils > > (which is weaker at detecting what is there but slightly > more > > configurable and supposedly easier to build distributions > with) > > * supporting OpenLDAP 2.* (but dropping support for earlier > > versions) > > I have to say that I'm feeling *very* unhappy about the current > situation. I have absolutely no clue what to tell my users about how > to install python-ldap. Are you paying for the development of python-ldap? Don't whine, it doesn't encourage people to give you stuff. I feel sorry for "your users". Anyways, dropping support for old APIs isn't a terrible idea, people don't change APIs because it's fun, they typically do it for a pretty good reason. > > - There's no proper stable release since months although the CVS > tree was pretty stable until a few weeks ago. I suggested to make a > release before tinkering with the CVS version several times... checkout an older version. what do you think cvs is for? > > - It's completely unclear what the status of the current CVS tree > is. Who really knows? I just managed to compile it and have it working with python 2.1 and openldap 2.0.x.. all I had to do was make a change in setup.py to make it use normal dicts instead. hasn't crashed yet (but i admit I've only been using it for like 10 hours, and never doing more than one search per connection). > > - There were no on-list announcements about changes to the CVS tree > but maybe there were significant changes. Who knows? > > - People ask for building against OpenLDAP 2.0.x libs without having > enough knowledge about the differences of the APIs. > > - Undocumented OpenLDAP 2.0.x-related patches are floating around > which actually break existing python-ldap applications. > > I'd really prefer a stable version which builds against OpenLDAP > 1.2.x, works rock-solid without memory leaks, do not core-dump and > behaves as documented instead of OpenLDAP 2.0.x-patched version > which break code and do not have any additional benefits. so checkout an older version that you recall working well and fix the bugs yourself.. create your own python-ldap branch > > I'm seriously considering switching to another LDAP programming > platform. so do it, perl has a decent and working interface last I used it. but be productive, whining is *not* productive. (::) bob |
From: David L. <dav...@cs...> - 2001-06-17 11:17:27
|
sorry, michael :( it just takes too much time to get all this stuff organised and done. for me its usually a bit of tinkering on weekends when i get some time. truthfully, i'm hoping for someone to step up and say "I'm doing all this good work that would fit well into python-ldap, I'm incorporating it, and have time and resources to do a comprehensive release. Give me commit access." (anyone?) in my situation, i don't seriously use ldap at all any more, which is a big problem since I still want to help keep things going. i can detect some talented and interested people on the list who may want to do the dedicated work on this - but I can't force them to.. that's how this open source game seems to work: it's pretty much supply-driven. > - It's completely unclear what the status of the current CVS tree > is. Who really knows? > - There were no on-list announcements about changes to the CVS tree > but maybe there were significant changes. Who knows? perhaps a read-only mailing list <python-ldap-cvs> that receives emails on commits? i've found that works pretty good. sf docs don't mention anything about how to do it simply though... i may as well commit everything I have in my tree now.. it seems to be working for openldap2.0.7 and python2.1.. i thought the current tree was stable, but if its not, then i'll put in what i have and think is. > - People ask for building against OpenLDAP 2.0.x libs without having > enough knowledge about the differences of the APIs. > - Undocumented OpenLDAP 2.0.x-related patches are floating around > which actually break existing python-ldap applications. > I'd really prefer a stable version which builds against OpenLDAP > 1.2.x, works rock-solid without memory leaks, do not core-dump and um, why is openldap 1.2.x support still needed? > behaves as documented instead of OpenLDAP 2.0.x-patched version > which break code and do not have any additional benefits. if you want to create a cvs branch of the last release and incorporate the various patches etc, and build releases on compile.sf, please feel free to do so. you can find some of my attempts and maybe some helpful notes in ~leonard/. d -- David Leonard Dav...@ds... DSTC Room:78-632 Ph:+61 7 336 58358 The University of Queensland http://www.dstc.edu.au/ QLD 4072 AUSTRALIA B73CD65FBEF4C089B79A8EBADF1A932F13EA0FC8 .signature: Invalid argument |
From: Michael <mi...@st...> - 2001-06-17 11:38:37
|
David Leonard wrote: > > perhaps a read-only mailing list <python-ldap-cvs> that receives > emails on commits? i've found that works pretty good. sf docs don't > mention anything about how to do it simply though... That's definitely a good idea! I'll try to find out in SF docs. Ciao, Michael. |
From: David L. <dav...@cs...> - 2001-06-17 11:45:53
|
On Sun, 17 Jun 2001, Michael Str=F6der typed thusly: > > perhaps a read-only mailing list <python-ldap-cvs> that receives > > emails on commits? i've found that works pretty good. sf docs don't > > mention anything about how to do it simply though... > > That's definitely a good idea! I'll try to find out in SF docs. well after looking one iota harder, i find section 6 of the sf docs that describes this :) <https://sourceforge.net/docman/display_doc.php?docid=3D772&group_id=3D= 1> d --=20 David Leonard Dav...@ds... DSTC Room:78-632 Ph:+61 7 336 58358 The University of Queensland http://www.dstc.edu.au/ QLD 4072 AUSTRALIA B73CD65FBEF4C089B79A8EBADF1A932F13E= A0FC8 =2Esignature: Invalid argument |
From: Rich S. <rs...@zo...> - 2001-06-17 13:31:28
|
> truthfully, i'm hoping for someone to step up and say "I'm doing all > this good work that would fit well into python-ldap, I'm incorporating it, > and have time and resources to do a comprehensive release. Give me commit > access." (anyone?) C'mon Michael -- go for it. |
From: Jens V. <je...@di...> - 2001-06-17 13:33:34
|
> perhaps a read-only mailing list <python-ldap-cvs> that receives > emails on commits? i've found that works pretty good. sf docs don't > mention anything about how to do it simply though... > we have a setup here at digital creations which handles emailing people after commits. it's just a couple python scripts. i've used it to do the same to my own CVS machine at home. if bad comes to worse and there is direct access to the repository i'd be glad to put it in. jens |
From: Michael <mi...@st...> - 2001-06-17 13:42:37
|
Jens Vagelpohl wrote: > > we have a setup here at digital creations which handles emailing people > after commits. David set it up and it seems to work: http://lists.sourceforge.net/lists/listinfo/python-ldap-commits Ciao, Michael. |
From: David L. <dav...@cs...> - 2001-06-17 13:43:57
|
Announcing a new mailing list on which CVS commits get announced. I just committed some stuff and it seems to work fine. http://lists.sourceforge.net/lists/listinfo/python-ldap-commits or send 'help' to the email interface at: pyt...@li... I'm using syncmail as recommended by the sf docs. But I'll probably switch to log_accum (buy David Hampton et al) since it's output is easier to read. d PS If you want to look at how this is done, check out our CVSROOT module, and look at these files: loginfo syncmail checkoutlist -- David Leonard Dav...@ds... DSTC Room:78-632 Ph:+61 7 336 58358 The University of Queensland http://www.dstc.edu.au/ QLD 4072 AUSTRALIA B73CD65FBEF4C089B79A8EBADF1A932F13EA0FC8 .signature: Invalid argument |
From: Konstantin C. <Kon...@da...> - 2001-07-09 13:51:00
|
Hi All, Sorry, I've been doing completely different things last few months. I could read the mailings from the list, but couldn't react. I re-started my work on python-ldap patches in June, just few days before I went on holiday... Now I'm back. I seem to have missed some changes in python-ldap that made it incompatible with OpenLDAPv1. I'm not quite sure about it. Am I right? My patches (made against about a half year old CVSed python-ldap and CVSed between v2.0.6 and 2.0.7 OpenLDAPv2) are not included into the current python-ldap CVS, so I know it's not them that broke OpenLDAPv1 compatibility in CVS. If the patches do break compatibily when applied on their own, then well, blame myself for it, not python-ldap developers :-) Michael Ströder wrote: > David Leonard wrote: > > > > the current status of the development tree seems to be: > > * supporting OpenLDAP 2.* (but dropping support for earlier > > versions) > Is it possible to keep support for both branches of OpenLDAP? I understand Michael's concern about it. OpenLDAPv1 is still well developed version, it is used by many people who don't need v2 functionality. > > I have to say that I'm feeling *very* unhappy about the current > situation. I have absolutely no clue what to tell my users about how > to install python-ldap. > > - There's no proper stable release since months although the CVS > tree was pretty stable until a few weeks ago. I suggested to make a > release before tinkering with the CVS version several times... > > - Undocumented OpenLDAP 2.0.x-related patches are floating around > which actually break existing python-ldap applications. > I remember, one day I asked people if we could put the patches to CVS. I still don't see any harm if we had _partial_ OpenLDAPv2 support in the main branch, provided it doesn't break anything else. Partial, because there are some API differences, so often you just can't use same functions for same operations in OpenLDAPv1 and v2 cases (of course I mean the C API, but the current python-ldap implementation generally inherits it). We could even try to stick with a single python-ldap API, no matter whether it's build with OpenLDAPv1 or v2. But in this case the current python-ldap API should be changed. The examples are ldap_set_rebind_proc and SSL/TLS-related calls. But, in my area of interest (LDAPv3 referrals) API differences between OpenLDAPv1 and v2 are hidden from a python-ldap user. > > I'd really prefer a stable version which builds against OpenLDAP > 1.2.x, works rock-solid without memory leaks, do not core-dump and > behaves as documented instead of OpenLDAP 2.0.x-patched version > which break code and do not have any additional benefits. > Michael, if you are talking about my patches, I'd like to help. I made fresh versions of them (built against the latest CVS version of python-ldap and OpenLDAP-2.0.11. I tested them with the recent version of web2ldap. Referrals work like a charm! I haven't tested the patches against OpenLDAPv1, but I believe they shouldn't pose any problems. If anybody is interested to check them, I can post them to the mailing list. Regards, Konstantin. -- * * Konstantin Chuguev - Application Engineer * * Francis House, 112 Hills Road * Cambridge CB2 1PQ, United Kingdom D A N T E WWW: http://www.dante.net |
From: Michael <mi...@st...> - 2001-07-09 15:04:32
|
Konstantin, nice to see you're back on list. Konstantin Chuguev wrote: > > I seem to have missed some changes in python-ldap that made it > incompatible with OpenLDAPv1. Sorry, my fault probably related to a system upgrade. IMHO SuSE changed something with the libs they're shipping and I had to explicitly use -lresolv to solve my local build problem. See http://python-ldap.sourceforge.net/faq.shtml, item 5. David was working to incorporate your patches but did not commit anything so far. The diffs based on your work he sent me does not seem to work with recent OpenLDAP 2.0.11. It seems to me that the OpenLDAP 2 API is still subject to minor changes (e.g. ldap_set_rebind_proc()). Unfortunately David is not available to work on this stuff for the next months. Ciao, Michael. |
From: Konstantin C. <Kon...@da...> - 2001-07-10 09:00:12
|
Hi Michael, Michael Ströder wrote: > David was working to incorporate your patches but did not commit > anything so far. The diffs based on your work he sent me does not > seem to work with recent OpenLDAP 2.0.11. It seems to me that the Yes, OpenLDAP-2.0.11 and especially recent changes in python-ldap CVS repository require a new version of patches. I've attached them. The patches don't change the behaviour of python-ldap when compiled against OpenLDAPv1, but create an alternative code when used with OpenLDAPv2. Here are the differences between python-ldap compiled against OpenLDAPv1 and v2 using the patches (seen from the point of view of a programmer using python-ldap): * new constants added for v2 (see constants.c.patch); * new errors/exceptions added for v2 (see errors.c.patch); * a set of LDAP session attributes changed: o only in v1: lberoptions (rw), refhoplimit (rw), options (rw), valid (ro); o only in v2: version (rw), referrals (rw), restart (rw); o in both versions: deref (rw), timelimit (rw), sizelimit (rw), errno (ro), error (ro), matched (ro). * new type of data added to the Python dictionary returned as a result of ldap_result: Dictionary keys are DNs, values are entry objects. If the key is empty, the value is the list of referrals (URL text strings). > > OpenLDAP 2 API is still subject to minor changes (e.g. > ldap_set_rebind_proc()). Unfortunately David is not available to I haven't touched set_rebind_proc in python-ldap yet, because that would change its API. At the moment you'll get a compile time warning and possible crash if you use rebind_proc with python-ldap + OpenLDAPv2. It is impossible to use the v1 set_rebind_proc syntax in v2. It is theoretically possible to use the OpenLDAPv2 syntax of the function with the OpenLDAPv1 library, using an internal conversion function. It would require some programming and (needs your approval) a change to the python-ldap API. Suggestions? Regards, Konstantin. -- * * Konstantin Chuguev - Application Engineer * * Francis House, 112 Hills Road * Cambridge CB2 1PQ, United Kingdom D A N T E WWW: http://www.dante.net |
From: Konstantin C. <Kon...@da...> - 2001-07-10 15:46:39
|
Hi David, David Leonard wrote: > this is good - commit it I doubt I can do that: I'm not a python-ldap developer... :-) > > will the documentation need updating? > I'll prepare another patch for python-ldap/Doc/libldap.tex. Regards, Konstantin. > > d > > ----- Original Message ----- > From: "Konstantin Chuguev" <Kon...@da...> > To: <mi...@st...> > Cc: <pyt...@li...> > Sent: Tuesday, July 10, 2001 6:59 PM > Subject: Re: compiling against OpenLDAP 2.0.11 > > > Yes, OpenLDAP-2.0.11 and especially recent changes in python-ldap CVS > > repository require a new version of patches. I've attached them. > > The patches don't change the behaviour of python-ldap when compiled > > against OpenLDAPv1, but create an alternative code when used with > > OpenLDAPv2. Here are the differences between python-ldap compiled > > against OpenLDAPv1 and v2 using the patches (seen from the point of view > > of a programmer using python-ldap): > > > > * new constants added for v2 (see constants.c.patch); > > * new errors/exceptions added for v2 (see errors.c.patch); > > * a set of LDAP session attributes changed: > > o only in v1: lberoptions (rw), refhoplimit (rw), options (rw), > > valid (ro); > > o only in v2: version (rw), referrals (rw), restart (rw); > > o in both versions: deref (rw), timelimit (rw), sizelimit (rw), > > errno (ro), error (ro), matched (ro). > > * new type of data added to the Python dictionary returned as a > > result of ldap_result: > > Dictionary keys are DNs, values are entry objects. If the key is > > empty, the value is the list of referrals (URL text strings). -- * * Konstantin Chuguev - Application Engineer * * Francis House, 112 Hills Road * Cambridge CB2 1PQ, United Kingdom D A N T E WWW: http://www.dante.net |
From: Michael <mi...@st...> - 2001-07-10 19:34:12
|
Konstantin Chuguev wrote: > > David Leonard wrote: > > > this is good - commit it David, take care of your PhD-ing and please let me test Konstantin's patches first. ;-) > I doubt I can do that: I'm not a python-ldap developer... :-) Being a python-ldap developer can happen to come true faster than you think these days... ;-) Anyone did notice the forwarded warning message by Stig about possible memory leaks with OpenLDAP 2.0.x API? Please glance over it: http://www.geocrawler.com/archives/3/1568/2001/6/0/6036658/ > > will the documentation need updating? > > I'll prepare another patch for python-ldap/Doc/libldap.tex. Urrgs. I think I should at least publish a "python setup.py sdist" of recent snapshot to make a 1.11 distribution before the commits. Comments? Ciao, Michael. |
From: Steffen R. <ste...@sy...> - 2001-07-11 00:32:16
|
Michael Str=F6der <mi...@st...> writes: > Anyone did notice the forwarded warning message by Stig about > possible memory leaks with OpenLDAP 2.0.x API? > Please glance over it: > http://www.geocrawler.com/archives/3/1568/2001/6/0/6036658/ I looked through it. The first issue (ldap_first_attribute) has changed from OpenLDAP 1.2 to 2.0.x so that the memory is *never* freed by the library. In 1.1 it was freed, when the last attribute was read. However, the current python-ldap code did never free the memory. IOW, there is a possible memory leak in error cases. The second issue (ldap_get_dn) has *not* changed between OpenLDAP 1.2 and 2.0.x, i.e. the same kind of memory leak exists for both API versions. The attached patch should fix both issues. The last "ber_free()" should be surrounded by some #ifdef OPENLDAP_2_0_X conditional... I scanned through the documentation and did not notice any further changes in memory handling, but then again, I did not really look too hard. *** python-ldap-1.10alpha3/Modules/message.c Mon Aug 14 18:37:37 2000 --- python-ldap-openldap-2/Modules/message.c Mon Jul 2 10:55:30 2001 *************** *** 78,84 **** --- 78,86 ---- if (valuelist =3D=3D NULL) { Py_DECREF(attrdict); Py_DECREF(result); + ber_free(ber, 0); ldap_msgfree( m ); + ldap_memfree(attr); return NULL; } =20=20 *************** *** 95,101 **** --- 97,105 ---- Py_DECREF(result); Py_DECREF(valuestr); Py_DECREF(valuelist); + ber_free(ber, 0); ldap_msgfree( m ); + ldap_memfree(attr); return NULL; } Py_DECREF(valuestr); *************** *** 103,114 **** --- 107,121 ---- ldap_value_free_len(bvals); } Py_DECREF( valuelist ); + ldap_memfree(attr); } =20=20 entrytuple =3D Py_BuildValue("(sO)", dn, attrdict); + ldap_memfree(dn); Py_DECREF(attrdict); PyList_Append(result, entrytuple); Py_DECREF(entrytuple); + ber_free(ber, 0); } ldap_msgfree( m ); return result; /steffen --=20 ste...@sy... <> Gravity is a myth -- the Earth sucks! |
From: Konstantin C. <Kon...@da...> - 2001-07-12 09:31:59
|
Hi Steffen, Steffen Ries wrote: > Michael Ströder <mi...@st...> writes: > > > Anyone did notice the forwarded warning message by Stig about > > possible memory leaks with OpenLDAP 2.0.x API? > > Please glance over it: > > http://www.geocrawler.com/archives/3/1568/2001/6/0/6036658/ > > I looked through it. > > The first issue (ldap_first_attribute) has changed from OpenLDAP 1.2 > to 2.0.x so that the memory is *never* freed by the library. In 1.1 it > was freed, when the last attribute was read. However, the current > python-ldap code did never free the memory. IOW, there is a possible > memory leak in error cases. > > The second issue (ldap_get_dn) has *not* changed between OpenLDAP 1.2 > and 2.0.x, i.e. the same kind of memory leak exists for both API > versions. > If we are going to release the latest snapshot without OpenLDAPv2 support (which I think is a good idea), we would still like to eliminate any memory leaks :-) In that case, could you please update your patch to do The Right Thing (TM) for OpenLDAPv1 only? If you don't have enough time, I could do it myself. I'd just like to get a hint in this case: is it only message.c that needs to be patched? > > The attached patch should fix both issues. The last "ber_free()" > should be surrounded by some #ifdef OPENLDAP_2_0_X conditional... > > I scanned through the documentation and did not notice any further > changes in memory handling, but then again, I did not really look too > hard. > After that, I would add memory leak fixes to my OpenLDAPv2 patches. Regards, Konstantin. -- * * Konstantin Chuguev - Application Engineer * * Francis House, 112 Hills Road * Cambridge CB2 1PQ, United Kingdom D A N T E WWW: http://www.dante.net |
From: Konstantin C. <Kon...@da...> - 2001-07-13 10:32:29
|
Hi Michael, Michael Ströder wrote: > Konstantin, > > I've attached the latest patched message.c which hopefully contains > all fixes for the memory leaks in python-ldap. Hm, it's time to > check-in something to avoid all these patch mails... :-/ > Thanks for the file. I've just committed the memory leak fix for OpenLDAPv1 only, to avoid dealing with OpenLDAPv2 before we get a new release. After that, I'll start committing OpenLDAPv2 patches with memory leak fixes included. > > See also my inquiry about CVS tagging on the list. > Haven't received it yet. The new OpenLDAPv1-only version: should it be 1.10beta1 or 1.11? Regards, Konstantin. -- * * Konstantin Chuguev - Application Engineer * * Francis House, 112 Hills Road * Cambridge CB2 1PQ, United Kingdom D A N T E WWW: http://www.dante.net |
From: Michael <mi...@st...> - 2001-07-13 10:59:37
|
Konstantin Chuguev wrote: > = > I've just committed the memory leak fix for OpenLDAPv1 only, Great! > to avoid dealing with OpenLDAPv2 before we get a new release. > After that, I'll start committing OpenLDAPv2 patches with memory leak = > fixes included. Yepp. > > See also my inquiry about CVS tagging on the list. > = > Haven't received it yet. I already received it through the list. Attached it again below. > The new OpenLDAPv1-only version: should it be 1.10beta1 or 1.11? People were used to 1.10alpha3 as a release and refer to it as version 1.10. To avoid a mess the next release should be 1.11 as already set in CVS. Ciao, Michael. -------- Original Message -------- Subject: Tagging the CVS archive Date: Fri, 13 Jul 2001 02:11:01 +0200 From: Michael Str=F6der <mi...@st...> Reply-To: mi...@st... Organization: stroeder.com To: python-ldap-dev <pyt...@li...> HI! Could we find some meaningful set of tags to mark the python-ldap CVS archive? Maybe we can borrow some ideas from http://www.openldap.org/software/repo.html ? I'd like to check in the new OpenLDAP 2-related patches and memory leak fixes since I spent some time sending patch mails around. But before that I'd like to mark the current CVS version with PYTHONLDAP_REL_ENG_1_2 or something alike. Not being a CVS expert though... :-/ Ciao, Michael. _______________________________________________ Python-LDAP-dev mailing list Pyt...@li... http://lists.sourceforge.net/lists/listinfo/python-ldap-dev |
From: Konstantin C. <Kon...@da...> - 2001-07-12 09:22:27
|
Michael Ströder wrote: > David, take care of your PhD-ing and please let me test Konstantin's > patches first. ;-) > Agree, I'm also going to test them, although just in a few configurations... > > I'll prepare another patch for python-ldap/Doc/libldap.tex. > > Urrgs. I think I should at least publish a "python setup.py sdist" > of recent snapshot to make a 1.11 distribution before the commits. > Comments? > As I can see, the current version from CVS hasn't got new features for a long time, just bug fixes. So, it's a good candidate for a release. After that, we could add OpenLDAPv2 functionality to the currnet branch of the repository. Konstantin. -- * * Konstantin Chuguev - Application Engineer * * Francis House, 112 Hills Road * Cambridge CB2 1PQ, United Kingdom D A N T E WWW: http://www.dante.net |