ldap.subschema and multiple SUP
Hello,
I've got a problem with ldap.subschema and multiple SUP entries. I'm using
python-ldap 2.2.0.
My test program:
**
[EMAIL PROTECTED]:~# cat schema-test.py
#!/usr/bin/python2.4
import ldap.schema
attr={ 'cn': ['Subschema'],
'objectClasses': ["( 0.9.2342.19200300.100.4.20
NAME 'pilotOrganization' SUP ( organization $ organizationalUnit ) STRUCTURAL
MAY buildingName )"],
}
subschema = ldap.schema.SubSchema(attr)
for oid in subschema.listall(ldap.schema.ObjectClass):
print 'OID: %s' % oid
obj = subschema.get_obj(ldap.schema.ObjectClass, oid)
print 'OBJ: %s' % obj
**
If I call the program I got the following output:
[EMAIL PROTECTED]:~# ./schema-test.py
OID: 0.9.2342.19200300.100.4.20
OBJ: ( 0.9.2342.19200300.100.4.20 NAME 'pilotOrganization' SUP ( organization
organizationalUnit ) STRUCTURAL MAY buildingName )
I think there should be a "$" beetween "organization"
and "organizationalUnit".
The attached patch seems to work.
Cheers
Stefan
--
Stefan Gohmann Entwicklung [EMAIL PROTECTED]
Univention GmbHLinux for your Business fon: +49 421 22 232- 0
Mary-Somerville-Str.1 28359 Bremen fax: +49 421 22 232-99
http://www.univention.de
diff -Nur python-ldap-2.2.0.orig/Lib/ldap/schema/models.py python-ldap-2.2.0/Lib/ldap/schema/models.py
--- python-ldap-2.2.0.orig/Lib/ldap/schema/models.py 2006-03-26 14:25:24.0 +0200
+++ python-ldap-2.2.0/Lib/ldap/schema/models.py 2007-07-24 15:17:23.0 +0200
@@ -144,7 +144,7 @@
result = [str(self.oid)]
result.append(self.key_list('NAME',self.names,quoted=1))
result.append(self.key_attr('DESC',self.desc,quoted=1))
-result.append(self.key_list('SUP',self.sup))
+result.append(self.key_list('SUP',self.sup,sep=' $ '))
result.append({0:'',1:' OBSOLETE'}[self.obsolete])
result.append({0:' STRUCTURAL',1:' ABSTRACT',2:' AUXILIARY'}[self.kind])
result.append(self.key_list('MUST',self.must,sep=' $ '))
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
Python-LDAP-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
Re: ldap.subschema and multiple SUP
Stefan Gohmann wrote: > > I've got a problem with ldap.subschema and multiple SUP entries. I'm using > python-ldap 2.2.0. Thanks for catching this. Same bug in classes AttributeType and DITStructureRule. Committed a fix, will be in next release 2.3.1. Ciao, Michael. P.S.: Hope you find the time to answer my questions regarding your python-heimdal module... - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
Re: ldap.subschema and multiple SUP
Am Dienstag, 24. Juli 2007 16:42 schrieb Michael Ströder: > Stefan Gohmann wrote: > > I've got a problem with ldap.subschema and multiple SUP entries. I'm > > using python-ldap 2.2.0. > > Thanks for catching this. Same bug in classes AttributeType and > DITStructureRule. Committed a fix, will be in next release 2.3.1. Thanks. > Ciao, Michael. > > P.S.: Hope you find the time to answer my questions regarding your > python-heimdal module... Ups, my vacation was too long. Cheers Stefan -- Stefan Gohmann Entwicklung [EMAIL PROTECTED] Univention GmbHLinux for your Business fon: +49 421 22 232- 0 Mary-Somerville-Str.1 28359 Bremen fax: +49 421 22 232-99 http://www.univention.de - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
[ldap] ANN: python-ldap-2.3.1
Find a new release of python-ldap: http://python-ldap.sourceforge.net/ python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema). Released 2.3.1 2007-07-25 Changes since 2.3.0: * Support for setuptools (building .egg, thanks to Torsten) * Support for matched values control (RFC 3876, thanks to Andreas) Lib/ * Fixed ldif (see SF#1709111, thanks to Dmitry) * ldap.schema.models: SUP now separated by $ (method __str__() of classes AttributeType, ObjectClass and DITStructureRule, thanks to Stefan) Modules/ * Added constant MOD_INCREMENT to support modify+increment extension (see RFC 4525, thanks to Andreas) --- You are currently subscribed to [EMAIL PROTECTED] as: [EMAIL PROTECTED] To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the SUBJECT of the message.
