From jlittle at open-it.org Wed Jan 2 02:15:23 2002 From: jlittle at open-it.org (Joe Little) Date: Tue, 01 Jan 2002 17:15:23 -0800 Subject: TLS context In-Reply-To: <3BEFE464.977DBAD7@stroeder.com> Message-ID: On 11/12/01 7:01 AM, "Michael Str?der" wrote: > Jacek Konieczny wrote: >> >> eg.: >> >> ldap.set_option("tls_cacertfile","file") >> >> against: >> >> ldap.set_option(ldap.OPT_X_TLS_CACERTFILE,"file") > > I also vote for the 2nd option. > > Ciao, Michael. > > From michael at stroeder.com Wed Jan 2 02:31:57 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 02 Jan 2002 02:31:57 +0100 Subject: TLS context References: Message-ID: <3C32630D.303F0418@stroeder.com> Joe Little wrote: > > [..] was starting to get my python-ldap RPM back into shape. > Well, I see that configure is now gone in lieu of setup.py (distutils) in > the latest CVS version. Simple enough. However, doing a test "make" brought > up this TLS context stuff that I see came up a bit ago here. > Specifically, a make fails with "LDAP_OPT_X_TLS_CTX" undeclared in > Modules/constants.c (203). You probably have to upgrade your OpenLDAP 2 libs. (That's what I had to do.) > From the discussion, it would appear code must > first declare this, I think you have to define all the certificate-related stuff before you do a LDAP over SSL connect by calling ldap.initialize('ldaps://..') or before calling method start_tls_s() of an existing LDAPObject instance. I did not test it very well up to now. Ciao, Michael. From jlittle at open-it.org Wed Jan 2 02:49:16 2002 From: jlittle at open-it.org (Joe Little) Date: Tue, 01 Jan 2002 17:49:16 -0800 Subject: TLS context In-Reply-To: <3C32630D.303F0418@stroeder.com> Message-ID: Damnit.. your right. I did my build on a virgin redhat 7.2 box with included OpenLDAP 2.0.11 and not my version of the packages. Treats me right. a beta OpenLDAP 2.0.19 RPM sailed right through. Does anyone know where this is fixed so that I can log it? On 1/1/02 5:31 PM, "Michael Str?der" wrote: > Joe Little wrote: >> >> [..] was starting to get my python-ldap RPM back into shape. >> Well, I see that configure is now gone in lieu of setup.py (distutils) in >> the latest CVS version. Simple enough. However, doing a test "make" brought >> up this TLS context stuff that I see came up a bit ago here. >> Specifically, a make fails with "LDAP_OPT_X_TLS_CTX" undeclared in >> Modules/constants.c (203). > > You probably have to upgrade your OpenLDAP 2 libs. (That's what I > had to do.) > >> From the discussion, it would appear code must >> first declare this, > > I think you have to define all the certificate-related stuff before > you do a LDAP over SSL connect by calling > ldap.initialize('ldaps://..') or before calling method start_tls_s() > of an existing LDAPObject instance. > > I did not test it very well up to now. > > Ciao, Michael. > > From michael at stroeder.com Wed Jan 2 02:57:39 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 02 Jan 2002 02:57:39 +0100 Subject: TLS context References: Message-ID: <3C326913.AAFC7A4F@stroeder.com> Joe Little wrote: > > On 1/1/02 5:31 PM, "Michael Str?der" wrote: > > > You probably have to upgrade your OpenLDAP 2 libs. (That's what I > > had to do.) > > > Damnit.. your right. I did my build on a virgin redhat 7.2 box with included > OpenLDAP 2.0.11 and not my version of the packages. Treats me right. a beta > OpenLDAP 2.0.19 RPM sailed right through. Does anyone know where this is > fixed so that I can log it? Hmm, looking into the OpenLDAP libs directory: liblber.so.2.0.13 libldap.so.2.0.13 2.0.13?!? Ciao, Michael. From jlittle at open-it.org Wed Jan 2 03:41:13 2002 From: jlittle at open-it.org (Joe Little) Date: Tue, 01 Jan 2002 18:41:13 -0800 Subject: TLS context In-Reply-To: Message-ID: on the subject of python versions.. I dropped my added string, and will rely on RPM to do the right thing most of the time. This _could_ break for python2.2 users, but the naming just was getting too weird. Tell me if I should keep the version string in there. It actually had to be like "python-ldap-python2.1-cvs-1.i386.rpm" or -2.0.0pre1-1.i386.rpm... On 1/1/02 6:34 PM, "Joe Little" wrote: > Ok.. almost done here. > > first, another error. It looks like Lib/ldap.py is not found and a warning > is thrown. The generated files are handled differently by setup.py, and I > get a different file list. Also, a noticed a version string of > python-ldap-2.0.0pre1.. should I use this instead of naming it > "python-ldap-cvs-pythonv" where pythonv is the pythonv compiled with (I > demand at least 2.x, but people may be using 2.1 or 2.2, and site-packages > are different)??? > > Here is the file list (/usr/share/doc excepted): > > /usr/lib/python2.1/site-packages .... > > _ldap.so > ldapurl.py > ldif.py > ldap/__init__.py > ldap/async.py > ldap/functions.py > ldap/ldapobject.py > ldap/modlist.py > > There used to be an ldap.pth generated and other such, and it definitely > include an ldap.py before. It also does not pre-compile any .py file. This > is all changed behaviour so to speak with distutils. I cannot perform a > "install" since it will only generate onto the real directories and not an > alternative build root. Checking a real install, the only thing lacking is > the precompile of .py files, and I believe that is not necessary. > > Tell me if the above list of files is insufficient. > > On 1/1/02 5:57 PM, "Michael Str?der" wrote: > >> Joe Little wrote: >>> >>> On 1/1/02 5:31 PM, "Michael Str?der" wrote: >>> >>>> You probably have to upgrade your OpenLDAP 2 libs. (That's what I >>>> had to do.) >>>> >>> Damnit.. your right. I did my build on a virgin redhat 7.2 box with included >>> OpenLDAP 2.0.11 and not my version of the packages. Treats me right. a beta >>> OpenLDAP 2.0.19 RPM sailed right through. Does anyone know where this is >>> fixed so that I can log it? >> >> Hmm, looking into the OpenLDAP libs directory: >> >> liblber.so.2.0.13 >> libldap.so.2.0.13 >> >> 2.0.13?!? >> >> Ciao, Michael. >> >> From jlittle at open-it.org Wed Jan 2 03:34:38 2002 From: jlittle at open-it.org (Joe Little) Date: Tue, 01 Jan 2002 18:34:38 -0800 Subject: TLS context In-Reply-To: <3C326913.AAFC7A4F@stroeder.com> Message-ID: Ok.. almost done here. first, another error. It looks like Lib/ldap.py is not found and a warning is thrown. The generated files are handled differently by setup.py, and I get a different file list. Also, a noticed a version string of python-ldap-2.0.0pre1.. should I use this instead of naming it "python-ldap-cvs-pythonv" where pythonv is the pythonv compiled with (I demand at least 2.x, but people may be using 2.1 or 2.2, and site-packages are different)??? Here is the file list (/usr/share/doc excepted): /usr/lib/python2.1/site-packages .... _ldap.so ldapurl.py ldif.py ldap/__init__.py ldap/async.py ldap/functions.py ldap/ldapobject.py ldap/modlist.py There used to be an ldap.pth generated and other such, and it definitely include an ldap.py before. It also does not pre-compile any .py file. This is all changed behaviour so to speak with distutils. I cannot perform a "install" since it will only generate onto the real directories and not an alternative build root. Checking a real install, the only thing lacking is the precompile of .py files, and I believe that is not necessary. Tell me if the above list of files is insufficient. On 1/1/02 5:57 PM, "Michael Str?der" wrote: > Joe Little wrote: >> >> On 1/1/02 5:31 PM, "Michael Str?der" wrote: >> >>> You probably have to upgrade your OpenLDAP 2 libs. (That's what I >>> had to do.) >>> >> Damnit.. your right. I did my build on a virgin redhat 7.2 box with included >> OpenLDAP 2.0.11 and not my version of the packages. Treats me right. a beta >> OpenLDAP 2.0.19 RPM sailed right through. Does anyone know where this is >> fixed so that I can log it? > > Hmm, looking into the OpenLDAP libs directory: > > liblber.so.2.0.13 > libldap.so.2.0.13 > > 2.0.13?!? > > Ciao, Michael. > > From jlittle at ee.stanford.edu Wed Jan 2 03:48:54 2002 From: jlittle at ee.stanford.edu (Joe Little) Date: Tue, 01 Jan 2002 18:48:54 -0800 Subject: beta release of new CVS-built RPMS Message-ID: Ok.. in case people want to see where I'm at on this or want to use the cvs-build of python-ldap, I've placed a first release of my RPMs on www.open-it.org (files) as well as ftp.open-it.org in /pub/redhat7.2 They expect a RH7.2 system, as well as python 2.x (2.1 specifically). I've also placed a rebuild of redhat-rawhide OpenLDAP 2.0.19 RPMs there. SRPMS are heading up there now. Version names and content inside RPMs may change as I fix problems. Hope this is useful and brings new year cheer to the group :) From michael at stroeder.com Wed Jan 2 03:59:17 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 02 Jan 2002 03:59:17 +0100 Subject: TLS context References: Message-ID: <3C327785.FA6451F9@stroeder.com> Joe Little wrote: > > first, another error. It looks like Lib/ldap.py is not found and a warning > is thrown. Module ldap was turned in a module package. See Lib/ldap/. > The generated files are handled differently by setup.py, and I > get a different file list. Also, a noticed a version string of > python-ldap-2.0.0pre1.. should I use this instead of naming it > "python-ldap-cvs-pythonv" Use a timestamp until a (pre-)release is done. > Here is the file list (/usr/share/doc excepted): > > /usr/lib/python2.1/site-packages .... > > _ldap.so > ldapurl.py > ldif.py > ldap/__init__.py > ldap/async.py > ldap/functions.py > ldap/ldapobject.py > ldap/modlist.py Nothing wrong with that. > There used to be an ldap.pth generated Pre-DistUtils days, was never available on Win32 anyway. > and other such, and it definitely include an ldap.py before. See ldap/__init__.py. > It also does not pre-compile any .py file. Can I pass DistUtils an option to enable byte-compiling before packaging? > This is all changed behaviour so to speak with distutils. Was byte-compiling enabled in your RPM before? How? > I cannot perform a > "install" since it will only generate onto the real directories and not an > alternative build root. What's wrong with using python setup.py bdist_rpm ? BTW: It contains byte-compiled *.pyc files in my case (tested right now). > Checking a real install, the only thing lacking is > the precompile of .py files, and I believe that is not necessary. When installing from source distribution (packaged with python setup.py sdist) this will do the trick: $ python setup.py install -O1 $ python setup.py install -O2 You could also write a small post-install script using compileall.py. Ciao, Michael. From michael at stroeder.com Wed Jan 2 04:12:30 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 02 Jan 2002 04:12:30 +0100 Subject: Stripped LDAPObject.c References: <3C239EFA.6ADA087F@stroeder.com> <3C28A083.7D7A4FB7@stroeder.com> Message-ID: <3C327A9E.7B03FE05@stroeder.com> Michael Str?der wrote: > > Michael Str?der wrote: > > > > I've stripped all *_doc strings and almost all *_s() methods from > > LDAPObject.c. Also removed the deprecated Kerberos stuff completely. > > Since I now hopefully solved all the backwards compability issues > with ldapobject.py I'd like to check in the radically stripped > Modules/LDAPObject.c. > > Any objections against that? Hmm, no response so far. Please test the attached gzipped diff. Ciao, Michael. -------------- next part -------------- A non-text attachment was scrubbed... Name: stripped-C-wrapper.diff.gz Type: application/x-gzip Size: 8653 bytes Desc: not available URL: From jlittle at open-it.org Wed Jan 2 04:14:30 2002 From: jlittle at open-it.org (Joe Little) Date: Tue, 01 Jan 2002 19:14:30 -0800 Subject: TLS context In-Reply-To: <3C327785.FA6451F9@stroeder.com> Message-ID: ok.. answers below. On 1/1/02 6:59 PM, "Michael Str?der" wrote: > Joe Little wrote: >> >> first, another error. It looks like Lib/ldap.py is not found and a warning >> is thrown. > > Module ldap was turned in a module package. See Lib/ldap/. > >> The generated files are handled differently by setup.py, and I >> get a different file list. Also, a noticed a version string of >> python-ldap-2.0.0pre1.. should I use this instead of naming it >> "python-ldap-cvs-pythonv" > > Use a timestamp until a (pre-)release is done. > >> Here is the file list (/usr/share/doc excepted): >> >> /usr/lib/python2.1/site-packages .... >> >> _ldap.so >> ldapurl.py >> ldif.py >> ldap/__init__.py >> ldap/async.py >> ldap/functions.py >> ldap/ldapobject.py >> ldap/modlist.py > > Nothing wrong with that. > >> There used to be an ldap.pth generated > > Pre-DistUtils days, was never available on Win32 anyway. > >> and other such, and it definitely include an ldap.py before. > > See ldap/__init__.py. > >> It also does not pre-compile any .py file. > > Can I pass DistUtils an option to enable byte-compiling before > packaging? > Can't seem to find any >> This is all changed behaviour so to speak with distutils. > > Was byte-compiling enabled in your RPM before? How? I did a "make install" into a $DESTDIR (build root) --- make install did everything correctly in the GNU configure days. setup.py is a bit too smart :) > >> I cannot perform a >> "install" since it will only generate onto the real directories and not an >> alternative build root. > > What's wrong with using python setup.py bdist_rpm ? BTW: It contains > byte-compiled *.pyc files in my case (tested right now). > It fails for me since it finds python is 1.5 (which doesn't include distutils). Even changing the env to /usr/bin/python2 causes things to progress and then die out later when it goes into "Python-LDAP-2.0.0pre1" and runs setup.py again and can't import distutils (its running python1.5 again). There should be a way to handle this without env variables, since I want to be as deterministic as possible. Second, it looks like the current cvs snapshots enforce a 2.0.0pre1 version string. I'd need to diff away from that but then I couldn't use bdist_rpm (you can't use it within another RPM... :) ) >> Checking a real install, the only thing lacking is >> the precompile of .py files, and I believe that is not necessary. > > When installing from source distribution (packaged with python > setup.py sdist) this will do the trick: > $ python setup.py install -O1 > $ python setup.py install -O2 what do -01 and -02 do.. or is that O1 O2 (letter 'O')? Again, this sounds like it invokes actions on its discovered install dirs (/usr/lib instead of /var/tmp/%var/usr/lib). Please tell me I'm wrong :) > > You could also write a small post-install script using > compileall.py. > > Ciao, Michael. From michael at stroeder.com Wed Jan 2 04:29:03 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 02 Jan 2002 04:29:03 +0100 Subject: Building python-ldap RPMs (was: TLS context) References: Message-ID: <3C327E7F.AB3FDDB2@stroeder.com> Joe, better you test the current CVS version and my recently sent diffs. IMHO we can think about packaging later... Joe Little wrote: > > >> This is all changed behaviour so to speak with distutils. > > > > Was byte-compiling enabled in your RPM before? How? > > I did a "make install" into a $DESTDIR (build root) --- make install did > everything correctly in the GNU configure days. setup.py is a bit too smart > :) You should definitely avoid using make install. The Makefile was produced by David who cannot stay away from typing make. Buuuh! But as an OpenBSD hacker he does not spend much time with thinking about RPMs... ;-) > > What's wrong with using python setup.py bdist_rpm ? BTW: It contains > > byte-compiled *.pyc files in my case (tested right now). > > It fails for me since it finds python is 1.5 You simply have to type (assuming you used make altinstall when installing the Python 2.1 version): $ python2.1 setup.py bdist_rpm > (which doesn't include distutils) BTW: There are DistUtils for Python 1.5. > Second, it looks like the current > cvs snapshots enforce a 2.0.0pre1 version string. Well, this can be easily solved... > > When installing from source distribution (packaged with python > > setup.py sdist) this will do the trick: > > $ python setup.py install -O1 > > $ python setup.py install -O2 > > what do -01 and -02 do.. or is that O1 O2 (letter 'O')? -O1 -> *.pyc -O2 -> *.pyo > > You could also write a small post-install script using > > compileall.py. And how about this as post-install script? $ python2.1 /usr/lib/python2.1/compileall.py $ python2.1 -O /usr/lib/python2.1/compileall.py Ciao, Michael. From jlittle at open-it.org Wed Jan 2 04:49:53 2002 From: jlittle at open-it.org (Joe Little) Date: Tue, 01 Jan 2002 19:49:53 -0800 Subject: Building python-ldap RPMs (was: TLS context) In-Reply-To: <3C327E7F.AB3FDDB2@stroeder.com> Message-ID: Did you just do a new commit on CVS? the -O1 and -O2 both created .pyo files only.. no .pyc files (odd, that). Anywho.. I've generated release 2, which drops the .pyo files and does the post-install compile all, though it feels somewhat wrong since I may be affecting other things on the system. Furthermore, I don't get the free chksums on the .pyo and .pyc files.. Oh well, it definitely makes the build process easier. -2 is up there, and it does dump the compileall output to the screen. Once we move beyond the cvs phase, I'll /dev/null that output since it will make for ugly installations On 1/1/02 7:29 PM, "Michael Str?der" wrote: > Joe, > > better you test the current CVS version and my recently sent diffs. > IMHO we can think about packaging later... > > Joe Little wrote: >> >>>> This is all changed behaviour so to speak with distutils. >>> >>> Was byte-compiling enabled in your RPM before? How? >> >> I did a "make install" into a $DESTDIR (build root) --- make install did >> everything correctly in the GNU configure days. setup.py is a bit too smart >> :) > > You should definitely avoid using make install. The Makefile was > produced by David who cannot stay away from typing make. Buuuh! But > as an OpenBSD hacker he does not spend much time with thinking about > RPMs... ;-) > >>> What's wrong with using python setup.py bdist_rpm ? BTW: It contains >>> byte-compiled *.pyc files in my case (tested right now). >> >> It fails for me since it finds python is 1.5 > > You simply have to type (assuming you used make altinstall when > installing the Python 2.1 version): > $ python2.1 setup.py bdist_rpm > >> (which doesn't include distutils) > > BTW: There are DistUtils for Python 1.5. > >> Second, it looks like the current >> cvs snapshots enforce a 2.0.0pre1 version string. > > Well, this can be easily solved... > >>> When installing from source distribution (packaged with python >>> setup.py sdist) this will do the trick: >>> $ python setup.py install -O1 >>> $ python setup.py install -O2 >> >> what do -01 and -02 do.. or is that O1 O2 (letter 'O')? > > -O1 -> *.pyc > -O2 -> *.pyo > >>> You could also write a small post-install script using >>> compileall.py. > > And how about this as post-install script? > > $ python2.1 /usr/lib/python2.1/compileall.py > $ python2.1 -O /usr/lib/python2.1/compileall.py > > Ciao, Michael. > > From michael at stroeder.com Wed Jan 2 13:18:24 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 02 Jan 2002 13:18:24 +0100 Subject: Building python-ldap RPMs (was: TLS context) References: Message-ID: <3C32FA90.3DE7E7F5@stroeder.com> Joe Little wrote: > > Did you just do a new commit on CVS? Nope. You might want to consider subscribing to list python-ldap-commits to get notification about CVS commits (low-traffic). http://lists.sourceforge.net/lists/listinfo/python-ldap-commits Ciao, Michael. From zope at thewebsons.com Wed Jan 2 18:49:41 2002 From: zope at thewebsons.com (Ben Ocean) Date: Wed, 02 Jan 2002 09:49:41 -0800 Subject: Installation Problem Message-ID: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> Hi; Got this on make: make[1]: *** [constants.o] Error 1 make[1]: Leaving directory `/usr/local/python-ldap-1.10alpha3/Modules' make: *** [_ldapmodule-build] Error 2 I've used every available flag in my config to try to eliminate any problems: #sh configure --with-ldap=/usr/local/openldap --with-ldap-lib=/usr/local/openldap/libraries --with-ldap-inc=/usr/local/openldap/include --with-python=/usr/local/bin/python --with-kerberos --with-kerberos-lib=/usr/krb5-1.2.2/src/lib What am I missing? TIA, BenO From michael at stroeder.com Wed Jan 2 18:58:17 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 02 Jan 2002 18:58:17 +0100 Subject: Installation Problem References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> Message-ID: <3C334A39.49E36A1B@stroeder.com> Ben Ocean wrote: > > make[1]: *** [constants.o] Error 1 > make[1]: Leaving directory `/usr/local/python-ldap-1.10alpha3/Modules' > make: *** [_ldapmodule-build] Error 2 Well, you snipped the compiler's error message. Which version of the OpenLDAP libs are you using? python-ldap-1.10alpha3 can't be compiled against OpenLDAP 2.x. Ciao, Michael. From zope at thewebsons.com Wed Jan 2 19:14:39 2002 From: zope at thewebsons.com (Ben Ocean) Date: Wed, 02 Jan 2002 10:14:39 -0800 Subject: Installation Problem In-Reply-To: <3C334A39.49E36A1B@stroeder.com> References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> Message-ID: <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> At 06:58 PM 1/2/02 +0100, you wrote: >Ben Ocean wrote: > > > > make[1]: *** [constants.o] Error 1 > > make[1]: Leaving directory `/usr/local/python-ldap-1.10alpha3/Modules' > > make: *** [_ldapmodule-build] Error 2 > >Well, you snipped the compiler's error message. > >Which version of the OpenLDAP libs are you using? >python-ldap-1.10alpha3 can't be compiled against OpenLDAP 2.x. Darn. I was afraid of that. Is there no bridge for python2x and openldap2x? TIA, BenO From jlittle at open-it.org Wed Jan 2 19:22:10 2002 From: jlittle at open-it.org (Joe Little) Date: Wed, 02 Jan 2002 10:22:10 -0800 Subject: Installation Problem In-Reply-To: <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> Message-ID: take the latest CVS snapshot or grab my RPMs.. they are designed for OpenLDAP 2.x and do work with python 2.x (2.1 for the RPM) On 1/2/02 10:14 AM, "Ben Ocean" wrote: > At 06:58 PM 1/2/02 +0100, you wrote: >> Ben Ocean wrote: >>> >>> make[1]: *** [constants.o] Error 1 >>> make[1]: Leaving directory `/usr/local/python-ldap-1.10alpha3/Modules' >>> make: *** [_ldapmodule-build] Error 2 >> >> Well, you snipped the compiler's error message. >> >> Which version of the OpenLDAP libs are you using? >> python-ldap-1.10alpha3 can't be compiled against OpenLDAP 2.x. > > Darn. I was afraid of that. Is there no bridge for python2x and openldap2x? > TIA, > BenO > > > > From jens at zope.com Wed Jan 2 19:23:02 2002 From: jens at zope.com (Jens Vagelpohl) Date: Wed, 2 Jan 2002 13:23:02 -0500 Subject: Installation Problem In-Reply-To: <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> Message-ID: there is a FAQ on the python-ldap site (among other docs and searchable list archives): http://python-ldap.sourceforge.net/faq.shtml jens On Wednesday, January 2, 2002, at 01:14 , Ben Ocean wrote: > At 06:58 PM 1/2/02 +0100, you wrote: >> Ben Ocean wrote: >> > >> > make[1]: *** [constants.o] Error 1 >> > make[1]: Leaving directory `/usr/local/python-ldap-1.10alpha3/Modules' >> > make: *** [_ldapmodule-build] Error 2 >> >> Well, you snipped the compiler's error message. >> >> Which version of the OpenLDAP libs are you using? >> python-ldap-1.10alpha3 can't be compiled against OpenLDAP 2.x. > > Darn. I was afraid of that. Is there no bridge for python2x and > openldap2x? > TIA, > BenO > > > > From michael at stroeder.com Wed Jan 2 19:19:54 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 02 Jan 2002 19:19:54 +0100 Subject: Installation Problem References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> Message-ID: <3C334F4A.1712C852@stroeder.com> Ben Ocean wrote: > > Darn. I was afraid of that. Is there no bridge for python2x and openldap2x? There is. Check out recent version from CVS. But beware it *solely* works with OpenLDAP 2 libs which up to now are not available on e.g. Win32. Win32 C compiler hackers jump on in! Ciao, Michael. From jlittle at open-it.org Wed Jan 2 20:54:25 2002 From: jlittle at open-it.org (Joe Little) Date: Wed, 02 Jan 2002 11:54:25 -0800 Subject: Installation Problem In-Reply-To: <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> Message-ID: the cvs tar image is unusable since its CVS format.. just follow the instructions for doing a cs checkout. Or, grab my SRPM, install it, and in /usr/src/redhat/SOURCES will be the python-ldap-cvs-010102.tar.gz file for your enjoyment. On 1/2/02 11:38 AM, "Ben Ocean" wrote: > At 07:19 PM 1/2/02 +0100, you wrote: >> Ben Ocean wrote: >>> >>> Darn. I was afraid of that. Is there no bridge for python2x and openldap2x? >> >> There is. Check out recent version from CVS. > > Okay, I d'l'd, edited setup.cfg,v and ran make but it complained that it > couldn't find setup.py so I moved setup.py,v to setup.py but that caused an > error. This is my first time working with CVS: what am I doing wrong? > TIA, > BenO > > P.S. > Thanks to Joe Little for similar comments. > Thanks to Jens Vagelpohl for recommending the FAQ. > > > > From zope at thewebsons.com Wed Jan 2 20:38:03 2002 From: zope at thewebsons.com (Ben Ocean) Date: Wed, 02 Jan 2002 11:38:03 -0800 Subject: Installation Problem In-Reply-To: <3C334F4A.1712C852@stroeder.com> References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> Message-ID: <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> At 07:19 PM 1/2/02 +0100, you wrote: >Ben Ocean wrote: > > > > Darn. I was afraid of that. Is there no bridge for python2x and openldap2x? > >There is. Check out recent version from CVS. Okay, I d'l'd, edited setup.cfg,v and ran make but it complained that it couldn't find setup.py so I moved setup.py,v to setup.py but that caused an error. This is my first time working with CVS: what am I doing wrong? TIA, BenO P.S. Thanks to Joe Little for similar comments. Thanks to Jens Vagelpohl for recommending the FAQ. From zope at thewebsons.com Wed Jan 2 21:32:09 2002 From: zope at thewebsons.com (Ben Ocean) Date: Wed, 02 Jan 2002 12:32:09 -0800 Subject: Installation Problem In-Reply-To: <3C3367AC.51EA321F@stroeder.com> References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> Message-ID: <5.1.0.14.0.20020102123030.009e7a10@mail.thewebsons.com> At 09:03 PM 1/2/02 +0100, you wrote: >You should follow the "Anonymous CVS instructions": I'm afraid I'm thoroughly confused now! This is my first time with CVS I read the following: This project's SourceForge CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set. The module you wish to check out must be specified as the modulename. When prompted for a password for anonymous, simply press the Enter key. cvs -d:pserver:anonymous at cvs.python-ldap.sourceforge.net:/cvsroot/python-ldap login cvs -z3 -d:pserver:anonymous at cvs.python-ldap.sourceforge.net:/cvsroot/python-ldap co modulename So, what exactly do I do? At a command prompt I enter what? Or, is it in a browser address bar? What do I do? TIA, BenO From michael at stroeder.com Wed Jan 2 21:49:34 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 02 Jan 2002 21:49:34 +0100 Subject: Installation Problem References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> <5.1.0.14.0.20020102123030.009e7a10@mail.thewebsons.com> Message-ID: <3C33725E.78A5CEC5@stroeder.com> Ben Ocean wrote: > > I'm afraid I'm thoroughly confused now! > This is my first time with CVS Well, it seems you should use Joe's RPMs. He built them recently. Ciao, Michael. From zope at thewebsons.com Wed Jan 2 22:04:17 2002 From: zope at thewebsons.com (Ben Ocean) Date: Wed, 02 Jan 2002 13:04:17 -0800 Subject: Installation Problem In-Reply-To: <3C33725E.78A5CEC5@stroeder.com> References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> <5.1.0.14.0.20020102123030.009e7a10@mail.thewebsons.com> Message-ID: <5.1.0.14.0.20020102130219.00a1a700@mail.thewebsons.com> At 09:49 PM 1/2/02 +0100, you wrote: >Ben Ocean wrote: > > > > I'm afraid I'm thoroughly confused now! > > This is my first time with CVS > >Well, it seems you should use Joe's RPMs. He built them recently. Fine, but will that default to all these flags? #sh configure --with-ldap=/usr/local/openldap --with-ldap-lib=/usr/local/openldap/libraries --with-ldap-inc=/usr/local/openldap/include --with-python=/usr/local/bin/python --with-kerberos --with-kerberos-lib=/usr/krb5-1.2.2/src/lib If not, if you would be so kind as to translate the following I would be much obliged: This project's SourceForge CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set. The module you wish to check out must be specified as the modulename. When prompted for a password for anonymous, simply press the Enter key. cvs -d:pserver:anonymous at cvs.python-ldap.sourceforge.net:/cvsroot/python-ldap login cvs -z3 -d:pserver:anonymous at cvs.python-ldap.sourceforge.net:/cvsroot/python-ldap co modulename At a command prompt I enter what? Or, is it in a browser address bar? What do I do? TIA, BenO From rsalz at zolera.com Wed Jan 2 22:09:20 2002 From: rsalz at zolera.com (Rich Salz) Date: Wed, 02 Jan 2002 16:09:20 -0500 Subject: Installation Problem References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> <5.1.0.14.0.20020102123030.009e7a10@mail.thewebsons.com> <5.1.0.14.0.20020102130219.00a1a700@mail.thewebsons.com> Message-ID: <3C337700.8080707@zolera.com> > If not, if you would be so kind as to translate the following ... They are showing two UNIX-style command-line invocations of CVS. Type the first command to "login" to the remote site. When it asks for a password, just hit the RETURN key. Type the second command to fetch the latest sources and make a local mirror of the source tree. Hope this helps. Cute sitename. /r$ -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From zope at thewebsons.com Wed Jan 2 22:14:55 2002 From: zope at thewebsons.com (Ben Ocean) Date: Wed, 02 Jan 2002 13:14:55 -0800 Subject: Installation Problem In-Reply-To: <3C337700.8080707@zolera.com> References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> <5.1.0.14.0.20020102123030.009e7a10@mail.thewebsons.com> <5.1.0.14.0.20020102130219.00a1a700@mail.thewebsons.com> Message-ID: <5.1.0.14.0.20020102131039.00a18010@mail.thewebsons.com> At 04:09 PM 1/2/02 -0500, you wrote: >>If not, if you would be so kind as to translate the following ... > > >They are showing two UNIX-style command-line invocations of CVS. > >Type the first command to "login" to the remote site. When it asks for a >password, just hit the RETURN key. Cool. When I tried the first time it didn't work: now I see my error. Thus, the following: #cvs -d:pserver:anonymous at cvs.python-ldap.sourceforge.net:/cvsroot/python-ldap login (Logging in to anonymous at cvs.python-ldap.sourceforge.net) CVS password: # Okay, what do I do at the last prompt? >Type the second command to fetch the latest sources and make a local >mirror of the source tree. So, in other words, I only need the command listed above (but again, what comes next?) >Cute sitename. Thanks! BenO From rsalz at zolera.com Wed Jan 2 22:23:45 2002 From: rsalz at zolera.com (Rich Salz) Date: Wed, 02 Jan 2002 16:23:45 -0500 Subject: Installation Problem References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> <5.1.0.14.0.20020102123030.009e7a10@mail.thewebsons.com> <5.1.0.14.0.20020102130219.00a1a700@mail.thewebsons.com> <5.1.0.14.0.20020102131039.00a18010@mail.thewebsons.com> Message-ID: <3C337A61.4020503@zolera.com> There are TWO commands. The first starts "cvs -d... login", the second is "cvs -d ... checkout" /r$ Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From zope at thewebsons.com Wed Jan 2 22:33:58 2002 From: zope at thewebsons.com (Ben Ocean) Date: Wed, 02 Jan 2002 13:33:58 -0800 Subject: Installation Problem In-Reply-To: <3C337A61.4020503@zolera.com> References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> <5.1.0.14.0.20020102123030.009e7a10@mail.thewebsons.com> <5.1.0.14.0.20020102130219.00a1a700@mail.thewebsons.com> <5.1.0.14.0.20020102131039.00a18010@mail.thewebsons.com> Message-ID: <5.1.0.14.0.20020102133329.00a1abc0@mail.thewebsons.com> At 04:23 PM 1/2/02 -0500, you wrote: >There are TWO commands. The first starts "cvs -d... login", the second is >"cvs -d ... checkout" Then what is the name of the module? Or, how do I ls to find out? TIA BenO From michael at stroeder.com Thu Jan 3 00:11:50 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Thu, 03 Jan 2002 00:11:50 +0100 Subject: Installation Problem References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> <5.1.0.14.0.20020102123030.009e7a10@mail.thewebsons.com> <5.1.0.14.0.20020102130219.00a1a700@mail.thewebsons.com> Message-ID: <3C3393B6.91D5044F@stroeder.com> Ben Ocean wrote: > > cvs > -d:pserver:anonymous at cvs.python-ldap.sourceforge.net:/cvsroot/python-ldap > login > > cvs -z3 > -d:pserver:anonymous at cvs.python-ldap.sourceforge.net:/cvsroot/python-ldap > co modulename modulename is python-ldap > At 09:49 PM 1/2/02 +0100, you wrote: > >Ben Ocean wrote: > > > > > > I'm afraid I'm thoroughly confused now! > > > This is my first time with CVS > > > >Well, it seems you should use Joe's RPMs. He built them recently. BTW: The URL is http://www.open-it.org/download/redhat7.2/ > Fine, but will that default to all these flags? > > #sh configure --with-ldap=/usr/local/openldap There's no ./configure in the recent version. The build and installation process uses DistUtils (shipped with Python 2.0+). You have to edit setup.cfg to reflect the position of your OpenLDAP 2 headers and libs and invoke $ python setup.py build If that was successful you invoke as root $ python setup.py install Afterwards you should be able to use without errors $ python -c "import ldap" Ciao, Michael. From michael at stroeder.com Thu Jan 3 00:19:56 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Thu, 03 Jan 2002 00:19:56 +0100 Subject: SASL bind (was: Installation Problem) References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <5.1.0.14.0.20020102113517.00a16200@mail.thewebsons.com> <5.1.0.14.0.20020102123030.009e7a10@mail.thewebsons.com> <5.1.0.14.0.20020102130219.00a1a700@mail.thewebsons.com> Message-ID: <3C33959C.844FD2D@stroeder.com> Ben Ocean wrote: > > --with-kerberos --with-kerberos-lib=/usr/krb5-1.2.2/src/lib BTW: Direct support for Kerberos is deprecated with LDAPv3 (here OpenLDAP 2). It should be done via SASL bind. Hmm, any takers? Keith...? Ciao, Michael. From michael at stroeder.com Thu Jan 3 01:07:29 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Thu, 03 Jan 2002 01:07:29 +0100 Subject: ldap_rename bindings References: Message-ID: <3C33A0C1.E9702E9@stroeder.com> "Lorenzo M. Catucci" wrote: > > 1. If you look into ldap.h, ldap_modrdn is deprecated, and should be > expressed as a rename with a null newsuperior. I think in > PyArg_ParseTuple( args, "sss|i", &dn, &newrdn, &newSuperior, &delold ) > the last "s" should be a z, therefore allowing (in the future) to move > mod_rdn from _ldap to a back-compatibility helper in ldap.py like in > > def mod_rdn(dn, newrdn, delete=1): > _ldap.rename(dn,newrdn,None,delete) > > Even better, if newsuperior is made optional and defaulted to NULL, > the user can simply forget about mod_rdn in the long term and choose > between: > rename(dn, newrdn) > rename(dn, newrdn, newsuperior) /bin/done BTW always remember: You can do strange things with ModRDN operation with non-leaf entries on an OpenLDAP 1.x server. You can even abuse it to do very fast sub-tree deletion. Better called sub-tree hiding... ;-) Ciao, Michael. From peeyushg at karna.com Thu Jan 3 03:44:44 2002 From: peeyushg at karna.com (Peeyush Garg) Date: Wed, 2 Jan 2002 18:44:44 -0800 Subject: Installation Problem References: <80C10E40-FFF3-11D5-816F-00039363690C@zope.com> Message-ID: <006301c19400$9c8865a0$5680a8c0@peeyushg> That's correct. I installed it from a binary. Thanks a lot. But meanwhile, I created an empty config.h and it seems to work. Any problems expected in future because of this?? Peeyush. ----- Original Message ----- From: "Jens Vagelpohl" To: "Peeyush Garg" Cc: Sent: Wednesday, January 02, 2002 6:42 PM Subject: Re: Installation Problem it looks like your python came as part of a zope binary. those may not include all necessary header files. i suggest you get a separate "real" python install and use the zope source distribution instead. jens On Wednesday, January 2, 2002, at 09:16 , Peeyush Garg wrote: > Hi, > > I get the following error message while doing a 'make'. > > In file included from /home/zope/zope250b2/include/python2.1/Python.h:54, > from Modules/common.h:27, > from Modules/LDAPObject.c:10: > /home/zope/zope250b2/include/python2.1/pyport.h:4:46: config.h: No such > file or directory > error: command 'gcc' failed with exit status 1 > As I understand the problem is with the file config.h. It simply doesn't > exist in th Python2.1 include directory. But it is referenced in Python.h. > Am I having some files missing in my python installation?? > Any thoughts... > > Thanks, > Peeyush. From peeyushg at karna.com Thu Jan 3 03:16:24 2002 From: peeyushg at karna.com (Peeyush Garg) Date: Wed, 2 Jan 2002 18:16:24 -0800 Subject: Installation Problem Message-ID: <004a01c193fc$a74ae6b0$5680a8c0@peeyushg> Hi, I get the following error message while doing a 'make'. In file included from /home/zope/zope250b2/include/python2.1/Python.h:54, from Modules/common.h:27, from Modules/LDAPObject.c:10: /home/zope/zope250b2/include/python2.1/pyport.h:4:46: config.h: No such file or directory error: command 'gcc' failed with exit status 1 As I understand the problem is with the file config.h. It simply doesn't exist in th Python2.1 include directory. But it is referenced in Python.h. Am I having some files missing in my python installation?? Any thoughts... Thanks, Peeyush. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jens at zope.com Thu Jan 3 03:42:17 2002 From: jens at zope.com (Jens Vagelpohl) Date: Wed, 2 Jan 2002 21:42:17 -0500 Subject: Installation Problem In-Reply-To: <004a01c193fc$a74ae6b0$5680a8c0@peeyushg> Message-ID: <80C10E40-FFF3-11D5-816F-00039363690C@zope.com> it looks like your python came as part of a zope binary. those may not include all necessary header files. i suggest you get a separate "real" python install and use the zope source distribution instead. jens On Wednesday, January 2, 2002, at 09:16 , Peeyush Garg wrote: > Hi, > ? > I get the following error message while doing a 'make'. > ? > In file included from /home/zope/zope250b2/include/python2.1/Python.h:54, > ???????????????? from Modules/common.h:27, > ???????????????? from Modules/LDAPObject.c:10: > /home/zope/zope250b2/include/python2.1/pyport.h:4:46: config.h: No such > file or directory > error: command 'gcc' failed with exit status 1 > As I understand the problem is with the file config.h. It simply doesn't > exist in th Python2.1 include directory. But it is referenced in Python.h. > Am I having some files missing in my python installation?? > Any thoughts... > ? > Thanks, > Peeyush. From michael at stroeder.com Thu Jan 3 12:32:53 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Thu, 03 Jan 2002 12:32:53 +0100 Subject: Installation Problem References: <80C10E40-FFF3-11D5-816F-00039363690C@zope.com> <006301c19400$9c8865a0$5680a8c0@peeyushg> Message-ID: <3C344165.74A56FE2@stroeder.com> Peeyush Garg wrote: > > From: "Jens Vagelpohl" > > > it looks like your python came as part of a zope binary. those may not > > include all necessary header files. > > > > i suggest you get a separate "real" python install and use the zope source > > distribution instead. > > That's correct. I installed it from a binary. Thanks a lot. But meanwhile, I > created an empty config.h and it seems to work. Any problems expected in > future because of this?? Please follow Jens' advice! Get a full install of the Python interpreter with all header files necessary to build Python C extensions! Otherwise we python-ldap people have no chance to help you. (I'm glad that Jens mentioned the stripped binary Python interpreter of Zope since I have no idea about Zope-specific things). Ciao, Michael. From jason at tishler.net Thu Jan 3 14:53:47 2002 From: jason at tishler.net (Jason Tishler) Date: Thu, 3 Jan 2002 08:53:47 -0500 Subject: Installation Problem In-Reply-To: <3C334F4A.1712C852@stroeder.com> References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <3C334F4A.1712C852@stroeder.com> Message-ID: <20020103135347.GE1940@dothill.com> On Wed, Jan 02, 2002 at 07:19:54PM +0100, Michael Str?der wrote: > Ben Ocean wrote: > > Darn. I was afraid of that. Is there no bridge for python2x and openldap2x? > > There is. Check out recent version from CVS. > > But beware it *solely* works with OpenLDAP 2 libs which up to now > are not available on e.g. Win32. Win32 C compiler hackers jump on > in! I don't know about the precise status of Win32, but it works very nicely under Cygwin. Jason From michael at stroeder.com Thu Jan 3 15:01:53 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Thu, 03 Jan 2002 15:01:53 +0100 Subject: Installation Problem References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <3C334F4A.1712C852@stroeder.com> <20020103135347.GE1940@dothill.com> Message-ID: <3C346451.E3DEC0F7@stroeder.com> Jason Tishler wrote: > > On Wed, Jan 02, 2002 at 07:19:54PM +0100, Michael Str?der wrote: > > Ben Ocean wrote: > > > Darn. I was afraid of that. Is there no bridge for python2x and openldap2x? > > > > There is. Check out recent version from CVS. > > > > But beware it *solely* works with OpenLDAP 2 libs which up to now > > are not available on e.g. Win32. Win32 C compiler hackers jump on > > in! > > I don't know about the precise status of Win32, but it works very nicely > under Cygwin. Can you please be more verbose? Did you compile DLLs of OpenLDAP 2 libs? Do you have python-ldap working? Any tweaking necessary during build process? Willing to share Win32 binaries? Ciao, Michael. From michael at stroeder.com Fri Jan 4 01:47:46 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 04 Jan 2002 01:47:46 +0100 Subject: templates.c?!? Message-ID: <3C34FBB2.6ED839D0@stroeder.com> HI! Did someone ever use the stuff implemented in Modules/templates.c ? It's not documented at all and include/disptmpl.h seems to be removed from OpenLDAP HEAD. Ciao, Michael. From peeyushg at karna.com Fri Jan 4 04:36:42 2002 From: peeyushg at karna.com (Peeyush Garg) Date: Thu, 3 Jan 2002 19:36:42 -0800 Subject: Installation Problem References: <80C10E40-FFF3-11D5-816F-00039363690C@zope.com> <006301c19400$9c8865a0$5680a8c0@peeyushg> <3C344165.74A56FE2@stroeder.com> Message-ID: <001201c194d1$09fcc240$5680a8c0@peeyushg> Thanks for the inputs. But, now I get another error... warning: build_py: file Lib/ldap.py (for module ldap) not found can this warning be ignored?? i could not find ldap.py even in current CVS. Even though it is compiled and Zope doesn't complain (it shows installed product), I cannot get to connect to LDAP server. Is this problem because of the above file?? ----- Original Message ----- From: "Michael Str?der" To: "Peeyush Garg" Cc: Sent: Thursday, January 03, 2002 3:32 AM Subject: Re: Installation Problem > Peeyush Garg wrote: > > > > From: "Jens Vagelpohl" > > > > > it looks like your python came as part of a zope binary. those may not > > > include all necessary header files. > > > > > > i suggest you get a separate "real" python install and use the zope source > > > distribution instead. > > > > That's correct. I installed it from a binary. Thanks a lot. But meanwhile, I > > created an empty config.h and it seems to work. Any problems expected in > > future because of this?? > > Please follow Jens' advice! > > Get a full install of the Python interpreter with all header files > necessary to build Python C extensions! Otherwise we python-ldap > people have no chance to help you. (I'm glad that Jens mentioned the > stripped binary Python interpreter of Zope since I have no idea > about Zope-specific things). > > Ciao, Michael. > > From mcicogni at siosistemi.it Fri Jan 4 10:42:11 2002 From: mcicogni at siosistemi.it (Mauro Cicognini) Date: Fri, 04 Jan 2002 10:42:11 +0100 Subject: Stripped LDAPObject.c References: <20011222153112.C3148@nic.bnet.pl> <3C24A36B.BFC61AE7@stroeder.com> Message-ID: <3C3578F3.C91B5FE8@siosistemi.it> Michael wrote: > Hmm, maybe python-ldap sits on top of the wrong LDAP C lib? We > currently do not have Win32 support and it's not thread-safe. > > In opposite iPlanet C SDK (see > http://www.mozilla.org/directory/csdk.html) is known to be thread-safe > and is available on various platforms. Unfortunately the API of the > LDAP C SDKs diverged some much that it's unpossible to #ifdef the > differences. It's a decision for either one of those. Are you positively sure that's impossible to #ifdef the differences? As far as I'm concerned, I'd rather like the idea of linking against iPlanet/Mozilla/Netscape etc. who are the guys that brought out LDAP in the first place. Just a matter of personal taste ;-) BTW, I had promised I'd look into the Win32 support (which means most of all compiling OpenLDAP on Win32), and I still mean to try though I haven't had a chance yet. Mauro -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 2010 bytes Desc: S/MIME Cryptographic Signature URL: From michael at stroeder.com Fri Jan 4 13:22:01 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 04 Jan 2002 13:22:01 +0100 Subject: Stripped LDAPObject.c References: <20011222153112.C3148@nic.bnet.pl> <3C24A36B.BFC61AE7@stroeder.com> <3C3578F3.C91B5FE8@siosistemi.it> Message-ID: <3C359E69.2266AA9F@stroeder.com> Mauro Cicognini wrote: > > > Unfortunately the API of the > > LDAP C SDKs diverged some much that it's unpossible to #ifdef the > > differences. It's a decision for either one of those. > > Are you positively sure that's impossible to #ifdef the differences? Somewhat. > As far as I'm concerned, I'd rather like the idea of linking against > iPlanet/Mozilla/Netscape etc. who are the guys that brought out LDAP in > the first place. > Just a matter of personal taste ;-) You're welcome to jump on in proving the opposite. Ciao, Michael. From rsalz at zolera.com Fri Jan 4 14:43:00 2002 From: rsalz at zolera.com (Rich Salz) Date: Fri, 04 Jan 2002 08:43:00 -0500 Subject: Stripped LDAPObject.c References: <20011222153112.C3148@nic.bnet.pl> <3C24A36B.BFC61AE7@stroeder.com> <3C3578F3.C91B5FE8@siosistemi.it> <3C359E69.2266AA9F@stroeder.com> Message-ID: <3C35B164.F46B24A2@zolera.com> > > Are you positively sure that's impossible to #ifdef the differences? > > Somewhat. ... > You're welcome to jump on in proving the opposite. It might not be possible to auto-detect, but I would expect something like "--with-netscape" for example would work. :) Anyone thought about doing a pure-python solution? -- Zolera Systems, Securing web services (XML, SOAP, Signatures, Encryption) http://www.zolera.com From michael at stroeder.com Fri Jan 4 14:54:09 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 04 Jan 2002 14:54:09 +0100 Subject: Stripped LDAPObject.c References: <20011222153112.C3148@nic.bnet.pl> <3C24A36B.BFC61AE7@stroeder.com> <3C3578F3.C91B5FE8@siosistemi.it> <3C359E69.2266AA9F@stroeder.com> <3C35B164.F46B24A2@zolera.com> Message-ID: <3C35B401.5E78A5E6@stroeder.com> Rich Salz wrote: > > > > Are you positively sure that's impossible to #ifdef the differences? > > > > Somewhat. > ... > > > You're welcome to jump on in proving the opposite. > > It might not be possible to auto-detect, but I would expect something > like "--with-netscape" for example would work. :) Yes, that would work. But someone has to be willing to implement *and* maintain it. > Anyone thought about doing a pure-python solution? Yes I already thought about it while working with Jeremy Hylton's asn1 module. Especially it would be fairly easy to implement a completely re-entrant module in pure Python. And also more friendly to Jython people. But the BER stuff is a major PITA. Also for performance reasons the BER implementation should be implemented in C. Or a module pair like StringIO/cStringIO or pickle/cPickle. Ciao, Michael. From michael at stroeder.com Fri Jan 4 13:38:57 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 04 Jan 2002 13:38:57 +0100 Subject: Installation Problem References: <80C10E40-FFF3-11D5-816F-00039363690C@zope.com> <006301c19400$9c8865a0$5680a8c0@peeyushg> <3C344165.74A56FE2@stroeder.com> <001201c194d1$09fcc240$5680a8c0@peeyushg> Message-ID: <3C35A261.91E224D4@stroeder.com> Peeyush Garg wrote: > > warning: build_py: file Lib/ldap.py (for module ldap) not found You can ignore that. > i could not find ldap.py even in current CVS. It has been substituted by Lib/ldap/*.py. > I cannot get to connect to LDAP server. Is this problem because of > the above file?? No. Any traceback you can send us? Note that _ldap.open() does not work anymore. Use ldap.open() instead. I've updated the README. Ciao, Michael. From peeyushg at karna.com Fri Jan 4 19:46:12 2002 From: peeyushg at karna.com (Peeyush Garg) Date: Fri, 4 Jan 2002 10:46:12 -0800 Subject: Installation Problem References: <80C10E40-FFF3-11D5-816F-00039363690C@zope.com> <006301c19400$9c8865a0$5680a8c0@peeyushg> <3C344165.74A56FE2@stroeder.com> <001201c194d1$09fcc240$5680a8c0@peeyushg> <3C35A261.91E224D4@stroeder.com> Message-ID: <003c01c19550$17957e40$5680a8c0@peeyushg> Hi, Let me explain the problem in more detail because I do not have a 'direct' traceback. I have Zope(2.5.0b2) and LDAP(2.0.18) server installed on the same Linux machine. If I try to access LDAP server from Zope it says 'connection settings not ok....'. The interesting part is that when I install LDAPUserFolder on another installation of Zope(2.4.3) on a WinNT(4.1 workstation) machine, it connects beautifully with the same settings. Following is a traceback that I get when I try to search for users(without even being connected, just for the purpose of getting some traceback): Traceback (innermost last): File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 151, in publish_module File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 115, in publish File /home/zope/zope250b2/lib/python/Zope/__init__.py, line 158, in zpublisher_exception_hook (Object: acl_users) File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 99, in publish File /home/zope/zope250b2/lib/python/ZPublisher/mapply.py, line 88, in mapply (Object: manage_userrecords) File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 40, in call_object (Object: manage_userrecords) File /home/zope/zope250b2/lib/python/Shared/DC/Scripts/Bindings.py, line 252, in __call__ (Object: manage_userrecords) File /home/zope/zope250b2/lib/python/Shared/DC/Scripts/Bindings.py, line 283, in _bindAndExec (Object: manage_userrecords) File /home/zope/zope250b2/lib/python/App/special_dtml.py, line 172, in _exec (Object: manage_userrecords) File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_Let.py, line 76, in render (Object: cur_vals="getUserDetails(encoded_dn=user_dn, format='dictionary')") File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_In.py, line 695, in renderwob (Object: getLDAPSchema()) File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_Let.py, line 75, in render (Object: sk="_['sequence-key']" si="_['sequence-item']" cur_val="_.string.join( cur_vals.get( sk, '' ) )") File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_Util.py, line 159, in eval (Object: _.string.join( cur_vals.get( sk, '' ) )) (Info: sk) File , line 0, in ? AttributeError: (see above) Installing on WinNT did take me some half a day to make it working (that was my first experience with LDAP) but getting to connect from the same Linux machine has taken me 2 days without much luck. Any help is appreciated. Thanks, Peeyush. ----- Original Message ----- From: "Michael Str?der" To: "Peeyush Garg" Cc: Sent: Friday, January 04, 2002 4:38 AM Subject: Re: Installation Problem > Peeyush Garg wrote: > > > > warning: build_py: file Lib/ldap.py (for module ldap) not found > > You can ignore that. > > > i could not find ldap.py even in current CVS. > > It has been substituted by Lib/ldap/*.py. > > > I cannot get to connect to LDAP server. Is this problem because of > > the above file?? > > No. Any traceback you can send us? Note that _ldap.open() does not > work anymore. Use ldap.open() instead. I've updated the README. > > Ciao, Michael. From jlittle at open-it.org Fri Jan 4 19:56:03 2002 From: jlittle at open-it.org (Joe Little) Date: Fri, 04 Jan 2002 10:56:03 -0800 Subject: Installation Problem In-Reply-To: <003c01c19550$17957e40$5680a8c0@peeyushg> Message-ID: This definitely looks like something specific to Zope and this beta release of said product. You likely want to ask lists specific to Zope. There are no traces or exceptions coming from access to the python-ldap modules, and so I would suggest using a released Zope product (2.4.x) instead of the 2.5 beta series. On 1/4/02 10:46 AM, "Peeyush Garg" wrote: > Hi, > > Let me explain the problem in more detail because I do not have a 'direct' > traceback. I have Zope(2.5.0b2) and LDAP(2.0.18) server installed on the > same Linux machine. If I try to access LDAP server from Zope it says > 'connection settings not ok....'. The interesting part is that when I > install LDAPUserFolder on another installation of Zope(2.4.3) on a WinNT(4.1 > workstation) machine, it connects beautifully with the same settings. > > Following is a traceback that I get when I try to search for users(without > even being connected, just for the purpose of getting some traceback): > > Traceback (innermost last): > File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 151, in > publish_module > File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 115, in > publish > File /home/zope/zope250b2/lib/python/Zope/__init__.py, line 158, in > zpublisher_exception_hook > (Object: acl_users) > File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 99, in > publish > File /home/zope/zope250b2/lib/python/ZPublisher/mapply.py, line 88, in > mapply > (Object: manage_userrecords) > File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 40, in > call_object > (Object: manage_userrecords) > File /home/zope/zope250b2/lib/python/Shared/DC/Scripts/Bindings.py, line > 252, in __call__ > (Object: manage_userrecords) > File /home/zope/zope250b2/lib/python/Shared/DC/Scripts/Bindings.py, line > 283, in _bindAndExec > (Object: manage_userrecords) > File /home/zope/zope250b2/lib/python/App/special_dtml.py, line 172, in > _exec > (Object: manage_userrecords) > File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_Let.py, line 76, > in render > (Object: cur_vals="getUserDetails(encoded_dn=user_dn, > format='dictionary')") > File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_In.py, line 695, > in renderwob > (Object: getLDAPSchema()) > File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_Let.py, line 75, > in render > (Object: sk="_['sequence-key']" > si="_['sequence-item']" > cur_val="_.string.join( cur_vals.get( sk, '' ) )") > File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_Util.py, line > 159, in eval > (Object: _.string.join( cur_vals.get( sk, '' ) )) > (Info: sk) > File , line 0, in ? > AttributeError: (see above) > > > Installing on WinNT did take me some half a day to make it working (that was > my first experience with LDAP) but getting to connect from the same Linux > machine has taken me 2 days without much luck. Any help is appreciated. > > Thanks, > Peeyush. > ----- Original Message ----- > From: "Michael Str?der" > To: "Peeyush Garg" > Cc: > Sent: Friday, January 04, 2002 4:38 AM > Subject: Re: Installation Problem > > >> Peeyush Garg wrote: >>> >>> warning: build_py: file Lib/ldap.py (for module ldap) not found >> >> You can ignore that. >> >>> i could not find ldap.py even in current CVS. >> >> It has been substituted by Lib/ldap/*.py. >> >>> I cannot get to connect to LDAP server. Is this problem because of >>> the above file?? >> >> No. Any traceback you can send us? Note that _ldap.open() does not >> work anymore. Use ldap.open() instead. I've updated the README. >> >> Ciao, Michael. > > > From michael at stroeder.com Fri Jan 4 20:03:41 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 04 Jan 2002 20:03:41 +0100 Subject: Installation Problem References: <80C10E40-FFF3-11D5-816F-00039363690C@zope.com> <006301c19400$9c8865a0$5680a8c0@peeyushg> <3C344165.74A56FE2@stroeder.com> <001201c194d1$09fcc240$5680a8c0@peeyushg> <3C35A261.91E224D4@stroeder.com> <003c01c19550$17957e40$5680a8c0@peeyushg> Message-ID: <3C35FC8D.CC7A83A6@stroeder.com> Peeyush Garg wrote: > > If I try to access LDAP server from Zope it says > 'connection settings not ok....'. I'd suggest that you write a small test script to figure out if it's a python-ldap issue. You could open connection to your LDAP server and simply read root DSE entry (if LDAPv3 server). Something like ---------------------- snip --------------------- import ldap # Open LDAP connection l=ldap.open('myldaphost:port') # Read the root DSE l.search_s('',ldap.SCOPE_BASE,'(objectClass=*)') # Unbind and disconnect l.unbind_s() ---------------------- snip --------------------- Ciao, Michael. From jens at zope.com Fri Jan 4 20:48:25 2002 From: jens at zope.com (Jens Vagelpohl) Date: Fri, 4 Jan 2002 14:48:25 -0500 Subject: Installation Problem In-Reply-To: <003c01c19550$17957e40$5680a8c0@peeyushg> Message-ID: <048A118C-014C-11D6-9405-003065C7DEAE@zope.com> this is only "half" the information needed to solve the problem. above the traceback it should tell you what the attribute error is on. jens P.S.: as the author of the LDAPUserFolder product i can't make any guarantees about zope 2.5 compatibility until there is a released final version of zope 2.5. if you are in doubt you should test the same situation using zope 2.4.3 On Friday, January 4, 2002, at 01:46 , Peeyush Garg wrote: > Hi, > > Let me explain the problem in more detail because I do not have a 'direct' > traceback. I have Zope(2.5.0b2) and LDAP(2.0.18) server installed on the > same Linux machine. If I try to access LDAP server from Zope it says > 'connection settings not ok....'. The interesting part is that when I > install LDAPUserFolder on another installation of Zope(2.4.3) on a WinNT( > 4.1 > workstation) machine, it connects beautifully with the same settings. > > Following is a traceback that I get when I try to search for users(without > even being connected, just for the purpose of getting some traceback): > > Traceback (innermost last): > File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 151, in > publish_module > File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 115, in > publish > File /home/zope/zope250b2/lib/python/Zope/__init__.py, line 158, in > zpublisher_exception_hook > (Object: acl_users) > File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 99, in > publish > File /home/zope/zope250b2/lib/python/ZPublisher/mapply.py, line 88, in > mapply > (Object: manage_userrecords) > File /home/zope/zope250b2/lib/python/ZPublisher/Publish.py, line 40, in > call_object > (Object: manage_userrecords) > File /home/zope/zope250b2/lib/python/Shared/DC/Scripts/Bindings.py, line > 252, in __call__ > (Object: manage_userrecords) > File /home/zope/zope250b2/lib/python/Shared/DC/Scripts/Bindings.py, line > 283, in _bindAndExec > (Object: manage_userrecords) > File /home/zope/zope250b2/lib/python/App/special_dtml.py, line 172, in > _exec > (Object: manage_userrecords) > File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_Let.py, line > 76, > in render > (Object: cur_vals="getUserDetails(encoded_dn=user_dn, > format='dictionary')") > File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_In.py, line > 695, > in renderwob > (Object: getLDAPSchema()) > File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_Let.py, line > 75, > in render > (Object: sk="_['sequence-key']" > si="_['sequence-item']" > cur_val="_.string.join( cur_vals.get( sk, '' ) )") > File /home/zope/zope250b2/lib/python/DocumentTemplate/DT_Util.py, line > 159, in eval > (Object: _.string.join( cur_vals.get( sk, '' ) )) > (Info: sk) > File , line 0, in ? > AttributeError: (see above) > > > Installing on WinNT did take me some half a day to make it working (that > was > my first experience with LDAP) but getting to connect from the same Linux > machine has taken me 2 days without much luck. Any help is appreciated. > > Thanks, > Peeyush. > ----- Original Message ----- > From: "Michael Str?der" > To: "Peeyush Garg" > Cc: > Sent: Friday, January 04, 2002 4:38 AM > Subject: Re: Installation Problem > > >> Peeyush Garg wrote: >>> >>> warning: build_py: file Lib/ldap.py (for module ldap) not found >> >> You can ignore that. >> >>> i could not find ldap.py even in current CVS. >> >> It has been substituted by Lib/ldap/*.py. >> >>> I cannot get to connect to LDAP server. Is this problem because of >>> the above file?? >> >> No. Any traceback you can send us? Note that _ldap.open() does not >> work anymore. Use ldap.open() instead. I've updated the README. >> >> Ciao, Michael. > > > From michael at stroeder.com Fri Jan 4 23:55:51 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 04 Jan 2002 23:55:51 +0100 Subject: Installation Problem References: <048A118C-014C-11D6-9405-003065C7DEAE@zope.com> Message-ID: <3C3632F7.F6AC98FC@stroeder.com> Jens Vagelpohl wrote: > > this is only "half" the information needed to solve the problem. above the > traceback it should tell you what the attribute error is on. > > jens > > P.S.: as the author of the LDAPUserFolder product i can't make any > guarantees about zope 2.5 compatibility until there is a released final > version of zope 2.5. if you are in doubt you should test the same > situation using zope 2.4.3 I conclude that this has nothing to do with python-ldap and should therefore be discussed on a Zope-related mailing list. Ciao, Michael. From peeyushg at karna.com Fri Jan 4 23:54:16 2002 From: peeyushg at karna.com (Peeyush Garg) Date: Fri, 4 Jan 2002 14:54:16 -0800 Subject: Installation Problem References: <80C10E40-FFF3-11D5-816F-00039363690C@zope.com> <006301c19400$9c8865a0$5680a8c0@peeyushg> <3C344165.74A56FE2@stroeder.com> <001201c194d1$09fcc240$5680a8c0@peeyushg> <3C35A261.91E224D4@stroeder.com> <003c01c19550$17957e40$5680a8c0@peeyushg> <3C35FC8D.CC7A83A6@stroeder.com> Message-ID: <00ee01c19572$bf23f660$5680a8c0@peeyushg> Michael, Ur script works perfectly and i can see the debugging messages in my LDAP server that it has been connected. But, as Jens pointed out in Zope mailing list that he's able to run it successfully on Zope 2.5.0b3, I too installed the same but it gives me the same error. I seem to be getting nearer to my problem but still far. I still have no clue. Thanks, Peeysuh. ----- Original Message ----- From: "Michael Str?der" To: "Peeyush Garg" Cc: Sent: Friday, January 04, 2002 11:03 AM Subject: Re: Installation Problem > Peeyush Garg wrote: > > > > If I try to access LDAP server from Zope it says > > 'connection settings not ok....'. > > I'd suggest that you write a small test script to figure out if it's > a python-ldap issue. You could open connection to your LDAP server > and simply read root DSE entry (if LDAPv3 server). > > Something like > > ---------------------- snip --------------------- > import ldap > > # Open LDAP connection > l=ldap.open('myldaphost:port') > > # Read the root DSE > l.search_s('',ldap.SCOPE_BASE,'(objectClass=*)') > > # Unbind and disconnect > l.unbind_s() > ---------------------- snip --------------------- > > Ciao, Michael. > > From michael at stroeder.com Sat Jan 5 00:56:19 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Sat, 05 Jan 2002 00:56:19 +0100 Subject: sdist for easy installation Message-ID: <3C364123.8429870E@stroeder.com> HI! I've published a source distribution tar.gz to http://sourceforge.net/project/showfiles.php?group_id=2072 Please test it and take this one to make RPMs and other packages so that people can refer to a certain CVS timestamp when reporting errors. Ciao, Michael. From tilp at rz.rwth-aachen.de Mon Jan 7 15:51:22 2002 From: tilp at rz.rwth-aachen.de (Manuel Tilp) Date: Mon, 7 Jan 2002 15:51:22 +0100 Subject: Complining on SunOS 5.8 Message-ID: <000e01c1978a$c6352fe0$51018286@franck3> Hi! I try to build 1.10alpha3, but i get a lot of warnings like this one: "/python-ldap-1.10alpha3/Modules/./template.c:143: warning: function declaration isn't a prototype" ( in template.c and linkedlist.c, configure seems to work fine ). I also tried CVS200201041716, but when doing "python2.1 setup.py install" gcc fails to compile constants.c after dozens of 'LDAP_XYZ' undeclared (first use in this function) error-messages. Everything worked fine on a Linuxbox, but that doesn't help me.. Do you have any hints for me? Thanks, Manuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at stroeder.com Mon Jan 7 16:14:19 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Mon, 07 Jan 2002 16:14:19 +0100 Subject: Complining on SunOS 5.8 References: <000e01c1978a$c6352fe0$51018286@franck3> Message-ID: <3C39BB4B.16CEB338@stroeder.com> Manuel Tilp wrote: > > I try to build 1.10alpha3, but i get a lot of warnings like this > one: > "/python-ldap-1.10alpha3/Modules/./template.c:143: warning: > function declaration isn't a prototype" > ( in template.c and linkedlist.c, configure seems to work fine ). > > I also tried CVS200201041716, but when doing "python2.1 setup.py > install" gcc fails to compile > constants.c after dozens of > 'LDAP_XYZ' undeclared (first use in this function) > error-messages. You need OpenLDAP libs 2.0.13+ for this snapshot. You also need to use --with-tls when compiling the OpenLDAP 2 libs. > Everything worked fine on a Linuxbox, but that doesn't help me.. Which version of the OpenLDAP libs do you have on your Linux and your SunOS box? Compiling against the LDAP libs shipped with SunOS very likely doesn't work (at least with recent snapshot). Ciao, Michael. From jason at tishler.net Thu Jan 3 15:54:49 2002 From: jason at tishler.net (Jason Tishler) Date: Thu, 3 Jan 2002 09:54:49 -0500 Subject: Cygwin python-ldap (was Re: Installation Problem) In-Reply-To: <3C346451.E3DEC0F7@stroeder.com> References: <5.1.0.14.0.20020102093937.00a10050@mail.thewebsons.com> <5.1.0.14.0.20020102101359.00a14c50@mail.thewebsons.com> <3C334F4A.1712C852@stroeder.com> <20020103135347.GE1940@dothill.com> <3C346451.E3DEC0F7@stroeder.com> Message-ID: <20020103145449.GG1940@dothill.com> Michael, On Thu, Jan 03, 2002 at 03:01:53PM +0100, Michael Str?der wrote: > Jason Tishler wrote: > > On Wed, Jan 02, 2002 at 07:19:54PM +0100, Michael Str?der wrote: > > > But beware it *solely* works with OpenLDAP 2 libs which up to now > > > are not available on e.g. Win32. Win32 C compiler hackers jump on > > > in! > > > > I don't know about the precise status of Win32, but it works very nicely > > under Cygwin. > > Can you please be more verbose? Yes, sorry for my terseness. I didn't think people would be interested, so I opted for the short version. > Did you compile DLLs of OpenLDAP 2 libs? No, just static ones. When the Cygwin-ized libtool work is completed, then they should come for free... > Do you have python-ldap working? Yes, I have been using python-ldap under Cygwin since August 2000. The minor Cygwin specific changes were committed to python-ldap CVS in March 2001: http://www.geocrawler.com/archives/3/1568/2001/3/0/5307464/ > Any tweaking necessary during build process? Not much. See attached setup.cfg and the following for a small OpenLDAP 2.x patch: http://sources.redhat.com/ml/cygwin/2001-10/msg01248.html Note that the setup.cfg libs line is only necessary on a temporary basis. It can go back to its default value once a DLL rebase solution to Cygwin's fork() problem is implemented. If interested, see the following: http://sources.redhat.com/ml/cygwin/2001-12/msg00894.html > Willing to share Win32 binaries? Of course! A pre-built version for Cygwin Python 2.2, installable by Cygwin's setup.exe is available at: http://www.tishler.net/jason/software/python-ldap/python-ldap-20020101-1.tar.bz2 If people are interested, then I will formally contribute a pre-built python-ldap to the standard Cygwin distribution. Jason -------------- next part -------------- [_ldap] class = OpenLDAP2 library_dirs = /usr/local/lib include_dirs = /usr/local/include libs = ldap lber ssl crypto From michael at stroeder.com Mon Jan 21 01:09:49 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Mon, 21 Jan 2002 01:09:49 +0100 Subject: FYI: manage_dsa_it() Message-ID: <3C4B5C4D.C26685FC@stroeder.com> HI! I've added a new method LDAPObject.manage_dsa_it() for enabling/disabling manage DSA IT mode for adding/modifying referral entries (see draft-zeilenga-ldap-namedref). It's just a dirty hack as long there's no full support for extended controls. It might change silently. Ciao, Michael. From thomas.heller at ion-tof.com Thu Jan 24 14:31:13 2002 From: thomas.heller at ion-tof.com (Thomas Heller) Date: Thu, 24 Jan 2002 14:31:13 +0100 Subject: Python-ldap on windows Message-ID: <01ae01c1a4db$769fc5e0$e000a8c0@thomasnotebook> Hi. What's the status on windows? I have downloaded the binaries, but they don't seem to work too well. Regards, Thomas From thomas.heller at ion-tof.com Fri Jan 25 08:39:11 2002 From: thomas.heller at ion-tof.com (Thomas Heller) Date: Fri, 25 Jan 2002 08:39:11 +0100 Subject: Python-ldap on windows References: <01ae01c1a4db$769fc5e0$e000a8c0@thomasnotebook> <3C507EA2.8ACEEC2A@stroeder.com> Message-ID: <035801c1a573$73d75b00$e000a8c0@thomasnotebook> From: "Michael Str?der" > Thomas Heller wrote: > > > > What's the status on windows? I have downloaded the binaries, > > but they don't seem to work too well. > > Which binaries? What's missing? What's wrong? Did you check out Well, I spoke too soon. My problems were a) that I did not know exactly what I was doing, and b) that I had mixed windows binaries with current CVS code. BTW: What I'm trying to do is to write a Python script which imports a csv file (exported from a database we have here with contact information: name, address, email, telphone number...) into a LDAP server. Is there any previous work which could help me getting started? > cygwin-version announced by Jason on the list recently? I don't run cygwin (and I've just at the moment subscribed to this list). Thanks, Thomas From michael at stroeder.com Thu Jan 24 22:37:38 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Thu, 24 Jan 2002 22:37:38 +0100 Subject: Python-ldap on windows References: <01ae01c1a4db$769fc5e0$e000a8c0@thomasnotebook> Message-ID: <3C507EA2.8ACEEC2A@stroeder.com> Thomas Heller wrote: > > What's the status on windows? I have downloaded the binaries, > but they don't seem to work too well. Which binaries? What's missing? What's wrong? Did you check out cygwin-version announced by Jason on the list recently? Ciao, Michael. From michael at stroeder.com Fri Jan 25 12:56:28 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 25 Jan 2002 12:56:28 +0100 Subject: Python-ldap on windows References: <01ae01c1a4db$769fc5e0$e000a8c0@thomasnotebook> <3C507EA2.8ACEEC2A@stroeder.com> <035801c1a573$73d75b00$e000a8c0@thomasnotebook> Message-ID: <3C5147EC.AF245710@stroeder.com> Thomas Heller wrote: > > I had mixed windows binaries > with current CVS code. The Win32 binaries are probably build against old Umich libs. There is no recent version of python-ldap linked against OpenLDAP 2 libs for native Win32 (only cygwin). python-ldap based on Umich libs does not provide support for SSL or StartTLS. > BTW: What I'm trying to do is to write a Python script which > imports a csv file (exported from a database we have here with > contact information: name, address, email, telphone number...) > into a LDAP server. Is there any previous work which could help > me getting started? IMHO there's a csv module for Python. You should map the table columns to attributes and build an entry dictionary. You can either write this to the LDAP server by converting the entry's dict with ldap.modlist.addModlist() to a modify list you can directly pass to add_s() method or diff against existing entries with ldap.modlist.modifyModlist(). Hmm, module ldap.modlist is only available in recent CVS version. You can extract it from there and back-port it to old version though. It does not directly rely on something else except some constants. You can also create LDIF with module ldif for bulk-upload into your LDAP server with some command-line tools. Recent version of module ldif in CVS is also improved. Ciao, Michael. From jason at tishler.net Fri Jan 25 14:28:22 2002 From: jason at tishler.net (Jason Tishler) Date: Fri, 25 Jan 2002 08:28:22 -0500 Subject: Python-ldap on windows In-Reply-To: <035801c1a573$73d75b00$e000a8c0@thomasnotebook> References: <01ae01c1a4db$769fc5e0$e000a8c0@thomasnotebook> <3C507EA2.8ACEEC2A@stroeder.com> <035801c1a573$73d75b00$e000a8c0@thomasnotebook> Message-ID: <20020125132822.GB1252@dothill.com> Thomas, On Fri, Jan 25, 2002 at 08:39:11AM +0100, Thomas Heller wrote: > From: "Michael Str?der" > > cygwin-version announced by Jason on the list recently? > > I don't run cygwin (and I've just at the moment subscribed to this list). Just in case you are interested in a Cygwin python-ldap, see the following: http://www.geocrawler.com/archives/3/1568/2002/1/0/7452037/ Jason From dino at pro-netics.com Mon Jan 28 16:42:14 2002 From: dino at pro-netics.com (dino) Date: Mon, 28 Jan 2002 10:42:14 -0500 Subject: why didn't it work? Message-ID: <02012810421400.02323@data1.pro-netics.com> Many tanks to you and other people that work for opensource!!! I built latest version of python ldap module. It works only if I import ldap, not _ldap. Why? Thanks a lot for working and, I am dino at pro-netics.com, italian guy. Bye. From jens at zope.com Mon Jan 28 15:12:05 2002 From: jens at zope.com (Jens Vagelpohl) Date: Mon, 28 Jan 2002 09:12:05 -0500 Subject: why didn't it work? In-Reply-To: <02012810421400.02323@data1.pro-netics.com> Message-ID: <01B1803B-13F9-11D6-BBA8-00039363690C@zope.com> i'm getting complaints about this from people who use some of my products that rely on python-ldap. one guy uses a CVS checkout from january 4th. is the CVS version hosed? ***** >>> if you launch python, can you import "_ldap"? Yes, I can, but if I try to call the "_ldap.open" function, it fails : module _ldap does not have such function. >>> can you import "ldap"? Yes, I can, and I can call functions "ldap.open", "ldap.bind_s", etc. ******* jens On Monday, January 28, 2002, at 10:42 , dino wrote: > Many tanks to you and other people that work for opensource!!! > I built latest version of python ldap module. > It works only if I import ldap, not _ldap. Why? > Thanks a lot for working and, I am dino at pro-netics.com, italian guy. Bye. > From michael at stroeder.com Mon Jan 28 16:29:58 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Mon, 28 Jan 2002 16:29:58 +0100 Subject: why didn't it work? References: <01B1803B-13F9-11D6-BBA8-00039363690C@zope.com> Message-ID: <3C556E76.144E2C98@stroeder.com> Jens Vagelpohl wrote: > > i'm getting complaints about this from people who use some of my products > that rely on python-ldap. one guy uses a CVS checkout from january 4th. is > the CVS version hosed? Don't import _ldap. Despite some code examples this was never good practice. > if I try to call the "_ldap.open" function, it fails : > module _ldap does not have such function. Yes. > >>> can you import "ldap"? > Yes, I can, and I can call functions "ldap.open", "ldap.bind_s", etc. > ******* There's no reason to import _ldap. Don't do that. Everything's wrapped correctly in module ldap.ldapobject. Ciao, Michael. From jens at zope.com Mon Jan 28 16:57:38 2002 From: jens at zope.com (Jens Vagelpohl) Date: Mon, 28 Jan 2002 10:57:38 -0500 Subject: why didn't it work? In-Reply-To: <3C556E76.144E2C98@stroeder.com> Message-ID: i'm very surprised. i was under the impression that it was just the other way around: importing _ldap was the canonical way and importing ldap only existed for backwards compatibility. i'm confused. jens On Monday, January 28, 2002, at 10:29 , Michael Str?der wrote: > Jens Vagelpohl wrote: >> >> i'm getting complaints about this from people who use some of my products >> that rely on python-ldap. one guy uses a CVS checkout from january 4th. >> is >> the CVS version hosed? > > Don't import _ldap. Despite some code examples this was never good > practice. > >> if I try to call the "_ldap.open" function, it fails : >> module _ldap does not have such function. > > Yes. > >>>>> can you import "ldap"? >> Yes, I can, and I can call functions "ldap.open", "ldap.bind_s", etc. >> ******* > > There's no reason to import _ldap. Don't do that. Everything's > wrapped correctly in module ldap.ldapobject. > > Ciao, Michael. From peeyushg at karna.com Mon Jan 28 19:52:52 2002 From: peeyushg at karna.com (Peeyush Garg) Date: Mon, 28 Jan 2002 10:52:52 -0800 Subject: why didn't it work? References: Message-ID: <001b01c1a82d$0052ddf0$5680a8c0@peeyushg> As I see it in the latest code, I think both shud work.... try: import _ldap except ImportError: import ldap _ldap = ldap Except I couldn't still get it running either way on Unix but runs perfectly on Windows even though it installs correctly on Unix. I tried Zope mailing list too. No luck. ~Peeyush. ----- Original Message ----- From: "Jens Vagelpohl" To: Cc: "python-ldap-dev" Sent: Monday, January 28, 2002 7:57 AM Subject: Re: why didn't it work? i'm very surprised. i was under the impression that it was just the other way around: importing _ldap was the canonical way and importing ldap only existed for backwards compatibility. i'm confused. jens On Monday, January 28, 2002, at 10:29 , Michael Str?der wrote: > Jens Vagelpohl wrote: >> >> i'm getting complaints about this from people who use some of my products >> that rely on python-ldap. one guy uses a CVS checkout from january 4th. >> is >> the CVS version hosed? > > Don't import _ldap. Despite some code examples this was never good > practice. > >> if I try to call the "_ldap.open" function, it fails : >> module _ldap does not have such function. > > Yes. > >>>>> can you import "ldap"? >> Yes, I can, and I can call functions "ldap.open", "ldap.bind_s", etc. >> ******* > > There's no reason to import _ldap. Don't do that. Everything's > wrapped correctly in module ldap.ldapobject. > > Ciao, Michael. From jens at zope.com Mon Jan 28 20:14:18 2002 From: jens at zope.com (Jens Vagelpohl) Date: Mon, 28 Jan 2002 14:14:18 -0500 Subject: why didn't it work? In-Reply-To: <001b01c1a82d$0052ddf0$5680a8c0@peeyushg> Message-ID: <39F112E4-1423-11D6-8C3D-003065C7DEAE@zope.com> actually it does not work well in the latest python-ldap. importing _ldap will not raise an ImportError. but _ldap is crippled and will blow up the first time you try to call something with it. everywhere i go on the python-ldap.sourceforge.net site the docs talk of the "_ldap" module and code examples use "import _ldap". that's probably why i assumed that that's the canonical way of doing things. i'm just wondering why in the world that's deprecated now and importing ldap is the only way it works. jens On Monday, January 28, 2002, at 01:52 , Peeyush Garg wrote: > As I see it in the latest code, I think both shud work.... > > try: > import _ldap > except ImportError: > import ldap > _ldap = ldap > > Except I couldn't still get it running either way on Unix but runs > perfectly > on Windows even though it installs correctly on Unix. I tried Zope mailing > list too. No luck. > > ~Peeyush. > > ----- Original Message ----- > From: "Jens Vagelpohl" > To: > Cc: "python-ldap-dev" > Sent: Monday, January 28, 2002 7:57 AM > Subject: Re: why didn't it work? > > > i'm very surprised. i was under the impression that it was just the other > way around: importing _ldap was the canonical way and importing ldap only > existed for backwards compatibility. > > i'm confused. > > jens > > > On Monday, January 28, 2002, at 10:29 , Michael Str?der wrote: > >> Jens Vagelpohl wrote: >>> >>> i'm getting complaints about this from people who use some of my >>> products >>> that rely on python-ldap. one guy uses a CVS checkout from january 4th. >>> is >>> the CVS version hosed? >> >> Don't import _ldap. Despite some code examples this was never good >> practice. >> >>> if I try to call the "_ldap.open" function, it fails : >>> module _ldap does not have such function. >> >> Yes. >> >>>>>> can you import "ldap"? >>> Yes, I can, and I can call functions "ldap.open", "ldap.bind_s", etc. >>> ******* >> >> There's no reason to import _ldap. Don't do that. Everything's >> wrapped correctly in module ldap.ldapobject. >> >> Ciao, Michael. > > > From michael at stroeder.com Tue Jan 29 09:21:16 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Tue, 29 Jan 2002 09:21:16 +0100 Subject: why didn't it work? References: <39F112E4-1423-11D6-8C3D-003065C7DEAE@zope.com> Message-ID: <3C565B7C.4454C3@stroeder.com> Jens Vagelpohl wrote: > > actually it does not work well in the latest python-ldap. importing _ldap > will not raise an ImportError. but _ldap is crippled and will blow up the > first time you try to call something with it. > > everywhere i go on the python-ldap.sourceforge.net site the docs talk of > the "_ldap" module and code examples use "import _ldap". The former code examples were obviously wrong. The code examples I've checked during the last months definitely did not import _ldap. > that's probably > why i assumed that that's the canonical way of doing things. > > i'm just wondering why in the world that's deprecated now and importing > ldap is the only way it works. Now I'm wondering why you folks on this list didn't respond to my messages weeks ago. The changes were announced and I asked for feedback. Check the archives. http://www.geocrawler.com/mail/msg.php3?msg_id=7383302&list=1568 http://www.geocrawler.com/mail/thread.php3?subject=Stripped+LDAPObject.c&list=1568 Note that there are significant changes going on. The Win32 binaries floating around are python-ldap version 1.x linked against ancient Umich libs whereas CVS version is linked against OpenLDAP 2 libs. I'm trying to preserve backwards compability but you have to definitely fix your code to import ldap not _ldap. Ciao, Michael. From jens at zope.com Tue Jan 29 14:19:12 2002 From: jens at zope.com (Jens Vagelpohl) Date: Tue, 29 Jan 2002 08:19:12 -0500 Subject: why didn't it work? In-Reply-To: <3C565B7C.4454C3@stroeder.com> Message-ID: well, i did see all those messages on the list but none of them say anything about "import _ldap" being deprecated, and there was no mentioning of "there's new code examples, make sure your code follows them. or no one ever said "don't use the exisiting docs, they are wrong". basically, there was a lot of talk about changes but none about the implications for people who use the python-ldap module. i suppose i could have pored over all the attached code and looked for it. .. (my attempt at irony) don't get me wrong, i appreciate all the work that you're putting into it. i only got peeved because people started bitching at me about my products no longer working because i had no warning :P the first thing out of my mouth was something like "wow, your python-ldap module must be really f*d up..." jens On Tuesday, January 29, 2002, at 03:21 , Michael Str?der wrote: > Jens Vagelpohl wrote: >> >> actually it does not work well in the latest python-ldap. importing _ldap >> will not raise an ImportError. but _ldap is crippled and will blow up the >> first time you try to call something with it. >> >> everywhere i go on the python-ldap.sourceforge.net site the docs talk of >> the "_ldap" module and code examples use "import _ldap". > > The former code examples were obviously wrong. The code examples > I've checked during the last months definitely did not import _ldap. > >> that's probably >> why i assumed that that's the canonical way of doing things. >> >> i'm just wondering why in the world that's deprecated now and importing >> ldap is the only way it works. > > Now I'm wondering why you folks on this list didn't respond to my > messages weeks ago. The changes were announced and I asked for > feedback. Check the archives. > > http://www.geocrawler.com/mail/msg.php3?msg_id=7383302&list=1568 > > http://www.geocrawler.com/mail/thread.php3?subject=Stripped+LDAPObject.c& > list=1568 > > Note that there are significant changes going on. The Win32 binaries > floating around are python-ldap version 1.x linked against ancient > Umich libs whereas CVS version is linked against OpenLDAP 2 libs. > I'm trying to preserve backwards compability but you have to > definitely fix your code to import ldap not _ldap. > > Ciao, Michael. From peeyushg at karna.com Tue Jan 29 09:45:32 2002 From: peeyushg at karna.com (Peeyush Garg) Date: Tue, 29 Jan 2002 00:45:32 -0800 Subject: why didn't it work? References: <39F112E4-1423-11D6-8C3D-003065C7DEAE@zope.com> <3C565B7C.4454C3@stroeder.com> Message-ID: <001d01c1a8f1$dc5cf9b0$5680a8c0@peeyushg> Michael, Your links point to mailing archives of around Dec 21, 2001. But, I checked out the LDAP module somewhere around Jan 3rd, 2002 and that's the code they contained. But, possibly I might have used the wrong command while checking out the module. I'll try it again. Thanks for the info. ~Peeyush. ----- Original Message ----- From: "Michael Str?der" To: "Jens Vagelpohl" Cc: Sent: Tuesday, January 29, 2002 12:21 AM Subject: Re: why didn't it work? > Jens Vagelpohl wrote: > > > > actually it does not work well in the latest python-ldap. importing _ldap > > will not raise an ImportError. but _ldap is crippled and will blow up the > > first time you try to call something with it. > > > > everywhere i go on the python-ldap.sourceforge.net site the docs talk of > > the "_ldap" module and code examples use "import _ldap". > > The former code examples were obviously wrong. The code examples > I've checked during the last months definitely did not import _ldap. > > > that's probably > > why i assumed that that's the canonical way of doing things. > > > > i'm just wondering why in the world that's deprecated now and importing > > ldap is the only way it works. > > Now I'm wondering why you folks on this list didn't respond to my > messages weeks ago. The changes were announced and I asked for > feedback. Check the archives. > > http://www.geocrawler.com/mail/msg.php3?msg_id=7383302&list=1568 > > http://www.geocrawler.com/mail/thread.php3?subject=Stripped+LDAPObject.c&lis t=1568 > > Note that there are significant changes going on. The Win32 binaries > floating around are python-ldap version 1.x linked against ancient > Umich libs whereas CVS version is linked against OpenLDAP 2 libs. > I'm trying to preserve backwards compability but you have to > definitely fix your code to import ldap not _ldap. > > Ciao, Michael. > > From jens at zope.com Tue Jan 29 20:18:58 2002 From: jens at zope.com (Jens Vagelpohl) Date: Tue, 29 Jan 2002 14:18:58 -0500 Subject: signature of ldap.open changed? Message-ID: <0B8E44EB-14ED-11D6-9312-003065C7DEAE@zope.com> now that i got beyond the changed importing semantics i notice that the "open" call to open a new connection has a *different* signature? can someone explain what the reasoning is? and, what's even more important, how is anyone supposed to support both versions and test for them successfully in the code without some really ugly workarounds? again, i don't see this documented anywhere unless i actually step into the code or notice the module spewing uncontrollable debug messages onto the console because what i pass in as the port number all of a sudden gets interpreted as a trace level... jens From michael at stroeder.com Wed Jan 30 23:30:05 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 30 Jan 2002 23:30:05 +0100 Subject: signature of ldap.open changed? References: <0B8E44EB-14ED-11D6-9312-003065C7DEAE@zope.com> Message-ID: <3C5873ED.5158D8F0@stroeder.com> Jens Vagelpohl wrote: > > now that i got beyond the changed importing semantics i notice that the > "open" call to open a new connection has a *different* signature? AFAIK there's no such thing as a "signature" in Python. > can someone explain what the reasoning is? and, what's even more important, > how is anyone supposed to support both versions and test for them > successfully in the code without some really ugly workarounds? I have to admit I've never used open() in that way. I've checked in a modified version compliant to the old docs. Michael. From michael at stroeder.com Wed Jan 30 23:30:45 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 30 Jan 2002 23:30:45 +0100 Subject: why didn't it work? References: Message-ID: <3C587415.8609158D@stroeder.com> Jens Vagelpohl wrote: > > well, i did see all those messages on the list but none of them say > anything about "import _ldap" being deprecated, and there was no mentioning > of "there's new code examples, make sure your code follows them. or no one > ever said "don't use the exisiting docs, they are wrong". You definitely ignored my requests to test the code. There was no feedback at all from the people complaining now. > basically, there was a lot of talk about changes but none about the > implications for people who use the python-ldap module. We're talking about the CVS version. If there should still be any progress possible with python-ldap it should be allowed to change things. I'm trying my best to preserve backwards compability but off course it needs testing. If folks are even too lazy to do very simple tests I can't help. Note that in your case the only fix needed is to import ldap instead _ldap. This should not be too hard for you. > i suppose i could have pored over all the attached code and looked for it. > .. (my attempt at irony) Yes, you should have glanced over this code or stay away from using a developer version. > don't get me wrong, i appreciate all the work that you're putting into it. Blah. > i only got peeved because people started bitching at me about my products > no longer working because i had no warning :P the first thing out of my > mouth was something like "wow, your python-ldap module must be really f*d > up..." Feel free to jump on in and do a better job. It's free software, not free beer. Michael. From jens at zope.com Fri Feb 1 13:52:38 2002 From: jens at zope.com (Jens Vagelpohl) Date: Fri, 1 Feb 2002 07:52:38 -0500 Subject: ANN: Python-LDAP 2.0.0pre02 In-Reply-To: <3C5A8BBD.E33796F0@stroeder.com> Message-ID: <928C606E-1712-11D6-B9EE-00039363690C@zope.com> hi michael, i'm getting this: >>> import ldap Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.1/site-packages/ldap/__init__.py", line 5, in ? from _ldap import * ImportError: liblber.so.2: cannot load shared object file: No such file or directory >>> i'm on YellowDog linux 2.1 (a redhat 7 clone for mac) with OpenLDAP 2.0.18 and Python2.1.2. the messages from setup.py build and setup.py compile did not contain any errors during compilation. is it just my setup or is there a problem? this worked fine with the previous release candidate you put on the sourceforge file list. jens On Friday, February 1, 2002, at 07:36 , Michael Str?der wrote: > HI! > > Another pre-release version of python-ldap is available at > > http://sourceforge.net/project/showfiles.php?group_id=2072 > > Please test! > > Ciao, Michael. > > From michael at stroeder.com Fri Feb 1 14:06:29 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 01 Feb 2002 14:06:29 +0100 Subject: ANN: Python-LDAP 2.0.0pre02 References: <928C606E-1712-11D6-B9EE-00039363690C@zope.com> Message-ID: <3C5A92D5.74266271@stroeder.com> Jens Vagelpohl wrote: > > >>> import ldap > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/local/lib/python2.1/site-packages/ldap/__init__.py", line 5, > in ? > from _ldap import * > ImportError: liblber.so.2: cannot load shared object file: No such file or > directory > >>> > > i'm on YellowDog linux 2.1 (a redhat 7 clone for mac) with OpenLDAP 2.0.18 > and Python2.1.2. the messages from setup.py build and setup.py compile did > not contain any errors during compilation. > > is it just my setup or is there a problem? this worked fine with the > previous release candidate you put on the sourceforge file list. This seems to be a problem with your OpenLDAP 2 shared libs. Check shared libs with $ ldd [Python lib dir]/site-packages/_ldap.so Make sure you have either configured /etc/ld.so.conf (invoke ldconfig after modifications) to contain directory lib/ of your local OpenLDAP 2 installation or set LD_LIBARY_PATH accordingly. If that does help since your on Mac architecture there might be other subtle problems I don't know of. Ciao, Michael. From jens at zope.com Fri Feb 1 14:37:57 2002 From: jens at zope.com (Jens Vagelpohl) Date: Fri, 1 Feb 2002 08:37:57 -0500 Subject: ANN: Python-LDAP 2.0.0pre02 In-Reply-To: <3C5A92D5.74266271@stroeder.com> Message-ID: michael, hm... very interesting. the lib directory was not in ld.so.conf. i'm surprised it never failed before... now everything seems OK. thanks! jens On Friday, February 1, 2002, at 08:06 , Michael Str?der wrote: > Jens Vagelpohl wrote: >> >>>>> import ldap >> Traceback (most recent call last): >> File "", line 1, in ? >> File "/usr/local/lib/python2.1/site-packages/ldap/__init__.py", line >> 5, >> in ? >> from _ldap import * >> ImportError: liblber.so.2: cannot load shared object file: No such file >> or >> directory >>>>> >> >> i'm on YellowDog linux 2.1 (a redhat 7 clone for mac) with OpenLDAP 2.0. >> 18 >> and Python2.1.2. the messages from setup.py build and setup.py compile >> did >> not contain any errors during compilation. >> >> is it just my setup or is there a problem? this worked fine with the >> previous release candidate you put on the sourceforge file list. > > This seems to be a problem with your OpenLDAP 2 shared libs. Check > shared libs with > > $ ldd [Python lib dir]/site-packages/_ldap.so > > Make sure you have either configured /etc/ld.so.conf (invoke > ldconfig after modifications) to contain directory lib/ of your > local OpenLDAP 2 installation or set LD_LIBARY_PATH accordingly. > > If that does help since your on Mac architecture there might be > other subtle problems I don't know of. > > Ciao, Michael. From michael at stroeder.com Fri Feb 1 14:40:32 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 01 Feb 2002 14:40:32 +0100 Subject: ANN: Python-LDAP 2.0.0pre02 References: <928C606E-1712-11D6-B9EE-00039363690C@zope.com> Message-ID: <3C5A9AD0.20CF7E35@stroeder.com> Jens Vagelpohl wrote: > > i'm getting this: > > >>> import ldap > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/local/lib/python2.1/site-packages/ldap/__init__.py", line 5, > in ? > from _ldap import * > ImportError: liblber.so.2: cannot load shared object file: No such file or > directory > >>> > > i'm on YellowDog linux 2.1 (a redhat 7 clone for mac) with OpenLDAP 2.0.18 > and Python2.1.2. the messages from setup.py build and setup.py compile did > not contain any errors during compilation. Sorry, I ran into a hen-and-egg problem: I wanted to avoid having to set the version number in two soures (setup.py and Lib/ldap/__init__.py). But one cannot import module ldap without installed _ldap before. :-( Please, check out new Python-LDAP 2.0.0pre03 which does not have this problem. Might take a while before it shows up. Grr, SF's file release system really sucks. Ciao, Michael. From michael at stroeder.com Fri Feb 1 18:43:52 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 01 Feb 2002 18:43:52 +0100 Subject: ANN: Python-LDAP 2.0.0pre02 References: Message-ID: <3C5AD3D8.57DB29D3@stroeder.com> Jens Vagelpohl wrote: > > On Friday, February 1, 2002, at 08:40 , Michael Str?der wrote: > > > > Sorry, I ran into a hen-and-egg problem: I wanted to avoid having to > > set the version number in two soures (setup.py and > > Lib/ldap/__init__.py). But one cannot import module ldap without > > installed _ldap before. :-( > > i don't quite follow you on this, it seemed to work fine on pre02... :) It worked for you since you already had an installed python-ldap. But keep testing anyway. Ciao, Michael. From jens at zope.com Fri Feb 1 16:03:01 2002 From: jens at zope.com (Jens Vagelpohl) Date: Fri, 1 Feb 2002 10:03:01 -0500 Subject: ANN: Python-LDAP 2.0.0pre02 In-Reply-To: <3C5A9AD0.20CF7E35@stroeder.com> Message-ID: i don't quite follow you on this, it seemed to work fine on pre02... :) pre03 compiles and works fine, too. (running on RH7.2, OpenLDAP 2.0.21, python2.1.2) jens On Friday, February 1, 2002, at 08:40 , Michael Str?der wrote: > > Sorry, I ran into a hen-and-egg problem: I wanted to avoid having to > set the version number in two soures (setup.py and > Lib/ldap/__init__.py). But one cannot import module ldap without > installed _ldap before. :-( > > Please, check out new Python-LDAP 2.0.0pre03 which does not have > this problem. Might take a while before it shows up. Grr, SF's file > release system really sucks. > > Ciao, Michael. > > From michael at stroeder.com Fri Feb 1 18:46:05 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 01 Feb 2002 18:46:05 +0100 Subject: signature of ldap.open changed? References: <0B8E44EB-14ED-11D6-9312-003065C7DEAE@zope.com> <3C5873ED.5158D8F0@stroeder.com> Message-ID: <3C5AD45D.11EDD35A@stroeder.com> Michael Str?der wrote: > > I have to admit I've never used open() in that way. I've checked in > a modified version compliant to the old docs. Note that ldap.open() wraps ldap_open() which is noted as deprecated in OpenLDAP 2's ldap.h. Try to use ldap.initialize() which wraps ldap_initialize() whereever possible. I've updated most code examples under Demo/. Ciao, Michael. From michael at stroeder.com Fri Feb 1 21:05:55 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 01 Feb 2002 21:05:55 +0100 Subject: Updated docs Message-ID: <3C5AF523.8D8C48F2@stroeder.com> HI! I did some documentation updates. See http://python-ldap.sourceforge.net/docs.shtml Even more nice would be if someone jumps on in. See documentation sources in Docs/lib*.tex of CVS tree. Ciao, Michael. From jlittle at open-it.org Fri Feb 1 21:28:33 2002 From: jlittle at open-it.org (Joe Little) Date: Fri, 01 Feb 2002 12:28:33 -0800 Subject: subtle breakage In-Reply-To: <3C5A8BBD.E33796F0@stroeder.com> Message-ID: I noticed something subtle that changed with the pre- releases. RPM and most unix packages are case sensitive just as their unix underpinnings are. So, Python-LDAP does not upgrade against python-ldap.. Currently, for my next build, I will need to explicitly target source files and still generate python-ldap-.rpm --- Do you want to a) break upgrade paths and keep the new name or b) revert back to the original name On 2/1/02 4:36 AM, "Michael Str?der" wrote: > HI! > > Another pre-release version of python-ldap is available at > > http://sourceforge.net/project/showfiles.php?group_id=2072 > > Please test! > > Ciao, Michael. > > From michael at stroeder.com Sat Feb 2 12:17:51 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Sat, 02 Feb 2002 12:17:51 +0100 Subject: subtle breakage References: Message-ID: <3C5BCADF.77F7B211@stroeder.com> Joe Little wrote: > > I noticed something subtle that changed with the pre- releases. RPM and most > unix packages are case sensitive just as their unix underpinnings are. > > So, Python-LDAP does not upgrade against python-ldap.. Currently, for my > next build, I will need to explicitly target source files and still generate > python-ldap-.rpm --- Do you want to IMHO David chose "Python-LDAP" for whatever reason. You didn't use DistUtils to build your RPM before, did you? > b) revert back to the original name No problem, I've commited setup.py with package name being set to "python-ldap". I'm also feeling more comfortable with this. Ciao, Michael. From jlittle at open-it.org Sat Feb 2 16:32:25 2002 From: jlittle at open-it.org (Joe Little) Date: Sat, 02 Feb 2002 07:32:25 -0800 Subject: subtle breakage In-Reply-To: <3C5BCADF.77F7B211@stroeder.com> Message-ID: I did use distutils. Until the 2.0.0pre series, including CVS, it called itself "python-ldap". On 2/2/02 3:17 AM, "Michael Str?der" wrote: > Joe Little wrote: >> >> I noticed something subtle that changed with the pre- releases. RPM and most >> unix packages are case sensitive just as their unix underpinnings are. >> >> So, Python-LDAP does not upgrade against python-ldap.. Currently, for my >> next build, I will need to explicitly target source files and still generate >> python-ldap-.rpm --- Do you want to > > IMHO David chose "Python-LDAP" for whatever reason. You didn't use > DistUtils to build your RPM before, did you? > >> b) revert back to the original name > > No problem, I've commited setup.py with package name being set to > "python-ldap". I'm also feeling more comfortable with this. > > Ciao, Michael. > > From michael at stroeder.com Sun Feb 3 00:01:04 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Sun, 03 Feb 2002 00:01:04 +0100 Subject: Importing LDIFs with Python-LDAP References: <1012677531.1452.11.camel@home.thenephilim.net> <1012683582.2634.6.camel@home.thenephilim.net> Message-ID: <3C5C6FAF.449BCE6D@stroeder.com> Peter van Rensburg wrote: > > The "dn: blabla" line is not preffered at the top of the ldif. Seems > like specifying the dn to ldap.add_s is enough. Duh. > > Somewhere between Python-LDAP and OpenLDAP it cannot handle multiple > lists with the same attribute name (in this case objectclass). This does > work with Netscape's directory server though. You should check out the module ldif and the sub-module ldap.modlist shipped with python-ldap for this kind of task. I have to admit that there's currently no good documentation, only pydoc generated stuff linked at http://python-ldap.sf.net/docs.html. Note that you have to take care that your LDIF file contains the entries in the right tree-like order. This is not necessarily true if exporting LDIF via e.g. OpenLDAP's ldapsearch tool. Ciao, Michael. From peter at systemsfusion.com Sat Feb 2 20:18:51 2002 From: peter at systemsfusion.com (Peter van Rensburg) Date: 02 Feb 2002 11:18:51 -0800 Subject: Importing LDIFs with Python-LDAP Message-ID: <1012677531.1452.11.camel@home.thenephilim.net> Hi I'm using openldap 2.0.22 and the latest Python-LDAP and python 2.2 (I also tried with a very old version of Python-LDAP and python 1.5.2 with the same results.) I stop openldap, rm all the .db files, start openldap, so it's a "fresh" install. The LDIF I'm trying to import looks like this: dn: o=DOTC objectclass: top objectclass: organization o: DOTC Using ldapadd: ~openldap/bin/ldapadd -x -D"cn=Directory Manager,o=DOTC" -w xx -f org2.ldif works fine without any errors. Using a basic python script, something like this: import sys import os import ldap import string def subString(strinput, begin, end=0): if 0 == end: end = len(strinput) result = "" for i in range(begin,end): result = result + strinput[i] return result def addLdif(ldapConn, dn, fileName): print "Entering addLdif()" try: dataFile = open(fileName, 'r') except: print "Error opening ldif file '" + fileName + "'" print "Aborting installation!" sys.exit() print "reading lines" fileData = dataFile.readlines() dataFile.close() print "done reading lines" ldapData = [] print "constructing _ldapData" print for line in fileData: print "looking at line: " + line index = string.find(line, ':') ldapData = ldapData + [(subString(line,0,index), [string.strip(subString(line,index+1))]), ] print "_ldapData = " print ldapData try: ldapConn.add_s(dn, ldapData) except: raise def main(argv): try: ldapObj = ldap.open("localhost", 389) ldapObj.simple_bind_s("cn=Directory Manager,o=DOTC", "xx") except: print "[main] Ldap open or bind failed!!" return 0 #try: addLdif(ldapObj, "o=DOTC", "org2.ldif") #except: # print "[main] addLdif failed!!" # return 0 if __name__ == '__main__': sys.exit(main(sys.argv)) produces the following error: File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line 121, in add_s self.result(msgid) File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line 355, in result ldap_result = self._ldap_call(self._l.result,msgid,0,0) File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line 59, in _ldap_call result = ldap._ldap_call(func,*args,**kwargs) File "/usr/local/lib/python2.2/site-packages/ldap/__init__.py", line 31, in _ldap_call result = apply(func,args,kwargs) ldap.UNDEFINED_TYPE: {'info': 'dn: attribute type undefined', 'desc': 'Undefined attribute type'} The first line in the LDIF being "dn: blabla" is specified in the RFC for LDIFs. If I remove that line (dn: o=DOTC) I get the following error: File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line 121, in add_s self.result(msgid) File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line 343, in result ldap_result = self._ldap_call(self._l.result,msgid,0,0) File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line 59, in _ldap_call result = ldap._ldap_call(func,*args,**kwargs) File "/usr/local/lib/python2.2/site-packages/ldap/__init__.py", line 31, in _ldap_call result = apply(func,args,kwargs) ldap.TYPE_OR_VALUE_EXISTS: {'info': 'attribute provided more than once', 'desc': 'Type or value exists'} This works fine (without the "dn: blabla" at the start of the ldif) with IPlanet/Netscape's directory server. Does anyone know what is going on here? Many thanks, Peter From peter at systemsfusion.com Sat Feb 2 21:59:42 2002 From: peter at systemsfusion.com (Peter van Rensburg) Date: 02 Feb 2002 12:59:42 -0800 Subject: Importing LDIFs with Python-LDAP In-Reply-To: <1012677531.1452.11.camel@home.thenephilim.net> References: <1012677531.1452.11.camel@home.thenephilim.net> Message-ID: <1012683582.2634.6.camel@home.thenephilim.net> Uhm okay. My bad. The "dn: blabla" line is not preffered at the top of the ldif. Seems like specifying the dn to ldap.add_s is enough. Duh. Somewhere between Python-LDAP and OpenLDAP it cannot handle multiple lists with the same attribute name (in this case objectclass). This does work with Netscape's directory server though. For those that care, I modified addLdif so it looks something like this, please bear in mind my inexperience (blatantly obvious I'm sure) with Python: def addLdif(ldapConn, dn, fileName): print "Entering addLdif()" try: dataFile = open(fileName, 'r') except: print "Error opening ldif file '" + fileName + "'" print "Aborting installation!" sys.exit() fileData = dataFile.readlines() dataFile.close() ldapData = [] ldapDataDictionary = {} for line in fileData: index = string.find(line, ':') attributeName = subString(line,0,index) attributeValue = string.strip(subString(line,index+1)) if attributeName in ldapDataDictionary.keys(): # make "deep" copy, reference copy gets screwed up somehow tempList = [] for atr in ldapDataDictionary[attributeName]: tempList.append(atr) tempList.append(attributeValue) ldapDataDictionary[attributeName] = tempList else: ldapDataDictionary[attributeName] = [ attributeValue ] for key in ldapDataDictionary.keys(): ldapData = ldapData + [( key, ldapDataDictionary[key]), ] try: ldapConn.add_s(dn, ldapData) except: raise Cheers, Peter On Sat, 2002-02-02 at 11:18, Peter van Rensburg wrote: > Hi > > I'm using openldap 2.0.22 and the latest Python-LDAP and python 2.2 (I > also tried with a very old version of Python-LDAP and python 1.5.2 with > the same results.) > > I stop openldap, rm all the .db files, start openldap, so it's a "fresh" > install. > > The LDIF I'm trying to import looks like this: > > dn: o=DOTC > objectclass: top > objectclass: organization > o: DOTC > > Using ldapadd: > ~openldap/bin/ldapadd -x -D"cn=Directory Manager,o=DOTC" -w xx -f > org2.ldif > > works fine without any errors. > > Using a basic python script, something like this: > > import sys > import os > import ldap > import string > > def subString(strinput, begin, end=0): > if 0 == end: > end = len(strinput) > > result = "" > for i in range(begin,end): > result = result + strinput[i] > > return result > > def addLdif(ldapConn, dn, fileName): > print "Entering addLdif()" > try: > dataFile = open(fileName, 'r') > except: > print "Error opening ldif file '" + fileName + "'" > print "Aborting installation!" > sys.exit() > > print "reading lines" > fileData = dataFile.readlines() > dataFile.close() > print "done reading lines" > > ldapData = [] > > print "constructing _ldapData" > print > for line in fileData: > print "looking at line: " + line > index = string.find(line, ':') > ldapData = ldapData + [(subString(line,0,index), > [string.strip(subString(line,index+1))]), ] > > print "_ldapData = " > print ldapData > > try: > ldapConn.add_s(dn, ldapData) > except: > raise > > def main(argv): > try: > ldapObj = ldap.open("localhost", 389) > ldapObj.simple_bind_s("cn=Directory Manager,o=DOTC", "xx") > except: > print "[main] Ldap open or bind failed!!" > return 0 > > #try: > addLdif(ldapObj, "o=DOTC", "org2.ldif") > #except: > # print "[main] addLdif failed!!" > # return 0 > > > if __name__ == '__main__': > sys.exit(main(sys.argv)) > > produces the following error: > > File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line > 121, in add_s > self.result(msgid) > File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line > 355, in result > ldap_result = self._ldap_call(self._l.result,msgid,0,0) > File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line > 59, in _ldap_call > result = ldap._ldap_call(func,*args,**kwargs) > File "/usr/local/lib/python2.2/site-packages/ldap/__init__.py", line > 31, in _ldap_call > result = apply(func,args,kwargs) > ldap.UNDEFINED_TYPE: {'info': 'dn: attribute type undefined', 'desc': > 'Undefined attribute type'} > > The first line in the LDIF being "dn: blabla" is specified in the RFC > for LDIFs. If I remove that line (dn: o=DOTC) I get the following error: > > File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line > 121, in add_s > self.result(msgid) > File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line > 343, in result > ldap_result = self._ldap_call(self._l.result,msgid,0,0) > File "/usr/local/lib/python2.2/site-packages/ldap/ldapobject.py", line > 59, in _ldap_call > result = ldap._ldap_call(func,*args,**kwargs) > File "/usr/local/lib/python2.2/site-packages/ldap/__init__.py", line > 31, in _ldap_call > result = apply(func,args,kwargs) > ldap.TYPE_OR_VALUE_EXISTS: {'info': 'attribute provided more than once', > 'desc': 'Type or value exists'} > > > This works fine (without the "dn: blabla" at the start of the ldif) with > IPlanet/Netscape's directory server. > > Does anyone know what is going on here? > > Many thanks, > Peter > From juha.o.ylitalo at nokia.com Mon Feb 4 15:51:01 2002 From: juha.o.ylitalo at nokia.com (Juha Ylitalo) Date: 04 Feb 2002 16:51:01 +0200 Subject: RedHat 7.2 + openldap security advisor => openldap 1.10alpha3 breaks down Message-ID: <1012834261.12412.54.camel@jylitbsd.lnx.nokia.com> We've been using Joe Little's old python-ldap 1.10alpha3 RPM packages (and versions, which we have rebuilt from same source RPM). This solution has worked beatifully all the way upto openldap 2.0.11. Then we got that security advisory from RedHat (http://www.redhat.com/support/errata/RHSA-2002-014.html) Since then we've been in following kind of situation: Python 1.5.2 (#1, Jul 5 2001, 03:02:19) [GCC 2.96 20000731 (Red Hat Linux 7.1 2 on linux-i386 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import ldap Traceback (innermost last): File "", line 1, in ? File "/usr/lib/python1.5/site-packages/python-ldap/ldap.py", line 2, in ? from _ldap import __version__ ImportError: /lib/libcrypt.so`: shared object not open >>> At first we tried to get around by rebuilding python-ldap package, but that didn't seem to solve the problem. When we checked for new python-ldap versions, they all seemed to require python 2.x, which is understandable considering how long python 2.x versions have been out and as such they won't solve our immediate problem. As far as I've understood RedHat is planning to keep their default python version at 1.5.2 until they come up with RedHat Linux 8.x box and for that reason, we would like to avoid version upgrade as well. So, if anyone has been able to get python-ldap to work in RedHat 7.2 Linux box with python 1.5.2 and openldap 2.0.21, I'd like to hear about it. P.S. Yes, I know that python2 package exists, but if upgrade python-ldap to depend on it, we would also have to upgrade py-gtk, py-gnome, ... -- Juha Ylitalo juha.o.ylitalo at nokia.com +358 40 562 6152 juha.ylitalo at iki.fi "Some tools are used, because its policy, others because they are good." From jlittle at open-it.org Mon Feb 4 18:16:10 2002 From: jlittle at open-it.org (Joe Little) Date: Mon, 04 Feb 2002 09:16:10 -0800 Subject: RedHat 7.2 + openldap security advisor => openldap 1.10alpha3 breaks down In-Reply-To: <1012834261.12412.54.camel@jylitbsd.lnx.nokia.com> Message-ID: Actually, RedHat renamed python-2 to python2 so that it co-exists with python-ldap. The issue with the libcrypt bit is that a newer version of openssl was used for OpenLDAP. You can get around this by rebuilding later OpenLDAP packages using the older openssl packages. I do not necessarily recommend this. Separate from this, you can rebuild the python-ldap RPMS with python 1.5.x, by simply changing the python version string through the spec file. On 2/4/02 6:51 AM, "Juha Ylitalo" wrote: > We've been using Joe Little's old python-ldap 1.10alpha3 RPM packages > (and versions, which we have rebuilt from same source RPM). This > solution has worked beatifully all the way upto openldap 2.0.11. > Then we got that security advisory from RedHat > (http://www.redhat.com/support/errata/RHSA-2002-014.html) > > Since then we've been in following kind of situation: > Python 1.5.2 (#1, Jul 5 2001, 03:02:19) [GCC 2.96 20000731 (Red Hat > Linux 7.1 > 2 on linux-i386 > Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>>> import ldap > Traceback (innermost last): > File "", line 1, in ? > File "/usr/lib/python1.5/site-packages/python-ldap/ldap.py", line 2, > in ? > from _ldap import __version__ > ImportError: /lib/libcrypt.so`: shared object not open >>>> > > At first we tried to get around by rebuilding python-ldap package, but > that didn't seem to solve the problem. When we checked for new > python-ldap versions, they all seemed to require python 2.x, which is > understandable considering how long python 2.x versions have been out > and as such they won't solve our immediate problem. As far as I've > understood RedHat is planning to keep their default python version at > 1.5.2 until they come up with RedHat Linux 8.x box and for that reason, > we would like to avoid version upgrade as well. > > So, if anyone has been able to get python-ldap to work in RedHat 7.2 > Linux box with python 1.5.2 and openldap 2.0.21, I'd like to hear about > it. > > P.S. Yes, I know that python2 package exists, but if upgrade python-ldap > to depend on it, we would also have to upgrade py-gtk, py-gnome, ... From jlittle at open-it.org Mon Feb 4 18:18:24 2002 From: jlittle at open-it.org (Joe Little) Date: Mon, 04 Feb 2002 09:18:24 -0800 Subject: RedHat 7.2 + openldap security advisor => openldap 1.10alpha3 breaks down In-Reply-To: Message-ID: I meant to say that python2 coexists with python (1.5.x). On 2/4/02 9:16 AM, "Joe Little" wrote: > > Actually, RedHat renamed python-2 to python2 so that it co-exists with > python-ldap. > > The issue with the libcrypt bit is that a newer version of openssl was used > for OpenLDAP. You can get around this by rebuilding later OpenLDAP packages > using the older openssl packages. I do not necessarily recommend this. > > Separate from this, you can rebuild the python-ldap RPMS with python 1.5.x, > by simply changing the python version string through the spec file. > > On 2/4/02 6:51 AM, "Juha Ylitalo" wrote: > >> We've been using Joe Little's old python-ldap 1.10alpha3 RPM packages >> (and versions, which we have rebuilt from same source RPM). This >> solution has worked beatifully all the way upto openldap 2.0.11. >> Then we got that security advisory from RedHat >> (http://www.redhat.com/support/errata/RHSA-2002-014.html) >> >> Since then we've been in following kind of situation: >> Python 1.5.2 (#1, Jul 5 2001, 03:02:19) [GCC 2.96 20000731 (Red Hat >> Linux 7.1 >> 2 on linux-i386 >> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>>>> import ldap >> Traceback (innermost last): >> File "", line 1, in ? >> File "/usr/lib/python1.5/site-packages/python-ldap/ldap.py", line 2, >> in ? >> from _ldap import __version__ >> ImportError: /lib/libcrypt.so`: shared object not open >>>>> >> >> At first we tried to get around by rebuilding python-ldap package, but >> that didn't seem to solve the problem. When we checked for new >> python-ldap versions, they all seemed to require python 2.x, which is >> understandable considering how long python 2.x versions have been out >> and as such they won't solve our immediate problem. As far as I've >> understood RedHat is planning to keep their default python version at >> 1.5.2 until they come up with RedHat Linux 8.x box and for that reason, >> we would like to avoid version upgrade as well. >> >> So, if anyone has been able to get python-ldap to work in RedHat 7.2 >> Linux box with python 1.5.2 and openldap 2.0.21, I'd like to hear about >> it. >> >> P.S. Yes, I know that python2 package exists, but if upgrade python-ldap >> to depend on it, we would also have to upgrade py-gtk, py-gnome, ... > > > From michael at stroeder.com Sat Feb 9 19:20:24 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Sat, 09 Feb 2002 19:20:24 +0100 Subject: TeX guru wanted for python-ldap docs Message-ID: <3C656868.DA6583D2@stroeder.com> Aaargh! Can someone please glance over the .tex sources in Doc/. I screwed up something but I'm completely lost. The \section{\module{ldap} --- LDAP library interface module} appears three times in the .pdf but not in the HTML output... Ciao, Michael. From donal.hunt2 at mail.dcu.ie Sun Feb 10 18:20:23 2002 From: donal.hunt2 at mail.dcu.ie (Donal Hunt) Date: Sun, 10 Feb 2002 17:20:23 +0000 Subject: Install problem [python-ldap-2.0.0pre04] Message-ID: <3C66ABD7.8E0539D0@mail.dcu.ie> Hey... Just upgraded to python-ldap-2.0.0pre04 today and tried the example in the README and got the following error. Have I setup something arseways? Regards Donal DCU setup.cfg From michael at stroeder.com Sun Feb 10 18:35:42 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Sun, 10 Feb 2002 18:35:42 +0100 Subject: Install problem [python-ldap-2.0.0pre04] References: <3C66ABD7.8E0539D0@mail.dcu.ie> Message-ID: <3C66AF6E.4979FECD@stroeder.com> Donal Hunt wrote: > > >>> l = ldap.initialize("earth.dcu.ie:389") In opposite to ldap.open() the function ldap.initialize() expects a LDAP URL as stated in ldap.initialize.__doc__ and the updated docs (see http://python-ldap.sourceforge.net/doc/python-ldap/node4.html). Therefore your funtion call has to be: >>> l = ldap.initialize("ldap://earth.dcu.ie:389") > ldap.LDAPError: (2, 'No such file or directory') > >>> This error message is misleading I admit. It comes from the OpenLDAP 2 libs. Hmm, ldap.initialize() could check for LDAP URL format to provide a better error message by raising a specific ValueError exception. Ciao, Michael. From michael at stroeder.com Sun Feb 10 19:04:46 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Sun, 10 Feb 2002 19:04:46 +0100 Subject: Install problem [python-ldap-2.0.0pre04] References: <3C66ABD7.8E0539D0@mail.dcu.ie> <3C66AF6E.4979FECD@stroeder.com> <3C66B037.2338BADA@mail.dcu.ie> Message-ID: <3C66B63E.182E5597@stroeder.com> Donal Hunt wrote: > > Is ldap.open still usable? Yes. Mainly ldap.open() generates a LDAP URL and calls ldap.initialize(). This is implemented in Python code (see Lib/ldap/functions.py). > or is the new standard to use LDAP URLs?? It is the new standard. OpenLDAP 2's ldap.h marks ldap_open() as deprecated. Well, this does not mean a lot but ldap.initialize() also enables your application to use ldaps:// (LDAP over SSL to separate port) and ldapi:// (LDAP over Unix domain socket). Ciao, Michael. From jajcus at bnet.pl Sun Feb 10 21:10:23 2002 From: jajcus at bnet.pl (Jacek Konieczny) Date: Sun, 10 Feb 2002 21:10:23 +0100 Subject: Install problem [python-ldap-2.0.0pre04] In-Reply-To: <3C66B63E.182E5597@stroeder.com> References: <3C66ABD7.8E0539D0@mail.dcu.ie> <3C66AF6E.4979FECD@stroeder.com> <3C66B037.2338BADA@mail.dcu.ie> <3C66B63E.182E5597@stroeder.com> Message-ID: <20020210201023.GC6671@nic.bnet.pl> On Sun, Feb 10, 2002 at 07:04:46PM +0100, Michael Str?der wrote: > > or is the new standard to use LDAP URLs?? > > It is the new standard. OpenLDAP 2's ldap.h marks ldap_open() as > deprecated. AFAIK it is pepreciated in favor of ldap_init() (which initializes connection object, but doesn't connect till the first operation). ldap_initialize() is a quite different thing, IMHO much more usefull. Greets, Jacek From michael at stroeder.com Mon Feb 11 00:09:10 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Mon, 11 Feb 2002 00:09:10 +0100 Subject: Install problem [python-ldap-2.0.0pre04] References: <3C66ABD7.8E0539D0@mail.dcu.ie> <3C66AF6E.4979FECD@stroeder.com> <3C66B037.2338BADA@mail.dcu.ie> <3C66B63E.182E5597@stroeder.com> <20020210201023.GC6671@nic.bnet.pl> Message-ID: <3C66FD96.62F5E1BE@stroeder.com> Jacek Konieczny wrote: > > On Sun, Feb 10, 2002 at 07:04:46PM +0100, Michael Str?der wrote: > > > or is the new standard to use LDAP URLs?? > > > > It is the new standard. OpenLDAP 2's ldap.h marks ldap_open() as > > deprecated. > AFAIK it is pepreciated in favor of ldap_init() (which initializes > connection object, but doesn't connect till the first operation). > > ldap_initialize() is a quite different thing, IMHO much more usefull. Hmm, what to do? I stripped the wrapping functions for ldap_open() and ldap_init() from LDAPObject.c. Is anyone in favour of having these wrapped directly? I would rather vote for making ldap.initialize() more smart or implement a smart separate function. E.g. trying to set the right protocol version would be nice (try LDAPv3 first and correctly fall back to LDAPv2). Ciao, Michael. From danielgoodwin at yahoo.com Mon Feb 11 14:51:08 2002 From: danielgoodwin at yahoo.com (Tony Goodwin) Date: Mon, 11 Feb 2002 13:51:08 -0000 Subject: cygwin and python-ldap Message-ID: Trying to build pre04 on cygwin using openldap 2.0.21, python 2.2 First problem was not finding lib resolv, though removing it from setup.cfg doesn't seem to affect anything Next problem is that I get a lot of ber_printf (and ber_scanf ..) symbols not found from openldap origins I ain't no expert, but it seems to be building a shared library, and complaining about symbols not found in openldap (which has built OK .. though untested yet) Any help appreciated Tony gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-1.3.9-i686-2.2/LDAPOb ject.o build/temp.cygwin-1.3.9-i686-2.2/common.o build/temp.cygwin-1.3.9-i686-2. 2/constants.o build/temp.cygwin-1.3.9-i686-2.2/errors.o build/temp.cygwin-1.3.9- i686-2.2/functions.o build/temp.cygwin-1.3.9-i686-2.2/ldapmodule.o build/temp.cy gwin-1.3.9-i686-2.2/linkedlist.o build/temp.cygwin-1.3.9-i686-2.2/message.o buil d/temp.cygwin-1.3.9-i686-2.2/template.o build/temp.cygwin-1.3.9-i686-2.2/version .o build/temp.cygwin-1.3.9-i686-2.2/options.o -L/usr/local/src/openldap-2.0.21/ l ibraries -L/usr/local/lib/python2.2/config -llber -lldap -lpython2.2 -o build/li b.cygwin-1.3.9-i686-2.2/_ldap.dll /usr/local/src/openldap-2.0.21/libraries/libldap.a(search.o): In function `ldap_ build_search_req': /usr/local/src/openldap-2.0.21/libraries/libldap/search.c:300: undefined referen ce to `ber_printf' /usr/local/src/openldap-2.0.21/libraries/libldap/search.c:326: undefined referen From jason at tishler.net Mon Feb 11 15:32:52 2002 From: jason at tishler.net (Jason Tishler) Date: Mon, 11 Feb 2002 09:32:52 -0500 Subject: cygwin and python-ldap In-Reply-To: References: Message-ID: <20020211143251.GH2256@dothill.com> Tony, On Mon, Feb 11, 2002 at 01:51:08PM +0000, Tony Goodwin wrote: > Next problem is that I get a lot of ber_printf (and ber_scanf ..) symbols > not found from openldap origins > I ain't no expert, but it seems to be building a shared library, and > complaining about symbols not found in > openldap (which has built OK .. though untested yet) > > Any help appreciated > > gcc -shared -Wl,--enable-auto-image-base ... > [snip] > /usr/local/src/openldap-2.0.21/libraries/libldap.a(search.o): In function > `ldap_build_search_req': > /usr/local/src/openldap-2.0.21/libraries/libldap/search.c:300: undefined > reference to `ber_printf' > /usr/local/src/openldap-2.0.21/libraries/libldap/search.c:326: undefined > referen Please try the setup.cfg mentioned in: http://www.geocrawler.com/archives/3/1568/2002/1/0/7452037/ and report back as to whether or not this solves your problem. I think you are having a library ordering problem. I certainly did when I used the order of the (commented out) libraries in the default setup.cfg. Thanks, Jason From michael at stroeder.com Tue Feb 12 15:21:56 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Tue, 12 Feb 2002 15:21:56 +0100 Subject: cygwin and python-ldap References: Message-ID: <3C692504.B7C11FC4@stroeder.com> Tony Goodwin wrote: > > Thanks Jason, > Reorder of ldap and lber libs in setup.cfg worked I've checked in a new setup.cfg with reordered line libs and two different examples. Please comment. Please check it out from CVS. Ciao, Michael. --------------------------- snip --------------------------- # Section for compiling the C extension module # for wrapping OpenLDAP 2 libs [_ldap] class = OpenLDAP2 library_dirs = /usr/local/openldap2/lib include_dirs = /usr/local/openldap2/include # Standard build libs = ldap lber # Some Linux systems might need explicitly linking with -lresolv #libs = ldap lber resolv # For building with cygwin #libs = ldap lber ssl crypto --------------------------- snip --------------------------- From danielgoodwin at yahoo.com Tue Feb 12 00:14:08 2002 From: danielgoodwin at yahoo.com (Tony Goodwin) Date: Mon, 11 Feb 2002 23:14:08 -0000 Subject: cygwin and python-ldap In-Reply-To: Message-ID: Thanks Jason, Reorder of ldap and lber libs in setup.cfg worked From leif at propel.com Mon Feb 11 22:07:44 2002 From: leif at propel.com (Leif Hedstrom) Date: Mon, 11 Feb 2002 13:07:44 -0800 Subject: Why does writing STDOUT affect my Python LDAP performance? Message-ID: <3C6832A0.5050809@propel.com> Hi, I wanted to write a very small app to do some simple tests, and I got some very, very strange results. I can't understand why the performance is so abysmal unless I print on STDOUT... The script is something like: #!/usr/bin/python2 import ldap l = ldap.open("localhost") l.simple_bind_s("", "") loop = 1000 while loop: loop = loop - 1 print "Going into LDAP, loop is ", loop res = l.search_s( "dc=propel,dc=com", ldap.SCOPE_SUBTREE, "cn=Manager" ) print "Done with search" l.unbind() (I added the print statements to show my problem). Here are the time resusts from two test runs: 269% time test.py . . . Done with search 2.180u 0.480s 0:06.85 38.8% 0+0k 0+0io 656pf+0w loki 270% time /tmp/simple.py > /dev/null 115.770u 32.230s 2:31.46 97.7% 0+0k 0+0io 651pf+0w Without redirecting STDOUT (lots of spam on the display), it takes about 6 secs, when I do redirect STDOUT to devnull it takes 150 seconds (25x slower). This makes no sense to me at all... Also, this simple script leaks memory, not sure where yet. Any ideas where to look? I'm using Python 2.1.2, OpenLDAP 2.0.22 and latest Python LDAP source from the CVS server. Thanks, -- leif From michael at stroeder.com Tue Feb 12 13:18:05 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Tue, 12 Feb 2002 13:18:05 +0100 Subject: Why does writing STDOUT affect my Python LDAP performance? References: <3C6832A0.5050809@propel.com> Message-ID: <3C6907FD.927E8FC0@stroeder.com> Leif Hedstrom wrote: > > I wanted to write a very small app to do some simple tests, and I got > some very, very strange results. I can't understand why the performance > is so abysmal unless I print on STDOUT... The script is something like: > [..test script snipped..] I've added measuring the time to the script itself and can't reproduce your results (tested with python2.0, python2.1.1 and python2.2). In my case redirecting stdout to /dev/null was faster. How did you do time measuring? Maybe somebody screwed up /dev/null on your system? BTW: Remember to use l.set_option(ldap.OPT_PROTOCOL_VERSION,ldap.VERSION3) to set protocol version to LDAPv3. > Also, this simple script leaks memory, not sure where yet. Hmm, interesting question. Any C hacker with a license of e.g. Purify willing to dig into this? Ciao, Michael. From leif at propel.com Tue Feb 12 18:33:28 2002 From: leif at propel.com (Leif Hedstrom) Date: Tue, 12 Feb 2002 09:33:28 -0800 Subject: Why does writing STDOUT affect my Python LDAP performance? References: <3C6832A0.5050809@propel.com> <3C6907FD.927E8FC0@stroeder.com> Message-ID: <3C6951E8.90202@propel.com> Michael Str?der wrote: >I've added measuring the time to the script itself and can't >reproduce your results (tested with python2.0, python2.1.1 and >python2.2). In my case redirecting stdout to /dev/null was faster. >How did you do time measuring? Maybe somebody screwed up /dev/null >on your system? > Well, the good news is that I've solved my problem, and it's not related to Python LDAP at all. :-). I wrote a small C-program that also reproduced the same problem. So, this narrowed it down to a few things: C-compiler, glibc or kernel. I hadn't touched the first two in quite a while, but I did upgrade the kernel a week ago... So, I rolled back to 2.4.7 (from 2.4.17), and now my problem is gone. Don't ask me what happend with the 2.4.17 kernel, I hadn't noticed any problems or errors at all after the upgrade (RPM from Rawhide), but something is not good... The module still leaks memory though, I'll poke at that little later. Thanks again for the help, so I could narrow things down to the real problem. :-) Thanks, -- Leif From jens at zope.com Tue Feb 12 19:03:06 2002 From: jens at zope.com (Jens Vagelpohl) Date: Tue, 12 Feb 2002 13:03:06 -0500 Subject: TeX guru wanted for python-ldap docs In-Reply-To: <3C656868.DA6583D2@stroeder.com> Message-ID: michael, i am looking at those tex files (from current HEAD checkout) right now and it complains about some missing files:: - version.tex (included in python-ldap.tex at the top) - modpython-ldap.ind (pops up when processing ldap.tex at the very end where it says "\subsection{Example \label{ldap-example}}" mind you, i am not a tex guru myself. are there files that need to be checked into the repository? jens On Saturday, February 9, 2002, at 01:20 , Michael Str?der wrote: > Aaargh! > > Can someone please glance over the .tex sources in Doc/. I screwed > up something but I'm completely lost. > > The \section{\module{ldap} --- LDAP library interface module} > appears three times in the .pdf but not in the HTML output... > > Ciao, Michael. > > From michael at stroeder.com Tue Feb 12 19:23:22 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Tue, 12 Feb 2002 19:23:22 +0100 Subject: TeX guru wanted for python-ldap docs References: Message-ID: <3C695D9A.A1524F5F@stroeder.com> Thanks for looking at it. Jens Vagelpohl wrote: > > i am looking at those tex files (from current HEAD checkout) right now and > it complains about some missing files:: > > - version.tex (included in python-ldap.tex at the top) > - modpython-ldap.ind (pops up when processing ldap.tex at the very end > where it says "\subsection{Example \label{ldap-example}}" Both files are generated on the fly. version.tex is generated in the Makefile. You have to start make in the Doc/ directory. Hmm, I corrected the Makefile to work on my platform. Not sure if that works on every system though. modpython-ldap.ind (the module index) is also generated correctly on my system and included in either the PDF and the HTML output. I'm using the necessary TeX packages shipped with my SuSE Linux 7.1 installation. Ciao, Michael. From jens at zope.com Tue Feb 12 19:40:30 2002 From: jens at zope.com (Jens Vagelpohl) Date: Tue, 12 Feb 2002 13:40:30 -0500 Subject: TeX guru wanted for python-ldap docs In-Reply-To: <3C695D9A.A1524F5F@stroeder.com> Message-ID: michael, sorry, that was a false alarm. everything builds OK with the Makefile (after correcting some paths), i just used the wrong tool (TeXShop on Mac OS X) to do it and it stumbled over stuff that the Makefile was supposed to generate on the fly before processing the tex inputs. i do see the issues that you mentioned with the triple sections. i'll see if i can try to look at it with my limited experience... :) jens On Tuesday, February 12, 2002, at 01:23 , Michael Str?der wrote: > Thanks for looking at it. > > Jens Vagelpohl wrote: >> >> i am looking at those tex files (from current HEAD checkout) right now >> and >> it complains about some missing files:: >> >> - version.tex (included in python-ldap.tex at the top) >> - modpython-ldap.ind (pops up when processing ldap.tex at the very end >> where it says "\subsection{Example \label{ldap-example}}" > > Both files are generated on the fly. > > version.tex is generated in the Makefile. You have to start make in > the Doc/ directory. Hmm, I corrected the Makefile to work on my > platform. Not sure if that works on every system though. > > modpython-ldap.ind (the module index) is also generated correctly on > my system and included in either the PDF and the HTML output. I'm > using the necessary TeX packages shipped with my SuSE Linux 7.1 > installation. > > Ciao, Michael. > > From michael at stroeder.com Wed Feb 13 01:49:25 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Wed, 13 Feb 2002 01:49:25 +0100 Subject: Added method LDAPObject.supported_ldap_version() Message-ID: <3C69B815.E435677@stroeder.com> HI! I've committed a method LDAPObject.supported_ldap_version() to Lib/ldap/ldapobject.py in CVS. See the code snippet below. Please comment whether you find it useful or annoying. Personally I'm using this code in web2ldap for quite some while now and it seems to work with LDAP servers from several vendors. Hmm, I also thought about placing something like this in LDAPObject.bind() to avoid an extra BindRequest. But this might be too much hidden magic. Ciao, Michael. From jason at tishler.net Fri Feb 15 21:26:09 2002 From: jason at tishler.net (Jason Tishler) Date: Fri, 15 Feb 2002 15:26:09 -0500 Subject: cygwin and python-ldap In-Reply-To: <3C692504.B7C11FC4@stroeder.com> References: <3C692504.B7C11FC4@stroeder.com> Message-ID: <20020215202609.GN600@hp.com> Michael, On Tue, Feb 12, 2002 at 03:21:56PM +0100, Michael Str?der wrote: > Tony Goodwin wrote: > > Thanks Jason, > > Reorder of ldap and lber libs in setup.cfg worked > > I've checked in a new setup.cfg with reordered line libs and two > different examples. Please comment. The new setup.cfg looks good. Note that the extra libraries for Cygwin are only necessary because Cygwin Python is currently built with a static _socket module to workaround a fork() problem. Once my rebase patch is accepted into Cygwin setup.exe, then I will re-release Cygwin Python with a shared _socket module (as normal). At that point, the Cygwin lines should be removed and Cygwin python-ldap should build with the default setup.cfg. Thanks, Jason From jmayorga5 at yahoo.com Sat Feb 16 23:30:36 2002 From: jmayorga5 at yahoo.com (John E. Mayorga) Date: Sat, 16 Feb 2002 14:30:36 -0800 (PST) Subject: installation issues Message-ID: <20020216223036.61155.qmail@web13902.mail.yahoo.com> I've read the mailing list archives, the docs, the FAQ, done multiple searches with google, tried, and experimented, and now I have to ask: what's wrong with this? I'm getting the following error when running make (or "python setup.py build" for that matter): Traceback (innermost last): File "setup.py", line 38, in ? if cfg.has_option('_ldap', 'class'): AttributeError: has_option make: *** [build] Error 1 Here is my setup.cfg: ------------------------------------------------------------------------------------ # Section for compiling the C extension module # for wrapping OpenLDAP 2 libs [_ldap] class = OpenLDAP2 library_dirs = /usr/local/lib include_dirs = /usr/local/include libs = lber ldap resolv # Installation options [install] compile = 1 optimize = 1 ------------------------------------------------------------------------------------ I simply "tar zxvf python-ldap-2.0.0pre4.tar.gz", cd to the resulting directory, tweak the setup.cfg to the above, and run make. I'm running a plain vanilla RedHat 7.2 with a fresh install of openldap-2.0.23 using the simple instructions for compiling, testing, and installing it. My goal is to get web2ldap running, and I've worked on this little problem for over a day. Please embarass me by offering a simple solution. :-) John --------------------------------- Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at stroeder.com Sun Feb 17 00:06:19 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Sun, 17 Feb 2002 00:06:19 +0100 Subject: installation issues References: <20020216223036.61155.qmail@web13902.mail.yahoo.com> Message-ID: <3C6EE5EB.35E00029@stroeder.com> "John E. Mayorga" wrote: > > I've read the mailing list archives, the docs, the FAQ, done > multiple searches with google, tried, and experimented, and now I > have to ask: what's wrong with this? > > I'm getting the following error when running make (or "python > setup.py build" for that matter): > > Traceback (innermost last): > File "setup.py", line 38, in ? > if cfg.has_option('_ldap', 'class'): > AttributeError: has_option > make: *** [build] Error 1 Hmm, which version of Python and which version of DistUtils? Note that python-ldap2.0.0pre has not been tested on Python 1.5.x. It should work (except module ldapurl). Ciao, Michael. From jmayorga5 at yahoo.com Sun Feb 17 02:50:24 2002 From: jmayorga5 at yahoo.com (John E. Mayorga) Date: Sat, 16 Feb 2002 17:50:24 -0800 (PST) Subject: installation issues In-Reply-To: <3C6EE5EB.35E00029@stroeder.com> Message-ID: <20020217015024.23287.qmail@web13906.mail.yahoo.com> Micheal, Thank you for your response. RedHat 7.2 seems to have both Python 1.5.2 and 2.1.1 in the distribution. There is a /usr/bin/python, but I don't even know how to determine the version of that, or of DistUtils for that matter. Each version of Python in /usr/lib has it's own distutils. At this point, I have to admit that, although I've worked with Linux for years, this is my first experience with Python. I'll try to determine the versions, assuming that will fix the problem. Any help in doing so would be greatly appreciated. Thank you, John Michael Str?der wrote: "John E. Mayorga" wrote: > > I've read the mailing list archives, the docs, the FAQ, done > multiple searches with google, tried, and experimented, and now I > have to ask: what's wrong with this? > > I'm getting the following error when running make (or "python > setup.py build" for that matter): > > Traceback (innermost last): > File "setup.py", line 38, in ? > if cfg.has_option('_ldap', 'class'): > AttributeError: has_option > make: *** [build] Error 1 Hmm, which version of Python and which version of DistUtils? Note that python-ldap2.0.0pre has not been tested on Python 1.5.x. It should work (except module ldapurl). Ciao, Michael. --------------------------------- Do You Yahoo!? Got something to say? Say it better with Yahoo! Video Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmayorga5 at yahoo.com Sun Feb 17 03:03:32 2002 From: jmayorga5 at yahoo.com (John E. Mayorga) Date: Sat, 16 Feb 2002 18:03:32 -0800 (PST) Subject: installation issues In-Reply-To: <3C6EE5EB.35E00029@stroeder.com> Message-ID: <20020217020332.62439.qmail@web13904.mail.yahoo.com> Michael, An "rpm -q python" coughs up "python-1.5.3-35" I guess I'll download, compile, and install the latest stable Python and get back to you. Thanks again. John Michael Str?der wrote: "John E. Mayorga" wrote: > > I've read the mailing list archives, the docs, the FAQ, done > multiple searches with google, tried, and experimented, and now I > have to ask: what's wrong with this? > > I'm getting the following error when running make (or "python > setup.py build" for that matter): > > Traceback (innermost last): > File "setup.py", line 38, in ? > if cfg.has_option('_ldap', 'class'): > AttributeError: has_option > make: *** [build] Error 1 Hmm, which version of Python and which version of DistUtils? Note that python-ldap2.0.0pre has not been tested on Python 1.5.x. It should work (except module ldapurl). Ciao, Michael. --------------------------------- Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlittle at open-it.org Sun Feb 17 06:04:57 2002 From: jlittle at open-it.org (Joe Little) Date: Sat, 16 Feb 2002 21:04:57 -0800 Subject: installation issues In-Reply-To: <20020217020332.62439.qmail@web13904.mail.yahoo.com> Message-ID: redhat 7.2 has python2 rpms that coincide with the python 1.x. You?ll need to check for python2 with ?rpm ?q python2? -- if its not there, grab it from your local mirror. As for Michael?s suggestion, my python-ldap is built against the same python2 rpm that RedHat provides. I?ll be building python-ldap-2.0.0pre5 shortly. On 2/16/02 6:03 PM, "John E. Mayorga" wrote: > Michael, > > An "rpm -q python" coughs up "python-1.5.3-35" > > I guess I'll download, compile, and install the latest stable Python and get > back to you. > > Thanks again. > > John > > > > Michael Str?der wrote: >> "John E. Mayorga" wrote: >>> > >>> > I've read the mailing list archives, the docs, the FAQ, done >>> > multiple searches with google, tried, and experimented, and now I >>> > have to ask: what's wrong with this? >>> > >>> > I'm getting the following error when running make (or "python >>> > setup.py build" for that matter): >>> > >>> > Traceback (innermost last): >>> > File "setup.py", line 38, in ? >>> > if cfg.has_option('_ldap', 'class'): >>> > AttributeError: has_option >>> > make: *** [build] Error 1 >> >> Hmm, which version of Python and which version of DistUtils? >> >> Note that python-ldap2.0.0pre has not been tested on Python 1.5.x. >> It should work (except module ldapurl). >> >> Ciao, Michael. > > > Do You Yahoo!? > Yahoo! Sports - Coverage of the 2002 Olympic > Games -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at stroeder.com Sun Feb 17 03:16:31 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Sun, 17 Feb 2002 03:16:31 +0100 Subject: installation issues References: <20020216223036.61155.qmail@web13902.mail.yahoo.com> Message-ID: <3C6F127E.E2A64171@stroeder.com> "John E. Mayorga" wrote: > > RedHat 7.2 seems to have both Python 1.5.2 and 2.1.1 in the distribution. You might want to see http://python-ldap.sf.net/download.shtml for a link to Joe's Red Hat RPMs. > There is a /usr/bin/python, but I don't > even know how to determine the version of that, or of DistUtils for that matter. If you invoke the interpreter (e.g. /usr/bin/python) the version is printed in the interactive interpreter shell. Press ^D to exit the interpreter. > Each version of Python in /usr/lib has it's own distutils. Which Python version do you want to use? I'd suggest to go for Python 2.1.1. > At this point, I have to admit that, although I've worked with Linux > for years, this is my first experience with Python. Maybe it helps if you tell us what you want to do. Ciao, Michael. From michael at stroeder.com Sun Feb 17 13:00:47 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Sun, 17 Feb 2002 13:00:47 +0100 Subject: python-ldap-2.0.0pre5 (was: installation issues) References: Message-ID: <3C6F9B6F.2F65EC06@stroeder.com> Joe Little wrote: > > I'll be building python-ldap-2.0.0pre5 shortly. Which is just the CVS version. No pre-release yet of this number. But as usual I'd like to encourage everyone to test it. I also would appreciate if someone could do some reviews of LDAPObject.c to track down the memory leaks. Leaking is reproducable with very simple script just doing the same searches over and over again. Ciao, Michael. From jlittle at open-it.org Tue Feb 19 02:53:28 2002 From: jlittle at open-it.org (Joe Little) Date: Mon, 18 Feb 2002 17:53:28 -0800 Subject: python-ldap-2.0.0pre04 RPMs posted Message-ID: On ftp://ftp.open-it.org/pub/redhat7.2 is the latest python-ldap RPMs. I can report that they work against my current codebase of DirectoryAdministrator 2.0 (yeah!!) BTW, I am using ldap.init() -- which recently was indicated as the correct method and not ldap.open(). I ran into some issues with expected results from executing ldap.initialize. Perchance this is a work in progress, as ldap.init looked like it was just going to return with a URI and instead it returned a correct LDAP fd. Then again, I'm just trying to get my code to work and not looking at the python-ldap code base much. Once pre05 is available "official", I'll post that. From christian_wiese at web.de Thu Feb 21 19:25:30 2002 From: christian_wiese at web.de (Christian Wiese) Date: Thu, 21 Feb 2002 19:25:30 +0100 Subject: objectclass attributes Message-ID: <16dyW3-2GMdouC@fmrl07.sul.t-online.com> Hi All, is there a way to get all possible attributes of an objectclass with python-ldap? Greetings Christian From michael at stroeder.com Fri Feb 22 19:26:46 2002 From: michael at stroeder.com (Michael =?iso-8859-1?Q?Str=F6der?=) Date: Fri, 22 Feb 2002 19:26:46 +0100 Subject: objectclass attributes References: <16dyW3-2GMdouC@fmrl07.sul.t-online.com> Message-ID: <3C768D66.71EDD92@stroeder.com> Christian Wiese wrote: > > is there a way to get all possible attributes of an objectclass with > python-ldap? Normally it's returned in the results if you do a normal search operation. If it's not present in the entry's dictionary some ACLs might be in effect which is very unlikely for objectClass attribute though. Ciao, Michael. From christian_wiese at web.de Sat Feb 23 14:54:09 2002 From: christian_wiese at web.de (Christian Wiese) Date: Sat, 23 Feb 2002 14:54:09 +0100 Subject: objectclass attributes In-Reply-To: <3C768D66.71EDD92@stroeder.com> References: <16dyW3-2GMdouC@fmrl07.sul.t-online.com> <3C768D66.71EDD92@stroeder.com> Message-ID: Hello Michael, thank you for your reply. I'm looking for a way to get the schema definitions out of an OpenLDAP server, because I've extended my schema for special services like qmail and qmailControl, and I want to have a mechanism to get all the possible attributes of an objectclass out of a schema definition. It should not depending on if I used this objectclass allready. Thank you for you support. Greetings Christian Am Freitag, 22. Februar 2002 19:26 schrieben Sie: > Christian Wiese wrote: > > is there a way to get all possible attributes of an objectclass with > > python-ldap? > > Normally it's returned in the results if you do a normal search > operation. > > If it's not present in the entry's dictionary some ACLs might be in > effect which is very unlikely for objectClass attribute though. > > Ciao, Michael. From michael at stroeder.com Sat Feb 23 15:08:23 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Sat, 23 Feb 2002 15:08:23 +0100 Subject: objectclass attributes References: <16dyW3-2GMdouC@fmrl07.sul.t-online.com> <3C768D66.71EDD92@stroeder.com> Message-ID: <3C77A257.10903@stroeder.com> Christian Wiese wrote: > > Am Freitag, 22. Februar 2002 19:26 schrieben Sie: > >>Christian Wiese wrote: >> >>> is there a way to get all possible attributes of an >>> objectclass with python-ldap? >>> >>Normally it's returned in the results if you do a normal search >>operation. > > I'm looking for a way to get the schema definitions out of an OpenLDAP > server, Sorry, I obviously misread your question. No, there's currently no support for parsing the subschemaSubentry in python-ldap. It's in the TODO. Feel free to contribute. I know that Jacek did some work for parsing subschema in his curses-based LDAP client. Ciao, Michael. From jlittle at open-it.org Mon Feb 25 23:59:14 2002 From: jlittle at open-it.org (Joe Little) Date: Mon, 25 Feb 2002 14:59:14 -0800 Subject: change in python-ldap method? Message-ID: Hello all, In my latest project, I am exercising various parts of the Python-LDAP in my wrapper API to see that everything works. Back in June, I had two methods, an ldap entry refresh() and a commit(). These worked without a hitch, and against data such as /etc/service entries in LDAP. Now, I do get an error, and perhaps someone can enlighten me on what has changed and why. Specifically, there is an entry in /etc/services for whois++. My refresh() method calls ldap.explode_dn(leaf_entry) whereby leaf_entry is an attr dictionary ala what python-ldap normally results as results. When it explodes the DN out of my entry, its string result is: "(cn=whois\+\+)" However, even before I explode it, I already see the DN is stored in my res as whois\+\+. Searching on this DN results in an ldap.FILTER_ERROR: {'desc': 'Bad search filter', 'info': ''} whois++ has been in /etc/services for quite some time. So one of two things has happened: 1) python-ldap has changed behavior in some way (whether first pull of data or search filter usage) 2) MigrationTools (used to load up NIS type data to LDAP) from padl.com, which fixed certain things associated with + and other symbols, can load data correctly into LDAP with Perl ala PerLDAP and PythonLDAP doesn't support the same. Perhaps Leif knows best :) From jlittle at open-it.org Tue Feb 26 00:38:35 2002 From: jlittle at open-it.org (Joe Little) Date: Mon, 25 Feb 2002 15:38:35 -0800 Subject: change in python-ldap method? In-Reply-To: <3C7AC8F1.40404@stroeder.com> Message-ID: Thoughts at the very end.. On 2/25/02 3:29 PM, "Michael Str?der" wrote: > Joe Little wrote: >> >> When it >> explodes the DN out of my entry, its string result is: >> >> "(cn=whois\+\+)" >> [..] >> However, even before I explode it, I already see the DN is stored in my res >> as whois\+\+. > > This is perfectly right. See RFC2253, section 2.4. After reading BNF in > section 3. you might be convinced that you're best bet is to handle DNs > as opaque. "+" is used to form multi-valued RDNs. > >> Searching on this DN results in an ldap.FILTER_ERROR: {'desc': >> 'Bad search filter', 'info': ''} > > Special chars in search filters are a different thing, see RFC2254. > >> whois++ has been in /etc/services for quite some time. > > I remember that there was a discussion about this very topic on one of > the OpenLDAP lists. > >> So one of two things >> has happened: >> >> 1) python-ldap has changed behavior in some way (whether first pull of data >> or search filter usage) >> >> 2) MigrationTools (used to load up NIS type data to LDAP) from padl.com, >> which fixed certain things associated with + and other symbols, can load >> data correctly into LDAP with Perl ala PerLDAP and PythonLDAP doesn't >> support the same. > > 3) The LDAP libs/server requires proper escaping/handling DNs which > translates to "+" need to be escaped nowadays. The application using > python-ldap has to be fixed. > What I find odd about this is that the data retrieved using one call to Python-LDAP cannot be in turn used again to write back. You have to take the results and always un-escape any characters before calling LDAP methods again on data? It seems somehow very wrong that one can't use the DN that LDAP returns with a result to refer to the same entry again. Wouldn't you agree? > Ciao, Michael. > > > From michael at stroeder.com Tue Feb 26 00:29:53 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Tue, 26 Feb 2002 00:29:53 +0100 Subject: change in python-ldap method? References: Message-ID: <3C7AC8F1.40404@stroeder.com> Joe Little wrote: > > When it > explodes the DN out of my entry, its string result is: > > "(cn=whois\+\+)" > [..] > However, even before I explode it, I already see the DN is stored in my res > as whois\+\+. This is perfectly right. See RFC2253, section 2.4. After reading BNF in section 3. you might be convinced that you're best bet is to handle DNs as opaque. "+" is used to form multi-valued RDNs. > Searching on this DN results in an ldap.FILTER_ERROR: {'desc': > 'Bad search filter', 'info': ''} Special chars in search filters are a different thing, see RFC2254. > whois++ has been in /etc/services for quite some time. I remember that there was a discussion about this very topic on one of the OpenLDAP lists. > So one of two things > has happened: > > 1) python-ldap has changed behavior in some way (whether first pull of data > or search filter usage) > > 2) MigrationTools (used to load up NIS type data to LDAP) from padl.com, > which fixed certain things associated with + and other symbols, can load > data correctly into LDAP with Perl ala PerLDAP and PythonLDAP doesn't > support the same. 3) The LDAP libs/server requires proper escaping/handling DNs which translates to "+" need to be escaped nowadays. The application using python-ldap has to be fixed. Ciao, Michael. From michael at stroeder.com Tue Feb 26 00:51:29 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Tue, 26 Feb 2002 00:51:29 +0100 Subject: change in python-ldap method? References: Message-ID: <3C7ACE01.5080208@stroeder.com> Joe Little wrote: > > It seems somehow very wrong that one can't use the DN that > LDAP returns with a result to refer to the same entry again. Wouldn't you > agree? I do agree. And it works perfect for me with python-ldap. Tested again a minute ago with web2ldap accessing OpenLDAP REL_ENG_2 using several methods. It seems that I have to fix web2ldap to escape the special chars properly when automatically forming the RDN from entry's attributes. But that's a bug in web2ldap not a bug in python-ldap. Ciao, Michael. From spum at piels.com Tue Feb 26 00:48:33 2002 From: spum at piels.com (Bobby Beckmann) Date: Mon, 25 Feb 2002 15:48:33 -0800 Subject: case sensitivity Message-ID: <15482.52561.209027.362756@piels.com> Hi all, Since the attribute/value set is returned as a dict, the proper case is necessary when using that dict. Since we need case-insensitive lookups, I've patched ldapobject.py to use a custom case-insensitive dict. Are there any plans to provide something like this in the released lib (I'd be happy to contribute my change, all two lines + 1 class). If not, is there a better solution to this problem of case sensitivity. thanks, bobby -- spum at piels.com From michael at stroeder.com Tue Feb 26 17:38:09 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Tue, 26 Feb 2002 17:38:09 +0100 Subject: case sensitivity References: <15482.52561.209027.362756@piels.com> Message-ID: <3C7BB9F1.3080707@stroeder.com> Bobby Beckmann wrote: > > Since the attribute/value set is returned as a dict, the proper case > is necessary when using that dict. Since we need case-insensitive > lookups, I've patched ldapobject.py to use a custom case-insensitive > dict. 1. You should *not* patch ldapobject.py directly. You should sub-class ldapobject.LDAPObject if you need a different behaviour. 2. There's also module cidict shipped with python-ldap which sub-classes UserDict.UserDict providing a case-insensitive dictionary class. > Are there any plans to provide something like this in the released > lib I won't add those kind of changes to ldapobject.LDAPObject. Let's keep that part of python-ldap easy to understand. I prefer to see in the results more or less exactly what comes out of the OpenLDAP libs. Also the approach with just a case-insensitive dictionary looks to naive to me. The dictionary class should be case-preserving which is slightly more complicated. IMHO things like language sub-types (cn;lang-en-EN) and transfer encodings (;binary) should be supported. I have plans to implement such a thing but spare time is sparse at the moment. Ciao, Michael. From michael at stroeder.com Tue Feb 26 17:54:36 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Tue, 26 Feb 2002 17:54:36 +0100 Subject: change in python-ldap method? References: Message-ID: <3C7BBDCC.5080909@stroeder.com> Cc:-ed again to python-ldap-dev list since it might be interesting for others too. Joe Little wrote: > > Do you use search filters with \+ in it? Yes, I've tested the group admin feature of web2ldap editing group membership of entries which have + (better say escaped \+) in their DN string representation. The filter also contained \+ but did not raise any filter error exception. As I said there are some bugs in web2ldap (0.10.3 as of this writing) concerning + in DNs which I fixed this morning. But they were unrelated to constructing search filters. > Is there a method that you are using the generate your search > string that strips the escapes out? The problem here is that I don't strip > them out.. and feel I should have to :) Don't strip them out. Pass the DN as assertion value right into your routine escaping the special chars for search filters. Then build the filter with the result. Watch out for the use of ldaputil.base.escape_filter_chars() in pylib/w2lapp/groupadm.py of current web2ldap distribution. Another thing is if you want to compare attribute values within your client. For such a string comparison you have to unescape the attribute values *after* completely decomposing the DN with ldap.explode_dn() and ldap.explode_rdn(). I've started to implement a function for that. Ciao, Michael. From jlittle at open-it.org Tue Feb 26 18:18:02 2002 From: jlittle at open-it.org (Joe Little) Date: Tue, 26 Feb 2002 09:18:02 -0800 Subject: change in python-ldap method? In-Reply-To: <3C7BBDCC.5080909@stroeder.com> Message-ID: On 2/26/02 8:54 AM, "Michael Str?der" wrote: > Cc:-ed again to python-ldap-dev list since it might be interesting for > others too. > > Joe Little wrote: >> >> Do you use search filters with \+ in it? > > Yes, I've tested the group admin feature of web2ldap editing group > membership of entries which have + (better say escaped \+) in their DN > string representation. The filter also contained \+ but did not raise > any filter error exception. > As I said there are some bugs in web2ldap (0.10.3 as of this writing) > concerning + in DNs which I fixed this morning. But they were unrelated > to constructing search filters. > >> Is there a method that you are using the generate your search >> string that strips the escapes out? The problem here is that I don't strip >> them out.. and feel I should have to :) > > Don't strip them out. Pass the DN as assertion value right into your > routine escaping the special chars for search filters. Then build the > filter with the result. Watch out for the use of > ldaputil.base.escape_filter_chars() in pylib/w2lapp/groupadm.py of > current web2ldap distribution. I'm confused. The search filter barfed because I had the escape sequences in there. If I just had the + symbols with \, it likely won't give me there error. I was thinking I'd need to remove the \'s before commiting another search. Previously, I didn't need to do this (last June). > > Another thing is if you want to compare attribute values within your > client. For such a string comparison you have to unescape the attribute > values *after* completely decomposing the DN with ldap.explode_dn() and > ldap.explode_rdn(). I've started to implement a function for that. > > Ciao, Michael. > > > From sharmago at mail.nih.gov Tue Feb 26 22:30:06 2002 From: sharmago at mail.nih.gov (Sharma, Gopesh (NCI)) Date: Tue, 26 Feb 2002 16:30:06 -0500 Subject: How to install python-ldap module Message-ID: <76D006EB9224D411B12B0008C7C59D9607E5A1E7@nihexchange9.nih.gov> Hello all: I need to access ldap server from a python script. Can some one help me in installing the python-ldap module on a linux red hat 7.1 enviornment? Thanks Gopesh From jens at zope.com Tue Feb 26 22:42:56 2002 From: jens at zope.com (Jens Vagelpohl) Date: Tue, 26 Feb 2002 16:42:56 -0500 Subject: How to install python-ldap module In-Reply-To: <76D006EB9224D411B12B0008C7C59D9607E5A1E7@nihexchange9.nih.gov> Message-ID: if you tell us what you find unclear about the instructions that come with the software then maybe someone can help. jens On Tuesday, February 26, 2002, at 04:30 , Sharma, Gopesh (NCI) wrote: > Hello all: > > I need to access ldap server from a python script. Can some one help me in > installing the python-ldap module on a linux red hat 7.1 enviornment? > > Thanks > Gopesh > From dennis at illusions.com Thu Feb 28 08:27:08 2002 From: dennis at illusions.com (dennis at illusions.com) Date: Thu, 28 Feb 2002 00:27:08 -0700 (MST) Subject: build and run issues cvs version Message-ID: Hi, two issues with code from cvs as of 2/28/02. First, python setup.py build complained about: warning: build_py: file Lib/ldap.py (for module ldap) not found There was no ldap.py file anywhere in the module I got from cvs. I put a ldap.py file from python-ldap-1.10alpha3 into Lib and was able to build and install. However, when I try to import ldap or _ldap I get denied: $ python Python 2.0.1 (#1, Jun 24 2001, 18:39:34) [GCC 2.95.3 20010315 (release)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import ldap Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.0/site-packages/ldap/__init__.py", line 5, in ? from _ldap import * ImportError: cannot open shared object file: cannot load shared object file: No such file or directory >>> import _ldap Traceback (most recent call last): File "", line 1, in ? ImportError: cannot open shared object file: cannot load shared object file: No such file or directory >>> -- --- Dennis Sacks dennis at illusions.com "Things are falling down on me, heavy things I could not see" From jens at zope.com Thu Feb 28 14:41:08 2002 From: jens at zope.com (Jens Vagelpohl) Date: Thu, 28 Feb 2002 08:41:08 -0500 Subject: build and run issues cvs version In-Reply-To: Message-ID: will setup.py fail when you run it and there is no ldap.py? i dimly remember seeing that warning but the build process never failed, i think that message is benign and doesn't mean much. just sticking in a piece of code from a *totally* different version of python-ldap is probably not a good solution and will lead to problems. jens On Thursday, February 28, 2002, at 02:27 , dennis at illusions.com wrote: > Hi, > > two issues with code from cvs as of 2/28/02. First, python setup.py build > complained about: > > warning: build_py: file Lib/ldap.py (for module ldap) not found > > There was no ldap.py file anywhere in the module I got from cvs. > > I put a ldap.py file from python-ldap-1.10alpha3 into Lib and was able to > build and install. > > However, when I try to import ldap or _ldap I get denied: > > $ python > Python 2.0.1 (#1, Jun 24 2001, 18:39:34) > [GCC 2.95.3 20010315 (release)] on linux2 > Type "copyright", "credits" or "license" for more information. >>>> import ldap > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.0/site-packages/ldap/__init__.py", line 5, in ? > from _ldap import * > ImportError: cannot open shared object file: cannot load shared object > file: No such file or directory >>>> import _ldap > Traceback (most recent call last): > File "", line 1, in ? > ImportError: cannot open shared object file: cannot load shared object > file: No such file or directory >>>> > > > -- > --- > Dennis Sacks > dennis at illusions.com > "Things are falling down on me, heavy things I could not see" > > > > From dennis at illusions.com Thu Feb 28 17:44:59 2002 From: dennis at illusions.com (dennis at illusions.com) Date: Thu, 28 Feb 2002 09:44:59 -0700 (MST) Subject: build and run issues cvs version In-Reply-To: Message-ID: On Thu, 28 Feb 2002, Jens Vagelpohl wrote: > will setup.py fail when you run it and there is no ldap.py? i dimly > remember seeing that warning but the build process never failed, i think > that message is benign and doesn't mean much. > just sticking in a piece of code from a *totally* different version of > python-ldap is probably not a good solution and will lead to problems. You have a very good point that I cannot dispute. It was late and I don't remember now why I thought that would help. I started over with a clean copy of the python-ldap from cvs, edited setup.cfg, ran python setup.py build & python setup.py install. When I try to import ldap this is what I see: $ python Python 2.0.1 (#1, Jun 24 2001, 18:39:34) [GCC 2.95.3 20010315 (release)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import ldap Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.0/site-packages/ldap/__init__.py", line 5, in ? from _ldap import * ImportError: cannot open shared object file: cannot load shared object file: No such file or directory >>> -- --- Dennis Sacks dennis at illusions.com "Things are falling down on me, heavy things I could not see" From jens at zope.com Thu Feb 28 18:30:42 2002 From: jens at zope.com (Jens Vagelpohl) Date: Thu, 28 Feb 2002 12:30:42 -0500 Subject: build and run issues cvs version In-Reply-To: Message-ID: you could check which libraries the resulting .so file is linked against and verify if those libraries are in the place they should be. the command to check the linked libraries escapes me right now, i hardly ever use it : / jens On Thursday, February 28, 2002, at 11:44 , dennis at illusions.com wrote: > On Thu, 28 Feb 2002, Jens Vagelpohl wrote: > >> will setup.py fail when you run it and there is no ldap.py? i dimly >> remember seeing that warning but the build process never failed, i think >> that message is benign and doesn't mean much. > >> just sticking in a piece of code from a *totally* different version of >> python-ldap is probably not a good solution and will lead to problems. > > You have a very good point that I cannot dispute. It was late and I don't > remember now why I thought that would help. > > I started over with a clean copy of the python-ldap from cvs, edited > setup.cfg, ran python setup.py build & python setup.py install. > > When I try to import ldap this is what I see: > > $ python > Python 2.0.1 (#1, Jun 24 2001, 18:39:34) > [GCC 2.95.3 20010315 (release)] on linux2 > Type "copyright", "credits" or "license" for more information. >>>> import ldap > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.0/site-packages/ldap/__init__.py", line 5, in ? > from _ldap import * > ImportError: cannot open shared object file: cannot load shared object > file: No such file or directory >>>> > > > -- > --- > Dennis Sacks > dennis at illusions.com > "Things are falling down on me, heavy things I could not see" From michael at stroeder.com Thu Feb 28 22:46:52 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Thu, 28 Feb 2002 22:46:52 +0100 Subject: build and run issues cvs version References: Message-ID: <3C7EA54C.8000108@stroeder.com> Jens Vagelpohl wrote: > you could check which libraries the resulting .so file is linked against > and verify if those libraries are in the place they should be. the > command to check the linked libraries escapes me right now, i hardly > ever use it : You probably mean ldd. See the output on my system below (output varies depending on features compiled into OpenLDAP libs). Ciao, Michael. # ldd /usr/lib/python2.2/site-packages/_ldap.so libldap.so.2 => /usr/local/openldap2/lib/libldap.so.2 (0x40022000) liblber.so.2 => /usr/local/openldap2/lib/liblber.so.2 (0x40052000) libc.so.6 => /lib/libc.so.6 (0x4005e000) libsasl.so.7 => /usr/local/sasl/lib/libsasl.so.7 (0x40171000) libkrb4.so.2 => /usr/local/krb5/lib/libkrb4.so.2 (0x4017e000) libdes425.so.3 => /usr/local/krb5/lib/libdes425.so.3 (0x40193000) libkrb5.so.3 => /usr/local/krb5/lib/libkrb5.so.3 (0x40197000) libk5crypto.so.3 => /usr/local/krb5/lib/libk5crypto.so.3 (0x401f4000) libcom_err.so.3 => /usr/local/krb5/lib/libcom_err.so.3 (0x40206000) libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x40208000) libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x402c0000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) libdb-3.1.so => /usr/lib/libdb-3.1.so (0x40384000) libdl.so.2 => /lib/libdl.so.2 (0x40401000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x40404000) libpam.so.0 => /lib/libpam.so.0 (0x40432000) libresolv.so.2 => /lib/libresolv.so.2 (0x4043b000) From michael at stroeder.com Thu Feb 28 17:51:02 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Thu, 28 Feb 2002 17:51:02 +0100 Subject: build and run issues cvs version References: Message-ID: <3C7E5FF6.3070601@stroeder.com> dennis at illusions.com wrote: > > warning: build_py: file Lib/ldap.py (for module ldap) not found Simply ignore that. It solely has to do with a brain-dead limitation of DistUtils. > There was no ldap.py file anywhere in the module I got from cvs. Yes, that's right. > I put a ldap.py file from python-ldap-1.10alpha3 into Lib and was able to > build and install. Don't do that!!! > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.0/site-packages/ldap/__init__.py", line 5, in ? > from _ldap import * > ImportError: cannot open shared object file: cannot load shared object > file: No such file or directory Adjust /etc/ld.so.conf or set LD_LIBRARY_PATH to point to the directory containing the shared libs of OpenLDAP 2. Ciao, Michael. From ljiang at agere.com Mon Mar 4 19:38:01 2002 From: ljiang at agere.com (Ling Jiang) Date: Mon, 04 Mar 2002 13:38:01 -0500 Subject: run time problem with python-ldap-2.0.0pre04 Message-ID: <3C83BF09.3070205@agere.com> Could you please point out what I am missing? In python, when you run import ldap, you get the error message similar to the following. I put the test code (from README) to test.py and the following is what I got: Traceback (most recent call last): File "/tmp/test.py", line 2, in ? import ldap File "/usr/local/lib/python2.1/site-packages/ldap/__init__.py", line 5, in ? from _ldap import * ImportError: ld.so.1: /usr/local/bin/python: fatal: liblber.so.2: open failed: No such file or directory OS: Solaris 2.6 Platform: sun4u sparc SUNW,Ultra-4 openssl: 0.9.6 24 Sep 2000 OpenLDAP: 2.0.23 (openldap-stable-20020215.tgz) Python: 2.1.1 Thanks. L Jiang From sgraham at wugaa.com Mon Mar 4 20:51:59 2002 From: sgraham at wugaa.com (Steven Graham) Date: Mon, 4 Mar 2002 11:51:59 -0800 (PST) Subject: run time problem with python-ldap-2.0.0pre04 In-Reply-To: <3C83BF09.3070205@agere.com> Message-ID: You need to make sure that the path to liblber.so.2 is in your LD_LIBRARY_PATH environment variable. So if liblber.so.2 is living in /usr/local/lib, LD_LIBRARY_PATH should at the miniumum look like the following: #echo $LD_LIBRARY_PATH /usr/local/lib ======================= Steven Graham sgraham at wugaa.com ======================= On Mon, 4 Mar 2002, Ling Jiang wrote: > Could you please point out what I am missing? > In python, when you run import ldap, you get the error message similar > to the following. I put the test code (from README) to test.py and the > following is what I got: > > Traceback (most recent call last): > File "/tmp/test.py", line 2, in ? > import ldap > File "/usr/local/lib/python2.1/site-packages/ldap/__init__.py", line > 5, in ? > from _ldap import * > ImportError: ld.so.1: /usr/local/bin/python: fatal: liblber.so.2: open > failed: No such file or directory > > OS: Solaris 2.6 > Platform: sun4u sparc SUNW,Ultra-4 > openssl: 0.9.6 24 Sep 2000 > OpenLDAP: 2.0.23 (openldap-stable-20020215.tgz) > Python: 2.1.1 > > Thanks. > > L Jiang > > > From jlittle at open-it.org Mon Mar 4 23:16:43 2002 From: jlittle at open-it.org (Joe Little) Date: Mon, 04 Mar 2002 14:16:43 -0800 Subject: run time problem with python-ldap-2.0.0pre04 In-Reply-To: <3C83EB1D.9070504@stroeder.com> Message-ID: this works on linux systems only. For Solaris systems, follow the LD_LIBRARY_PATH answer :) On 3/4/02 1:46 PM, "Michael Str?der" wrote: > Steven Graham wrote: >> You need to make sure that the path to liblber.so.2 is in your >> LD_LIBRARY_PATH environment variable. > > Alternatively you can add it to /etc/ld.so.conf and invoke ldconfig > afterwards. > > I've added that to the FAQ... > > Ciao, Michael. > > > From Hans.Aschauer at Physik.uni-muenchen.de Mon Mar 11 12:22:03 2002 From: Hans.Aschauer at Physik.uni-muenchen.de (Hans Aschauer) Date: Mon, 11 Mar 2002 12:22:03 +0100 Subject: SASL binds Message-ID: <20020311112204.454807E7@carrier.theorie.physik.uni-muenchen.de> Hi all, I'm new to this list, but as far as I can see from the archives (and from the source, of course), SASL binds are still on the TODO list for python-ldap. A few days ago I started experimenting with this topic, and I succeeded in doing SASL binds from python. However, my sasl_bind_s() method for the ldap class is at the moment only a proof of concept and has many shortcomings (works only with the gssapi-method or methods which do not require user interaction, links to a "private" openldap lib (liblutil.a), does not implement interaction callbacks, to name only a few). However, I am not really an experienced C programmer, and I think I would need some help with several topics (memory management, how to do callbacks to user-supplied python functions from C, and so on). Thanks, Hans -- Hans.Aschauer at Physik.uni-muenchen.de From michael at stroeder.com Mon Mar 11 12:43:33 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Mon, 11 Mar 2002 12:43:33 +0100 Subject: SASL binds References: <20020311112204.454807E7@carrier.theorie.physik.uni-muenchen.de> Message-ID: <3C8C9865.1090105@stroeder.com> Hans Aschauer wrote: > > SASL binds are still on the TODO list for python-ldap. Yes. > A few days ago I started experimenting with this topic, and I succeeded > in doing SASL binds from python. However, my sasl_bind_s() method for > the ldap class is at the moment only a proof of concept and has many > shortcomings (works only with the gssapi-method or methods which do not > require user interaction, GSS-API means Kerberos? Which LDAP server are you using? What's your motivation for doing SASL binds? > links to a "private" openldap lib (liblutil.a), For what reason? Note that unlike python-ldap 1.x which wrapped LDAP C APIs of different vendors python-ldap 2.x is closely tied to OpenLDAP 2.x libs. Therefore it's no problem to use everything which is shipped with recent OpenLDAP 2.0.23+ nowadays. > does not implement interaction callbacks, to name only a > few). Hmm, implementing callbacks is a messy thing anyway. If we can make most things without it I'd be glad to follow your approach. > However, I am not really an experienced C programmer, Welcome to the club... > and I think I > would need some help with several topics (memory management, how to do > callbacks to user-supplied python functions from C, and so on). Hmm, unfortunately experienced C programmers seem to be rare on this list... Best bet is that you send your patches to the list and we'll see... Ciao, Michael. From Hans.Aschauer at Physik.uni-muenchen.de Mon Mar 11 13:33:44 2002 From: Hans.Aschauer at Physik.uni-muenchen.de (Hans Aschauer) Date: Mon, 11 Mar 2002 13:33:44 +0100 Subject: SASL binds In-Reply-To: <3C8C9865.1090105@stroeder.com> References: <20020311112204.454807E7@carrier.theorie.physik.uni-muenchen.de> <3C8C9865.1090105@stroeder.com> Message-ID: <20020311123344.D2D2A7E7@carrier.theorie.physik.uni-muenchen.de> > Hans Aschauer wrote: > > SASL binds are still on the TODO list for python-ldap. > > Yes. > > > A few days ago I started experimenting with this topic, and I > > succeeded in doing SASL binds from python. However, my > > sasl_bind_s() method for the ldap class is at the moment only a > > proof of concept and has many shortcomings (works only with the > > gssapi-method or methods which do not require user interaction, > > GSS-API means Kerberos? Yes (In fact, not necessarily. Kerberos is however most widly used in gssapi things). > Which LDAP server are you using? OpenLDAP 2.? (the one shipped with SuSE 7.3), and the Heimdal Kerberos distribution (also SuSE 7.3). > What's your motivation for doing SASL binds? The fun of doing it. Seriously: AFAIK SASL is supposed to be _the_ authentication method for LDAPv3 binds. For example, it can provide you whith single-sign-on, and the like. > > links to a "private" openldap lib (liblutil.a), > > For what reason? This is just because I was to lazy (I mean: I didn't have time) to implement my own callbacks, which are required by SASL. So I took a look at the source of openldap's ldapadd program, and did the same thing as this program does. As I said, it's only a proof of concept. Of course, this should change. > Note that unlike python-ldap 1.x which wrapped LDAP C APIs of > different vendors python-ldap 2.x is closely tied to OpenLDAP 2.x > libs. Therefore it's no problem to use everything which is shipped > with recent OpenLDAP 2.0.23+ nowadays. The above mentioned lib ships only with the source of openldap, since it is only used for and statically linked to the openldap tools. However, what this library provides is only useful for programs which are called from the command line (passwords are read from stdin, etc.). So there needs something to be done which is more general... > > does not implement interaction callbacks, to name only a > > few). > > Hmm, implementing callbacks is a messy thing anyway. If we can make > most things without it I'd be glad to follow your approach. Agree. However, SASL is a very general approach to authentication/authorization, and the programmer can never know, what information will be required by the auth-method used (the method might be choosen at run-time, for example). SASL thus sends some user-interaction requests (along with a plain english text which can be used for prompting the user) to callback functions, which gather the required information. This information can be something like a username and a password, but it could also be "Please insert your smartcard!"... Of course, one could think of a cleaner way of doing this on a higher level (override a method in a class derived from ldapobject, for example?). > > However, I am not really an experienced C programmer, > > Welcome to the club... > > > and I think I > > would need some help with several topics (memory management, how to > > do callbacks to user-supplied python functions from C, and so on). > > Hmm, unfortunately experienced C programmers seem to be rare on this > list... Probably because the concepts behind C and python are mutually exclusive :-) > Best bet is that you send your patches to the list and we'll see... Ok, I don't have them here at the moment, but I can send them today in the evening (MEZ). Hans -- Hans.Aschauer at Physik.uni-muenchen.de From Godwin.Vaz at eng.monash.edu.au Mon Mar 11 22:39:10 2002 From: Godwin.Vaz at eng.monash.edu.au (Godwin Vaz) Date: Tue, 12 Mar 2002 08:39:10 +1100 Subject: LDAP Adapter Message-ID: <3C8D23FE.D34063@eng.monash.edu.au> Hi All, I am a newbie to linux and zope and have installed the the ldap adapter but as specified in the installation instructions have a broken product. I am using Red Hat 7.1 and Zope 2.4.3 rpm. I installed the python-ldapmodule-1.8-2.i386.rpm and have ended up with the ldapmodule.so in the following path /usr/lib/python1.5/site-packages/ldapmodule.so. after restarting zope i still have a broken product i guess it could be the ldapmodule.so creating the problem. After looking at the following site http://python-ldap.sourceforge.net/ i am still not clear as to which programs or files i need to build the ldapmodule if that's what is causing the broken product. Could you please point me in the right direction. Your help is appreciated. Regards Godwin -------------- next part -------------- A non-text attachment was scrubbed... Name: Godwin.Vaz.vcf Type: text/x-vcard Size: 372 bytes Desc: Card for Godwin Vaz URL: From jens at zope.com Mon Mar 11 23:43:26 2002 From: jens at zope.com (Jens Vagelpohl) Date: Mon, 11 Mar 2002 23:43:26 +0100 Subject: LDAP Adapter In-Reply-To: <3C8D23FE.D34063@eng.monash.edu.au> Message-ID: <66C7CFFA-3541-11D6-986D-003065C7DEAE@zope.com> a simple test to see if the python-ldap module is at fault is:: - start the python interpreter - type "import ldap" - type "import _ldap" if none of those give you tracebacks the python-ldap module is most likely OK. did you know that when you go into the zope Control_Panel and click on "Products" you can actually see a traceback when you click on the broken product? this traceback would be helpful in diagnosing your problem. jens On Monday, March 11, 2002, at 10:39 , Godwin Vaz wrote: > Hi All, > > I am a newbie to linux and zope and have installed the the ldap adapter > but as specified in the installation instructions have a broken product. > I > am using Red Hat 7.1 and Zope 2.4.3 rpm. > > I installed the python-ldapmodule-1.8-2.i386.rpm and have ended up with > the ldapmodule.so in the following path > /usr/lib/python1.5/site-packages/ldapmodule.so. > after restarting zope i still have a broken product i guess it could be > the ldapmodule.so creating the problem. > > After looking at the following site http://python-ldap.sourceforge.net/ > i am still not clear as to which programs or files i need to build the > ldapmodule if that's what is causing the broken product. > > Could you please point me in the right direction. > > Your help is appreciated. > > Regards > Godwin > From Hans.Aschauer at Physik.uni-muenchen.de Thu Mar 14 13:12:58 2002 From: Hans.Aschauer at Physik.uni-muenchen.de (Hans Aschauer) Date: Thu, 14 Mar 2002 13:12:58 +0100 Subject: SASL binds (part 2) Message-ID: <20020314121258.5A844740@carrier.theorie.physik.uni-muenchen.de> Hi all, Ooops, the sources I sent last time did not even compile. Sorry. I should really try if things complile after adding comments ;-) I think I am getting closer to something usable. SASL binds should work now for different mechanisms. A short demo: ----------------------------8<------------------------------- import ldap # For documentation, see Module/LDAPObject.c def callback(id, challenge, prompt, defresult): print "id=%d, challenge=%s, prompt=%s, defresult=%s" % \ (id, challenge, prompt, defresult) if id == 16386: # XXX these constants are defined in sasl.h return "aschauer" if id == 16388: return "secret" # this is the sasl password in sasldb return "" l = ldap.initialize("ldap://localhost/") l.sasl_bind_s("","DIGEST-MD5", callback) res = l.search_s("dc=theorie,dc=physik,dc=uni-muenchen,dc=de", ldap.SCOPE_SUBTREE, "objectclass=*") print res l.unbind() ----------------------------8<------------------------------- I do not like the callback interface. Should use something more clever (perhaps an instance of a sasl object should be passed, which handles the callback internally, and also defines the mechanism string). Hans -- Hans.Aschauer at Physik.uni-muenchen.de -------------- next part -------------- A non-text attachment was scrubbed... Name: diff Type: text/x-diff Size: 6889 bytes Desc: not available URL: From Hans.Aschauer at Physik.uni-muenchen.de Tue Mar 12 12:42:27 2002 From: Hans.Aschauer at Physik.uni-muenchen.de (Hans Aschauer) Date: Tue, 12 Mar 2002 12:42:27 +0100 Subject: SASL binds In-Reply-To: <3C8C9865.1090105@stroeder.com> References: <20020311112204.454807E7@carrier.theorie.physik.uni-muenchen.de> <3C8C9865.1090105@stroeder.com> Message-ID: <20020312114227.BF0A47E7@carrier.theorie.physik.uni-muenchen.de> Am Montag, 11. M?rz 2002 12:43 schrieb Michael Str?der: > Best bet is that you send your patches to the list and we'll see... Ok, I'm sending the modified files (not patches since I'm not sure if I still have the originals around). Still a mess, but I removed the dependency on liblutil.a (makes it simpler to compile, as you don't need the sources for openldap). Works only with gssapi, as the requirde callbacks for other mechanisms are not really implemented: for other mechanisms, you see only printf's, and the program segfaults afterwards, because interact->reslut and so on is filled with rubbish. The mechanisms which one can try depend on the installation of sasl (have a look at /usr/lib/sasl/). In order to compile it, you will need the sasl and sasl-devel packages. setup.cfg takes care of the libsasl linking. Hans -- Hans.Aschauer at Physik.uni-muenchen.de From Hans.Aschauer at Physik.uni-muenchen.de Fri Mar 15 16:28:53 2002 From: Hans.Aschauer at Physik.uni-muenchen.de (Hans Aschauer) Date: Fri, 15 Mar 2002 16:28:53 +0100 Subject: SASL (part 3) Message-ID: <20020315152853.E9E4B744@carrier.theorie.physik.uni-muenchen.de> Its me again :-) I have something usable now, as I think. The interface looks like this: -------------------------8<---------------------------- import ldap # from sasl import sasl_digest_md5 # XXX l = ldap.initialize("ldap://localhost/") auth = sasl_digest_md5("aschauer","secret") l.sasl_bind_s("", auth) res = l.search_s("dc=myorg,dc=com", ldap.SCOPE_ONELEVEL, "objectclass=*") print res l.unbind() -------------------------8<------------------------- Comments? The interesting part is the sasl_digest_md5 class, that handles the SASL callbacks (source attached, also for sasl_gssapi and, as a base class, a generic sasl class). The diff is against cvs (made with "cvs diff"). If anybody wants to test it and needs assistance with setting things up, feel free to contact me. Hans -- Hans.Aschauer at Physik.uni-muenchen.de -------------- next part -------------- A non-text attachment was scrubbed... Name: sasl.patch Type: text/x-diff Size: 6930 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sasl_bind.py Type: text/x-python Size: 2400 bytes Desc: not available URL: From jajcus at bnet.pl Tue Mar 26 19:14:30 2002 From: jajcus at bnet.pl (Jacek Konieczny) Date: Tue, 26 Mar 2002 19:14:30 +0100 Subject: SASL (part 3) In-Reply-To: <20020326133449.92D1D740@carrier.theorie.physik.uni-muenchen.de> References: <20020315152853.E9E4B744@carrier.theorie.physik.uni-muenchen.de> <20020325163011.GA7960@nic.nigdzie> <20020326133449.92D1D740@carrier.theorie.physik.uni-muenchen.de> Message-ID: <20020326181430.GA4540@nic.nigdzie> On Tue, Mar 26, 2002 at 02:34:49PM +0100, Hans Aschauer wrote: > Jacek, > > > Seems very nice. I hope it will be soon commited to CVS, as we really > > need SASL support. > > I am not sure if this should be commited before 2.0. You know, this is > first time I do something SASL related, and first time that I hack > python-C bindings. The SASL code doesn't seem to break anything else. It an be IMHO marked as "experimental" even in official release if required. But I think it's Michael who should decide. He did most of the work recently, so he is the boss here :-) And the stable and working relase of python-ldap is also a think we need very much. > However, if you think it should go into 2.0, it is > fine for me and I will try my best ;-) Anyway: how would I get write > access to CVS? Ask Michael. > > But there are some things, that should be fixed: > > > > - it seems comments about SASL support in LDAPObject.c are outdated > > they still describe "callback-function" interface > > > > - I found now way to set realm for my bind so I wasn't able to bind > > to my server. Realms are important feature of SASL, so there should > > be an easy way to set them. Probably as another optional argument to > > sasl_digest_md5 This is not true. CB_GETREALM works as it should. I don't know why it didn't worked for me the first time I tried this. > > - SASL_CB_... constants should probably be defined in constants.c > > file, as other constants. The only problem is that these constants > > are sasl-related, not ldap-related, but I cannot think about any > > better place. When implemented them in C they are defined from the > > good source: C header files > > > > - classes sasl... should be moved out of the demo to ldap package, > > maybe to separate module > > I think that I will have a few hours mid next-week in order to > fix/change/modify these things. Thanks! Great :-) Greets, Jacek PS. I Cc to the list and didn't cut quotes, because these are parts of my original message, which was intended to go here, but by my mistake it was only sent to Hans. From Hans.Aschauer at Physik.uni-muenchen.de Wed Mar 27 10:18:16 2002 From: Hans.Aschauer at Physik.uni-muenchen.de (Hans Aschauer) Date: Wed, 27 Mar 2002 10:18:16 +0100 Subject: SASL (part 3) In-Reply-To: <20020326181430.GA4540@nic.nigdzie> References: <20020315152853.E9E4B744@carrier.theorie.physik.uni-muenchen.de> <20020326133449.92D1D740@carrier.theorie.physik.uni-muenchen.de> <20020326181430.GA4540@nic.nigdzie> Message-ID: <20020327091816.75B13837@carrier.theorie.physik.uni-muenchen.de> On Tue, Mar 26, 2002 at 19:14, Jacek Konieczny wrote: > On Tue, Mar 26, 2002 at 02:34:49PM +0100, Hans Aschauer wrote: [...] > > However, if you think it should go into 2.0, it is > > fine for me and I will try my best ;-) Anyway: how would I get > > write access to CVS? > > Ask Michael. Michael, would it be ok for you to give me write access to CVS? If so: should patches be announced on this list before submitting them to CVS? Somewhat related: I started writing a (simplistic) wrapper for ldap_schema.h, which will do rootDSE schema string parsing. In fact, the parsing of the schema description is done by libldap (so there is no need for a home-brew parser which has to be tested). I think it will be finished by the end of next week. Hans -- Hans.Aschauer at Physik.uni-muenchen.de From michael at stroeder.com Wed Mar 27 15:42:34 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Wed, 27 Mar 2002 15:42:34 +0100 Subject: SASL (part 3) References: <20020315152853.E9E4B744@carrier.theorie.physik.uni-muenchen.de> <20020326133449.92D1D740@carrier.theorie.physik.uni-muenchen.de> <20020326181430.GA4540@nic.nigdzie> <20020327091816.75B13837@carrier.theorie.physik.uni-muenchen.de> Message-ID: <3CA1DA58.7080507@stroeder.com> Hans Aschauer wrote: > On Tue, Mar 26, 2002 at 19:14, Jacek Konieczny wrote: > >>On Tue, Mar 26, 2002 at 02:34:49PM +0100, Hans Aschauer wrote: > > [...] > > >>>However, if you think it should go into 2.0, it is >>>fine for me and I will try my best ;-) SASL should be in 2.0 final release. >>> Anyway: how would I get >>>write access to CVS? >> >>Ask Michael. > > Michael, would it be ok for you to give me write access to CVS? No problem to give you write access to the CVS tree. But please don't check this in as is. I need some time to comment. I hope to get back this easter weekend. Up to now I just had the chance to glance over it. E.g. I'd like to see an own class for SASL mechanisms in a separate sub-module ldap.sasl. > If so: > should patches be announced on this list before submitting them to CVS? Yes, I think so. People have the chance to glance over it and comment. Development in CVS should not have much rough edges at the moment. > Somewhat related: I started writing a (simplistic) wrapper for > ldap_schema.h, which will do rootDSE schema string parsing. In fact, > the parsing of the schema description is done by libldap (so there is > no need for a home-brew parser which has to be tested). I think it will > be finished by the end of next week. Great! Make sure to place it in a different sub-module - at least the Python interface part for it. Ciao, Michael. From Hans.Aschauer at Physik.uni-muenchen.de Wed Mar 27 16:34:19 2002 From: Hans.Aschauer at Physik.uni-muenchen.de (Hans Aschauer) Date: Wed, 27 Mar 2002 16:34:19 +0100 Subject: SASL (part 3) In-Reply-To: <3CA1DA58.7080507@stroeder.com> References: <20020315152853.E9E4B744@carrier.theorie.physik.uni-muenchen.de> <20020327091816.75B13837@carrier.theorie.physik.uni-muenchen.de> <3CA1DA58.7080507@stroeder.com> Message-ID: <20020327153420.73C16741@carrier.theorie.physik.uni-muenchen.de> On Wednesday, 27. March 2002 15:42, Michael Str?der wrote: > No problem to give you write access to the CVS tree. But please don't > check this in as is. Ack. > I need some time to comment. I hope to get back this easter weekend. > Up to now I just had the chance to glance over it. E.g. I'd like to > see an own class for SASL mechanisms in a separate sub-module > ldap.sasl. That's fine. Could someone please give me a hand with the distutil stuff? (Joe?) [...] [schema support] > Make sure to place it in a different sub-module - at least the Python > interface part for it. At the moment, I have no plans for an high-level python interface. What I plan to do (and have paritally done) is a simple wrapper for the C functions in ldap_schema (i.e. str2objectclass and friends). Is it ok to just plug these wrappers into function.c? Saves some hazzles with distutlis... Probably it would be necessary to plug this into the Lib/ldap/functions.py mechanism, right? I am not really sure if the underlying C functions are thread safe... For example: From michael at stroeder.com Thu Mar 28 18:46:30 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Thu, 28 Mar 2002 18:46:30 +0100 Subject: SASL (part 3) References: <20020315152853.E9E4B744@carrier.theorie.physik.uni-muenchen.de> <20020327091816.75B13837@carrier.theorie.physik.uni-muenchen.de> <3CA1DA58.7080507@stroeder.com> <20020327153420.73C16741@carrier.theorie.physik.uni-muenchen.de> Message-ID: <3CA356F6.5070409@stroeder.com> Hans Aschauer wrote: > On Wednesday, 27. March 2002 15:42, Michael Str?der wrote: > > Could someone please give me a hand with the distutil > stuff? It's far less struggle to add a module to a DistUtils package than you believe. Have a look at ext_modules and py_modules list in setup.py to get the idea. I will happily extend setup.py. >>Make sure to place it in a different sub-module - at least the Python >>interface part for it. > > At the moment, I have no plans for an high-level python interface. What > I plan to do (and have paritally done) is a simple wrapper for the C > functions in ldap_schema (i.e. str2objectclass and friends). You can provide very primitive C wrapper functions in module _ldap and leave the Python parts up to me (applies to SASL and schema). I will start with the SASL stuff this weekend and check in what I believe the Python parts should look like. > Is it ok to just plug these wrappers into function.c? Please go for a separate C source schema.c. The C code is already kludgy enough. Maybe take template.c as a start. > Probably it would be necessary to plug this into the > Lib/ldap/functions.py mechanism, right? I'd suggest to write a new Python wrapper class in a separate module ldap.schema (Lib/ldap/schema.py). The class methods could also contain some sanitizing (say Pythonizing ;-) which is more convenient to implement in Python itself. > I am not really sure if the > underlying C functions are thread safe... From my knowledge about OpenLDAP I'm almost sure they're not. That's what the module-wide thread lock is for. Ciao, Michael. From holbert.13 at osu.edu Thu Mar 28 20:27:09 2002 From: holbert.13 at osu.edu (Richard Holbert) Date: Thu, 28 Mar 2002 14:27:09 -0500 Subject: Error in LDAP Programming with Python v2.0.0pre04 PDF Message-ID: <200203281927.OAA08090@mail4.uts.ohio-state.edu> I hope this makes since. It looks like there are three copies of the body of the document in the document. Maybe I can help. Where can I find the tex source for this document? Sincerely, Rick From michael at stroeder.com Thu Mar 28 22:37:41 2002 From: michael at stroeder.com (=?ISO-8859-15?Q?Michael_Str=F6der?=) Date: Thu, 28 Mar 2002 22:37:41 +0100 Subject: Error in LDAP Programming with Python v2.0.0pre04 PDF References: <200203281927.OAA08090@mail4.uts.ohio-state.edu> Message-ID: <3CA38D25.5090208@stroeder.com> Richard Holbert wrote: > I hope this makes since. It looks like there are three copies of the body of > the document in the document. I know. I already asked for Latex support on the list. > Maybe I can help. Where can I find the tex source for this document? Best bet is to directly check out from CVS: http://sourceforge.net/cvs/?group_id=2072 Web-Interface: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python-ldap/python-ldap/Doc/ Your help's appreciated! Ciao, Michael. From michael at stroeder.com Fri Mar 29 15:32:38 2002 From: michael at stroeder.com (=?ISO-8859-15?Q?Michael_Str=F6der?=) Date: Fri, 29 Mar 2002 15:32:38 +0100 Subject: Error in LDAP Programming with Python v2.0.0pre04 PDF References: <200203281927.OAA08090@mail4.uts.ohio-state.edu> <3CA38D25.5090208@stroeder.com> <200203282347.SAA08212@mail1.uts.ohio-state.edu> Message-ID: <3CA47B06.2010205@stroeder.com> Richard Holbert wrote: > > Change input{} to include{}... I've commited a modified python-ldap.tex. However it does not compile (see attached python-ldap.how). Not sure whether it was ok before... Ciao, Michael. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: python-ldap.how URL: From michael at stroeder.com Fri Mar 29 16:28:55 2002 From: michael at stroeder.com (=?ISO-8859-15?Q?Michael_Str=F6der?=) Date: Fri, 29 Mar 2002 16:28:55 +0100 Subject: Error in LDAP Programming with Python v2.0.0pre04 PDF References: <200203281927.OAA08090@mail4.uts.ohio-state.edu> <200203282347.SAA08212@mail1.uts.ohio-state.edu> <3CA47B06.2010205@stroeder.com> <200203291505.KAA10690@mail5.uts.ohio-state.edu> <3CA485F8.8050107@stroeder.com> Message-ID: <3CA48837.4060709@stroeder.com> Michael Str?der wrote: > Richard Holbert wrote: > >> I think we only need the includes for: >> >> ldap >> ldap_async >> ldap_modlist >> ldif >> and ldapurl > > > The rest should remain as inputs. > > Ok, another commit. > [..] > Still it does not compile. I'm lost with TeX... Uuumh, the problem is that my local ldap.tex gets overwritten after doing make. Ciao, Michael. From michael at stroeder.com Fri Mar 29 16:49:37 2002 From: michael at stroeder.com (=?ISO-8859-15?Q?Michael_Str=F6der?=) Date: Fri, 29 Mar 2002 16:49:37 +0100 Subject: Error in LDAP Programming with Python v2.0.0pre04 PDF References: <200203281927.OAA08090@mail4.uts.ohio-state.edu> <3CA485F8.8050107@stroeder.com> <3CA48837.4060709@stroeder.com> <200203291538.KAA06775@mail4.uts.ohio-state.edu> Message-ID: <3CA48D11.2050908@stroeder.com> Richard Holbert wrote: >> >>>Still it does not compile. I'm lost with TeX... >> >>Uuumh, the problem is that my local ldap.tex gets overwritten after doing >>make. > > Mine too, I tried chmod 444 ldap.tex It is not overwritten if I use \input{ldap}. What's the exact difference of \input{} and \include{}? Ciao, Michael. From r.salz at verizon.net Fri Mar 29 17:16:32 2002 From: r.salz at verizon.net (Rich Salz) Date: Fri, 29 Mar 2002 11:16:32 -0500 Subject: Error in LDAP Programming with Python v2.0.0pre04 PDF References: <200203281927.OAA08090@mail4.uts.ohio-state.edu> <3CA485F8.8050107@stroeder.com> <3CA48837.4060709@stroeder.com> <200203291538.KAA06775@mail4.uts.ohio-state.edu> <3CA48D11.2050908@stroeder.com> Message-ID: <3CA49360.2010004@verizon.net> I do not currently have convenient access to a Unix machine with the Python source, but in a couple of days I should have my Linux box back online. I've written two python manuals -- for ZSI and wizard -- and have basically got it down to a cookbook approach. Take a look at those; for example, you can find PS PDF and HTML for ZSI, generated from the TeX input at http://www.zolera.com/opensrc/zsi If that's of interest, I can fix things up next week. /r$ From jens at zope.com Fri Mar 29 17:31:06 2002 From: jens at zope.com (Jens Vagelpohl) Date: Fri, 29 Mar 2002 11:31:06 -0500 Subject: Error in LDAP Programming with Python v2.0.0pre04 PDF In-Reply-To: <3CA49360.2010004@verizon.net> Message-ID: <5EAA0D40-4332-11D6-8F52-003065C7DEAE@zope.com> what i really like about the ZSI TeX sources is that they build with just one small dependency on something created by the actual software building process (version.tex), you don't have to execute any Makefiles to create the docs. that means i can load it into my favorite TeX editor/processor and build it in there without any problem. jens On Friday, March 29, 2002, at 11:16 , Rich Salz wrote: > I do not currently have convenient access to a Unix machine with the > Python source, but in a couple of days I should have my Linux box back > online. I've written two python manuals -- for ZSI and wizard -- and > have basically got it down to a cookbook approach. Take a look at those; > for example, you can find PS PDF and HTML for ZSI, generated from the > TeX input at http://www.zolera.com/opensrc/zsi > > If that's of interest, I can fix things up next week. > /r$ > > > > From michael at stroeder.com Fri Mar 29 18:49:28 2002 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Fri, 29 Mar 2002 18:49:28 +0100 Subject: Error in LDAP Programming with Python v2.0.0pre04 PDF References: <5EAA0D40-4332-11D6-8F52-003065C7DEAE@zope.com> Message-ID: <3CA4A928.3060308@stroeder.com> Jens Vagelpohl wrote: > what i really like about the ZSI TeX sources is that they build with > just one small dependency on something created by the actual software > building process (version.tex), you don't have to execute any Makefiles > to create the docs. I glanced over the ZSI doc sources and as far as I understand they are built exactly the same way like the python-ldap docs. The Makefile looks somewhat cleaner. \input{} is used to include the chapters (like also done in the Python docs). > that means i can load it into my favorite TeX > editor/processor and build it in there without any problem. Feel free to fix/clean-up the python-ldap TeX sources to make it loadable into your favorite TeX editor/processor. Ciao, Michael. From michael at stroeder.com Fri Mar 29 18:58:30 2002 From: michael at stroeder.com (=?ISO-8859-15?Q?Michael_Str=F6der?=) Date: Fri, 29 Mar 2002 18:58:30 +0100 Subject: Error in LDAP Programming with Python v2.0.0pre04 PDF References: <200203281927.OAA08090@mail4.uts.ohio-state.edu> <200203291538.KAA06775@mail4.uts.ohio-state.edu> <3CA48D11.2050908@stroeder.com> <200203291738.MAA16276@mail3.uts.ohio-state.edu> Message-ID: <3CA4AB46.6030801@stroeder.com> Richard Holbert wrote: > Now it looks like a problem in ldap_async.tex, and ldap_modlist.tex. > > I deleted the \input{ldap_async} and \input{ldap_modlist} lines from > python-ldap.tex Bingo! Renamed ldap_async to ldap-async and ldap_modlist to ldap-modlist and it seems to work now. I've commited the changes. Ciao, Michael. From jajcus at bnet.pl Sat Mar 30 12:50:34 2002 From: jajcus at bnet.pl (Jacek Konieczny) Date: Sat, 30 Mar 2002 12:50:34 +0100 Subject: How do do strong authentication on LDAP connection? In-Reply-To: References: Message-ID: <20020330115034.GB15094@nic.nigdzie> On Sat, Mar 30, 2002 at 12:10:09PM +0800, Dirksen Lau wrote: > How to do the strong authentication? There are two ways: 1. SSL/TLS ========== Use thing like this (instead of your ldap_open or ldap_initialize): l=ldap_initialize("ldaps://...."); This will work if your server listens on ldaps port. If your server listens on ldap port only, but supports TLS, you use it: l=ldap_initialize("ldap://....") l.protocol_version=ldap.VERSION3 l.set_option(ldap.OPT_X_TLS,ldap.OPT_X_TLS_DEMAND) l.start_tls_s() 2. SASL ======== This is not yet supported by python-ldap, but is being worked on. SASL is a way of doing strong authentication even without encrypting the whole sessions. Greets, Jacek From dirksen.lau at polyu.edu.hk Sat Mar 30 05:10:09 2002 From: dirksen.lau at polyu.edu.hk (Dirksen Lau) Date: Sat, 30 Mar 2002 12:10:09 +0800 Subject: How do do strong authentication on LDAP connection? In-Reply-To: Message-ID: Hi, When I try the bind operation against our department LDAP server, I got this error: ldap.STRONG_AUTH_REQUIRED: {'desc': 'Strong authentication required', 'info': 'This LDAP server does not accept cleartext passwords'} How to do the strong authentication? Do I need to encrypt the password befire calling bind_s? What encryption sheme? Does python have the relevant module? Please advice! Cheers Dirksen From michael at stroeder.com Sun Mar 31 14:36:03 2002 From: michael at stroeder.com (=?HZ-GB-2312?B?TWljaGFlbCBTdHJ+e359ZGVy?=) Date: Sun, 31 Mar 2002 14:36:03 +0200 Subject: How do do strong authentication on LDAP connection? References: Message-ID: <3CA702B3.8020105@stroeder.com> Dirksen Lau wrote: > > When I try the bind operation against our department LDAP server, > I got this > error: ldap.STRONG_AUTH_REQUIRED: {'desc': 'Strong authentication > required', > 'info': 'This LDAP server does not accept cleartext passwords'} This means you have to authenticate by presenting a client certificate which is done during establishing the SSL connection. > How to do the strong authentication? 1. Make yourself familiar with concepts of SSL and client certificates. 2. Ask your LDAP server admin whether you have to use LDAP over SSL to separate port or using StartTLS extended operation. 3. Look at Demo/initialize.py to get a idea of how to connect with python-ldap using either one of the methods. 4. Have a client certificate and matching private key at hand as "PEM files". You have to get a client certificate which validates against a trusted root CA cert at the LDAP server. Ask your admin. 5. Use ldap.set_option(ldap.OPT_X_TLS_CERTFILE,client_cert_file) ldap.set_option(ldap.OPT_X_TLS_KEYFILE,client_key_file) to point the python-ldap and OpenLDAP libs to the files to use for strong authentication during opening the SSL connection. Ciao, Michael.