|
From: <mi...@st...> - 2002-06-27 06:47:17
|
Franco Spinelli wrote: > I have installed openldap 2.1.2 fron openldap site > [..] > from _ldap import * >> ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: >> file /usr/local/lib/python2.2/site-packages/_ldap.so: >> symbol ldap_url_search: referenced symbol not found Hmm, it seems that ldap_url_search is no longer available in OpenLDAP 2.1. So far I've never tested python-ldap with OpenLDAP 2.1. You have two options: * Use OpenLDAP 2.0.x to build python-ldap against that (see parameters library_dirs and include_dirs in setup.cfg to specify a separate OpenLDAP 2.0.x directory you used for OpenLDAP 2.0.x's ./configure --prefix) * Remove any reference to ldap_url_search in Modules/LDAPObject.c. web2ldap does not use this function. Ciao, Michael. |
|
From: <mi...@st...> - 2002-06-28 14:45:22
|
Michael Str=F6der wrote: > Franco Spinelli wrote: > >> I have installed openldap 2.1.2 fron openldap site > > [..] >>> symbol ldap_url_search: referenced symbol not found >> > > Hmm, it seems that ldap_url_search is no longer available in > OpenLDAP > 2.1. So far I've never tested python-ldap with OpenLDAP 2.1. > > [..] > * Remove any reference to ldap_url_search in > Modules/LDAPObject.c. web2ldap does not use this function. Anyone having any objections against removing methods url_search*()? Anyone really using it? If yes, we could easily reimplement it later with help of module ldapurl. The only issue would be that ldapurl needs Python 2.x (not compatible with Python 1.5.x). Ciao, Michael. |
|
From: Jens V. <je...@zo...> - 2002-06-28 15:12:23
|
> Anyone having any objections against removing methods url_search*()? > > Anyone really using it? If yes, we could easily reimplement it > later with help of module ldapurl. The only issue would be that > ldapurl needs Python 2.x (not compatible with Python 1.5.x). > no objections. never used it. jens |
|
From: Derrick 'd. H. <dm...@dm...> - 2002-06-28 19:28:28
|
On Fri, Jun 28, 2002 at 04:44:54PM +0200, Michael Str=F6der wrote:
| Michael Str=F6der wrote:
| > Franco Spinelli wrote:
| >
| >> I have installed openldap 2.1.2 fron openldap site
| > > [..]
| >>> symbol ldap_url_search: referenced symbol not found
| >
| > Hmm, it seems that ldap_url_search is no longer available in
| > OpenLDAP
| > 2.1. So far I've never tested python-ldap with OpenLDAP 2.1.
| >
| > [..]
| > * Remove any reference to ldap_url_search in
| > Modules/LDAPObject.c. web2ldap does not use this function.
|=20
| Anyone having any objections against removing methods url_search*()?
|=20
| Anyone really using it?
The only objection I have is that it really helped me to learn how to
work with an LDAP URL. I needed to use URLs to configure exim to pull
data from LDAP, and I was having trouble using 'ldapsearch' -- it
didn't like the URL no matter what I gave it. For me it was a
valuable tool.
Though if OpenLDAP 2.1 doesn't have the function, then that's a real
strong argument for removing those methods (at the very least when
compiled against OpenLDAP 2.1).
| If yes, we could easily reimplement it later with help of module
| ldapurl. The only issue would be that ldapurl needs Python 2.x (not
| compatible with Python 1.5.x).
Personally I don't consider compatibility with python 1.5.2 a
significant feature. 2.0 was released a long time ago, by internet
standards.
-D
--=20
Microsoft DNS service terminates abnormally when it receives a response
to a dns query that was never made.
Fix information: run your DNS service on a different platform.
-- bugtraq
=20
http://dman.ddts.net/~dman/
|
|
From: <mi...@st...> - 2002-06-28 19:37:13
|
Derrick 'dman' Hudson wrote: > On Fri, Jun 28, 2002 at 04:44:54PM +0200, Michael Str=F6der wrote: > | Michael Str=F6der wrote: > |=20 > | Anyone having any objections against removing methods url_search*()? > |=20 > | Anyone really using it? >=20 > The only objection I have is that it really helped me to learn how to > work with an LDAP URL. How about practicing with the module ldapurl? It has more features=20 anyway. And it can construct LDAP URLs from search parameters with=20 method unparse(). > Though if OpenLDAP 2.1 doesn't have the function, then that's a real > strong argument for removing those methods (at the very least when > compiled against OpenLDAP 2.1). Well, another strong argument is that there's no one actively=20 maintaining the C module part under Modules/. Therefore I'd be=20 glad to keep it as short as possible. Ciao, Michael. |
|
From: Derrick 'd. H. <dm...@dm...> - 2002-06-28 21:02:49
|
On Fri, Jun 28, 2002 at 09:36:26PM +0200, Michael Str=F6der wrote: | Derrick 'dman' Hudson wrote: | >On Fri, Jun 28, 2002 at 04:44:54PM +0200, Michael Str=F6der wrote: | >| Michael Str=F6der wrote: | >|=20 | >| Anyone having any objections against removing methods url_search*()? | >|=20 | >| Anyone really using it? | > | >The only objection I have is that it really helped me to learn how to | >work with an LDAP URL. |=20 | How about practicing with the module ldapurl? How? The documentation is pretty sparse. (I guess I could read the source, though, and then I would say "Ok") http://python-ldap.sourceforge.net/doc/python-ldap/module-ldapurl.html http://python-ldap.sourceforge.net/pydoc/ldapurl.html If the ldapurl module does everything that the current url_search methods do, then there is no compelling reason to keep the latter around. -D --=20 "...In the UNIX world, people tend to interpret `non-technical user' as meaning someone who's only ever written one device driver." --Daniel Pead =20 http://dman.ddts.net/~dman/ |
|
From: <mi...@st...> - 2002-06-29 11:04:30
|
Derrick 'dman' Hudson wrote:
> On Fri, Jun 28, 2002 at 09:36:26PM +0200, Michael Str=F6der wrote:
> | Derrick 'dman' Hudson wrote:
> | >On Fri, Jun 28, 2002 at 04:44:54PM +0200, Michael Str=F6der wrote:
> | >| Michael Str=F6der wrote:
> | >|=20
> | >| Anyone having any objections against removing methods url_search*(=
)?
> | >|=20
> | >| Anyone really using it?
> | >
> | >The only objection I have is that it really helped me to learn how t=
o
> | >work with an LDAP URL.
> |=20
> | How about practicing with the module ldapurl?
>=20
> How? The documentation is pretty sparse.
> [..]
> If the ldapurl module does everything that the current url_search
> methods do, then there is no compelling reason to keep the latter
> around.
It parses and unparses LDAP URLs and is designed to be completely=20
independent from module ldap.
Some sample code for parsing a LDAP URL:
>>> import ldapurl
>>> ldap_url =3D=20
ldapurl.LDAPUrl('ldap://localhost:1389/dc=3Dstroeder,dc=3Dcom?cn???bindna=
me=3Dcn=3DMichael%2cdc=3Dstroeder%2cdc=3Dcom,X-BINDPW=3Dsecret')
>>> # Using the parsed LDAP URL by reading the class attributes
>>> ldap_url.dn
u'dc=3Dstroeder,dc=3Dcom'
>>> ldap_url.hostport
'localhost:1389'
>>> ldap_url.attrs
['cn']
>>> ldap_url.filterstr
u'(objectclass=3D*)'
>>> ldap_url.who
'cn=3DMichael,dc=3Dstroeder,dc=3Dcom'
>>> ldap_url.cred
'secret'
>>> ldap_url.scope
0
Some sample code for the other way round:
>>> ldap_url =3D=20
ldapurl.LDAPUrl(hostport=3D'localhost:1389',dn=3Du'dc=3Dstroeder,dc=3Dcom=
',attrs=3D['cn','mail'],who=3D'cn=3DMichael,dc=3Dstroeder,dc=3Dcom',cred=3D=
'secret')
>>> ldap_url.unparse()
u'ldap://localhost:1389/dc=3Dstroeder,dc=3Dcom?cn,mail?base?(objectclass=3D=
*)?bindname=3Dcn=3DMichael%2Cdc=3Dstroeder%2Cdc=3Dcom,X-BINDPW=3Dsecret'
That's pretty much all it does. Note that you don't have to=20
specify all the class attributes. There are reasonable defaults=20
assumed. And who and cred maps to None if not specified. See the=20
tests at the bottom of ldapurl.py for more examples.
Advice: For security reasons you shouldn't specify passwords in=20
LDAP URLs unless you really know what you're doing.
Ciao, Michael.
|
|
From: <mi...@st...> - 2002-06-30 21:17:39
|
Michael Str=F6der wrote: > Derrick 'dman' Hudson wrote: >=20 >> On Fri, Jun 28, 2002 at 09:36:26PM +0200, Michael Str=F6der wrote: >> | | How about practicing with the module ldapurl? >> >> How? The documentation is pretty sparse. BTW: There's Demo/Lib/ldapurl/urlsearch.py since ages... ;-) Ciao, Michael. |
|
From: <mi...@st...> - 2002-06-29 12:30:01
|
Michael Str=F6der wrote: > > Hmm, it seems that ldap_url_search is no longer available in > > OpenLDAP > > 2.1. > > [..] > Anyone having any objections against removing methods url_search*()? I removed method url_search from LDAPObject.c. We can reimplement that in the Python wrapper class=20 ldap.ldapobject.LDAPObject if there's request. Ciao, Michael. |