ldap.subschema and multiple SUP

Stefan Gohmann gohmann at univention.de
Tue Jul 24 15:36:07 CEST 2007


Hello,

I've got a problem with ldap.subschema and multiple SUP entries. I'm using 
python-ldap 2.2.0.

My test program:
******************************************
root at backupmonk:~# 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:
root at backupmonk:~# ./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              gohmann at univention.de
Univention GmbH        Linux 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 30_separate-sup.patch
Type: text/x-diff
Size: 755 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20070724/67cf59c0/attachment.patch>


More information about the python-ldap mailing list